AppleScript Help

Discussion in 'Mac Help/Tips' started by krohde, Mar 18, 2003.

  1. krohde macrumors member

    Joined:
    May 29, 2002
    Location:
    Europe, UK
    #1
    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
     
  2. FatTony macrumors regular

    Joined:
    Jul 17, 2002
    #2
    Re: AppleScript Help

    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
     
  3. krohde thread starter macrumors member

    Joined:
    May 29, 2002
    Location:
    Europe, UK
    #3
    Thanks a lot man. i really appreciate it.


    Ken
     

Share This Page