男人av天堂专区,欧美~日韩~国产~中文字幕,久久久99一区二区三区 http://wscjj.cn Sat, 31 Dec 2016 17:05:51 +0000 zh-CN hourly 1 https://wordpress.org/?v=5.7.12 http://wscjj.cn/wp-content/uploads/2016/08/cropped-logo-2-32x32.png Applescript – Mac玩兒法 http://wscjj.cn 32 32 Hazel:讓不懂AppleScript的用戶也能搞定智能化文件管理 http://wscjj.cn/hazel http://wscjj.cn/hazel#comments Tue, 14 May 2013 08:47:57 +0000 http://wscjj.cn/?p=16149 我想Hazel應(yīng)該是每一位不懂自動(dòng)化腳本編程的非技術(shù)控Mac用戶必用的一款文件自動(dòng)化管理軟件,通過在任意目錄下設(shè)定多個(gè)規(guī)則“Rule”就能讓Mac進(jìn)行舊文件歸檔到指定目錄,垃圾文件進(jìn)Trash,存儲(chǔ)的圖片進(jìn)iPhoto 等自動(dòng)化管理行為,隨時(shí)保持井井有條~ 而不需要“人肉管理”模式,同時(shí)Hazel還能代替主人對(duì)垃圾簍進(jìn)行條件式清理工作。

Hazel本身“寄居”在OS X的偏好設(shè)置里,默認(rèn)第一項(xiàng)“Folders”是我們定義規(guī)則的地方,左側(cè)欄設(shè)置規(guī)則執(zhí)行目錄,右側(cè)欄管理規(guī)則,點(diǎn)擊加號(hào)開始添加規(guī)則,這里舉3個(gè)栗子:

]]>
2
Script Debugger:AppleScript編輯器 http://wscjj.cn/script-debugger%ef%bc%9aapplescript http://wscjj.cn/script-debugger%ef%bc%9aapplescript#respond Wed, 10 Apr 2013 15:11:21 +0000 http://wscjj.cn/?p=15382 Script Debugger?是一款幫助用戶更輕松更快捷編譯AppleScript的編輯器,默認(rèn)提供了AppleScript,Applet,通訊錄腳本,Digital Hub腳本,F(xiàn)older Action,Mail Rule腳本模版,在編譯過程中用戶可以使用Text Subsitution(長(zhǎng)文本快速替換,類似于TextExpander),字體顏色自定義等功能。

]]>
0
Proximity:監(jiān)測(cè)接近Mac的藍(lán)牙設(shè)備并自動(dòng)執(zhí)行AppleScript腳本 http://wscjj.cn/proximity http://wscjj.cn/proximity#respond Tue, 12 Mar 2013 04:23:15 +0000 http://wscjj.cn/?p=14422 Proximity是一款很有意思的Mac小軟件,她可以在其他開啟藍(lán)牙的設(shè)備接近或遠(yuǎn)離Mac時(shí)自動(dòng)調(diào)用AppleScript腳本,監(jiān)控頻率可以自定義,默認(rèn)是60秒。

]]>
0
EventScripts:靈活的AppleScripts腳本觸發(fā)器 http://wscjj.cn/eventscripts http://wscjj.cn/eventscripts#respond Sun, 09 Dec 2012 13:20:27 +0000 http://wscjj.cn/?p=11861 為了迎接即將到來的Alfred 2,玩兒法特別邀請(qǐng)了EventScripts來做“暖場(chǎng)”,這是一款能夠讓指定Event來觸發(fā)AppleScripts等類型腳本程序自動(dòng)運(yùn)行的軟件,ES編寫了大約有40余種的Event供用戶選擇,每一個(gè)Event可以重復(fù)添加并觸發(fā)多個(gè)Scripts。

ES 在官網(wǎng)提供了sample scripts ,里面分普通 Scripts 與Mobile Scripts 兩種,可以先down下來嘗試一把?!?a target="_blank">下載】。

EventScripts 一款由Event自動(dòng)觸發(fā)AppleScripts等類型腳本的服務(wù)平臺(tái)

如果手頭有一部iPhone的話,就可以安裝EventScripts Mobile App來遠(yuǎn)程觸發(fā)Mac上的腳本自動(dòng)運(yùn)行,這里用到了Bonjour技術(shù),使用前要在Mac端EventScripts里添加專用的Mobile Scripts,同時(shí)Event選擇“EventScripts Mobile”,然后在Preference-Server中勾選第一項(xiàng),隨意填入一個(gè)名稱,以此為桌面版EventScripts設(shè)立一個(gè)Server(password不用勾選也可):

EventScripts 一款由Event自動(dòng)觸發(fā)AppleScripts等類型腳本的服務(wù)平臺(tái)

這樣在Mobile App里會(huì)自動(dòng)發(fā)現(xiàn)server,連接后你會(huì)看到桌面版里添加的scripts赫然在列:

點(diǎn)擊script即可遠(yuǎn)程觸發(fā)腳本在Mac上運(yùn)行。

EventScripts 使用 Growl 來為用戶報(bào)告腳本執(zhí)行結(jié)果,同時(shí)也支持與Prowl連接來推送結(jié)果到iPhone/iPad上。

]]>
0
Applescript:一鍵關(guān)閉重復(fù)Finder窗口 http://wscjj.cn/applescript-for-close-duplicate-windows http://wscjj.cn/applescript-for-close-duplicate-windows#respond Sat, 29 Sep 2012 04:15:57 +0000 http://wscjj.cn/?p=9166 遇到過重復(fù)Finder窗口泛濫于桌面上的情況嗎?除了傻傻的逐個(gè)關(guān)掉,我們也可以選擇萬能的Applescript來搞定,小編在這放上編譯好的app文件,需要用到時(shí),點(diǎn)擊一下app即可關(guān)閉所有重復(fù)窗口,超級(jí)快。

 

]]>
0
Applescript:如何讓 Podcasts 具備快進(jìn)功能? http://wscjj.cn/how-to-make-podcast-playing-in-fast http://wscjj.cn/how-to-make-podcast-playing-in-fast#respond Fri, 31 Aug 2012 14:44:01 +0000 http://wscjj.cn/?p=7948 最近突然愛上用Mac聽Podcasts,有時(shí)一聽就是整半天,不過節(jié)目中難免有一些段落或聽過的部分需要跳過,但iTunes又沒有快進(jìn)功能,還好又讓小編遇到了一個(gè)解救技巧,那就是Applescript,這貨真的是無所不能,能夠控制Podcasts播放速度,還能調(diào)用具備快進(jìn)/快退功能的Quicktime來播放Podcasts節(jié)目,來看腳本內(nèi)容:

tell application "iTunes"

    set setupNeeded to false

    --fetch prior selected playlist name and playback rate
    try
        set targetPlaylistName to do shell script "defaults read com.jeffporten.fastpodcast SelectedPlaylist"
        set playbackRate to do shell script "defaults read com.jeffporten.fastpodcast PlaybackRate"
    on error -- probably first run of script
        set setupNeeded to true
    end try

    if setupNeeded is false then -- confirm using last settings
        set userReply to button returned of (display dialog "Play playlist \"" & targetPlaylistName & "\" at " & playbackRate & " speed?" buttons {"Cancel", "Change...", "OK"} default button "OK")
        if userReply is "Change..." then set setupNeeded to true
    end if

    if setupNeeded is true then -- set up new settings
        set listPlaylists to the name of every playlist
        set targetPlaylistName to (choose from list listPlaylists with prompt "Which playlist to play?" without multiple selections allowed and empty selection allowed) as text
        set selectedSpeed to button returned of (display dialog "Playback rate to use?" & return & return & "(?X and 2X correspond to iPod playback speeds, actually 75% and 150%)" buttons {"Custom", "?X", "2X"})
        if selectedSpeed is "2X" then
            set playbackRate to 1.5
        else if selectedSpeed is "?X" then
            set playbackRate to 0.75
        else
            set playbackRate to text returned of (display dialog "Enter a playback speed. (1.0 is normal speed, 2.0 is true double-speed, 0.5 is true half-speed.)" default answer "1.0")
        end if
    end if

    --store settings in a non-AppleScripty way
    do shell script "defaults write com.jeffporten.fastpodcast SelectedPlaylist " & (quoted form of targetPlaylistName)
    do shell script "defaults write com.jeffporten.fastpodcast PlaybackRate " & (quoted form of (playbackRate as text))

    --actually do the playback in QuickTime Player
    set targetPlaylist to playlist targetPlaylistName
    set trackList to tracks of targetPlaylist
    repeat with i from 1 to count trackList
        set thisTrack to item i of trackList
        set podcastName to album of thisTrack
        set thisLoc to location of thisTrack
        set thisDuration to duration of thisTrack

        tell application "QuickTime Player"
            activate
            open thisLoc
            play document 1

            set rate of document 1 to playbackRate

            --if some podcasts should never be rate-altered, delete last line and use this instead
            --if (podcastName does not contain "Onion") then set rate of document 1 to 1.5

            --or for multiple podcasts, add as many of these as you like before "then set rate":
            --and (podcastName does not contain "someOtherPodcast") 

            set nextTrack to false
            set j to 0

            --if the QTP player is manually ended by dragging the slider to the end, automatically starts next podcast
            --if QTP player is closed, script errors out of existence
            --otherwise, when playback is finished, script will close the QuickTime Player document and open the next track in the playlist
            repeat until nextTrack is true
                delay 2
                if current time of document 1 ≥ duration of document 1 then set nextTrack to true
            end repeat

            close document 1
        end tell

        --mark the track as played
        set played count of thisTrack to (played count of thisTrack) + 1

        --I use this AppleScript line to set the rating of the podcast track to one star, which I delete later from a smart playlist
        --set rating of thisTrack to 20
    end repeat
end tell

粘入Applescipt,點(diǎn)擊“運(yùn)行”

 

在第一個(gè)彈出框中選擇播放速度,有1/2X和2X兩種,分別是實(shí)際速度的75%和150%

 

或是選擇“Custom”自定義速度,中間會(huì)讓你選擇播放列表,選擇“Podcasts”即可,輸入以0.5為增量的數(shù)值可以定義自己需要的快進(jìn)速度

 

確認(rèn)點(diǎn)“OK”

 

定義的速度會(huì)立即通過Quicktime實(shí)現(xiàn),在恢復(fù)普通播放速度后,你還可以使用Quicktime的快進(jìn)/快退鍵控制播放進(jìn)程。

 

]]>
0