-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWork Mode.scpt
64 lines (55 loc) · 1.76 KB
/
Work Mode.scpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--==============
--turn Growl Off
--==============
tell application "System Events"
set isRunning_Growl to (count of (every process whose name is "GrowlHelperApp")) > 0
end tell
if isRunning_Growl then
tell application "GrowlHelperApp"
set the allNotificationsList to {"Growl Toggler"}
register as application "Growl Toggler" all notifications allNotificationsList default notifications allNotificationsList
notify with name "Growl Toggler" title "Notifications OFF" description "" application name "Growl Toggler" icon of application "Automator"
end tell
delay (2)
tell application "GrowlHelperApp" to quit
end if
--==============
--Minimize Firefox
--==============
tell application "Firefox"
-- Bring Firefox to the front.
activate
-- Use Sysem Events to mimick pressing "m" and the Command key together.
tell application "System Events" to keystroke "m" using command down
end tell
--==============
--Open timeEdition and Backdrop
--==============
tell application "timeEdition" to launch
tell application "Backdrop" to launch
--==============
--Set Adium to Studying
--==============
-- set to away
set theMessage to "Studying"
tell application "Adium"
repeat with theAccount in accounts
set theStatus to status type of status of theAccount
(*
set theTitle to title of theAccount
set theDebugMessage to "Account: " & theTitle & " Status: " & (theStatus as string)
tell application "Finder" to display dialog theDebugMessage
*)
if (theStatus is available) then
go away theAccount with message theMessage
else if (theStatus is away) then
go available theAccount with message theMessage
end if
end repeat
end tell
--==============
--Hide Dock
--==============
tell application "System Events"
keystroke "d" using {command down, option down}
end tell