PDA

View Full Version : AppleScript Help




krohde
Mar 18, 2003, 06:49 PM
I have just installed SonyEricsson Clicker and bought it as well because it is just brilliant. I am not very familiar with apple scripting at all so i was wondering if someone could write me a script that will tell the computer to:

- go to sleep
- shutdown (not a forced shutdown!)

And if someone is willing maybe they could write some scripts for RealOne Player as well that will allow me to:

- open the program
- play/pause
- stop

Thanks for your help guys. If someone does actually write these scripts I will send them on to the developer of SEC and tell him to write in the credits your name.

Thanks



FatTony
Mar 19, 2003, 08:38 PM
You can just copy and paste this stuff into the script editor app. Then save as a complied script or application. If you need a more comlicated script with error checking, I might still be able to help...it would just take me some time.

- go to sleep
tell application "Finder"
sleep
end tell

- shutdown
tell application "Finder"
shut down
end tell

- open the program
tell application "RealOne Player"
activate
end tell

- play/pause
tell application "RealOne Player"
activate
if (GetPlayingState) = "paused" then Play
if (GetPlayingState) = "playing" then Pause
end tell

- stop
tell application "RealOne Player"
activate
stop
end tell

krohde
Mar 20, 2003, 05:06 PM
Thanks a lot man. i really appreciate it.


Ken