AppDelegate.applescript
-- iTunes Switcher
--
-- Created by admini on 11/13/12.
-- Copyright (c) 2012 Bdaniels. No rights reserved.
--
script AppDelegate
property parent : class "NSObject"
on ButtonHandlerActivationOn_(sender)
tell application "iTunes" to quit
do shell script "/usr/bin/defaults write com.apple.iTunes StoreActivationMode -integer 1"
delay 1
do shell script "open -a itunes"
end ButtonHandlerActivationOn
on ButtonHandlerActivationOff_(sender)
tell application "iTunes" to quit
do shell script "/usr/bin/defaults write com.apple.iTunes StoreActivationMode -integer 0"
delay 1
do shell script "open -a itunes"
end ButtonHandlerActivationOff
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
end script
Here is a screen shot of the UI http://imgur.com/8xO9K4c
I would like to put a green light if the state is turned on. Any help on this would be great! There are two more buttons here, but I omitted them because I had "Too much code" in my post and stackoverflow would not let me post it.
Thanks in advance!