in applescript het onderstaande plakken, aanpassen en opslaan als application.
application kan je dan in je user opstart gooien.
heb dan 2 "apps" voor thuis en een voor werk, zou in een kunnen maar zo net zo makkelijk:)
SSID aanpassen, run van de voren in terminal set ssid om te kijken wat werkelijk je ssid is (in mijn geval korte osx het af naar Xen terwijl het Xen Apple Network is.)
Shares
profilename
en je custom growl texten aanpassen.
application kan je dan in je user opstart gooien.
heb dan 2 "apps" voor thuis en een voor werk, zou in een kunnen maar zo net zo makkelijk:)
SSID aanpassen, run van de voren in terminal set ssid om te kijken wat werkelijk je ssid is (in mijn geval korte osx het af naar Xen terwijl het Xen Apple Network is.)
Shares
profilename
en je custom growl texten aanpassen.
-- PREP SSID DETECTION set SSID to do shell script "/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | awk '/ SSID: / {print $2}'" -- IF NETWORK IS HOME if SSID is "Xen" then -- MOUNT DRIVE tell application "Finder" try mount volume "smb://*.*.*.100/Films" mount volume "smb://*.*.*.100/Apps" mount volume "smb://*.*.*.100/Series" mount volume "smb://*.*.*.100/transmission" mount volume "smb://*.*.*.100/Downloads" end try end tell -- SET RESULT VAR TO "WIN" set endresult to "win" -- ELSE else -- DO NOTHING -- SET RESULT VAR TO "FAIL" set endresult to "fail" -- END end if -- START GROWL tell application "Growl" set the allNotificationsList to ¬ {"Win", "Fail"} set the enabledNotificationsList to ¬ {"Win", "Fail"} -- REGISTER GROWL register as application ¬ "Mount Elements" all notifications allNotificationsList ¬ default notifications enabledNotificationsList ¬ -- NOTIFY GROWL if endresult = "win" then -- NOTIFY WIN notify with name ¬ "Win" title ¬ "Diskstation Drives Now Available" description ¬ "Drive mount successful" application name ¬ "Mount Elements" image from location ¬ "file:///Users/profilename/Documents/Scripts/airdisk.png" -- (just a local image of Mac OS X's "Airdisk") else if endresult = "fail" then -- NOTIFY FAIL notify with name ¬ "Fail" title ¬ "Xen Apple Network Not Detected" description ¬ "Unable to mount network drive" application name ¬ "Mount Elements" icon of application "AirPort Utility.app" end if -- END GROWL end tell -- EPIC WIN |
[ Voor 7% gewijzigd door Verwijderd op 29-03-2013 13:55 ]