Definig variable "when"

Discussion in 'Mac Programming' started by Keytachi, Sep 25, 2006.

  1. macrumors regular

    Joined:
    Sep 14, 2006
    #1
    how do i do that? i want to (for e.g.) make a script so when i open safari it opens the dashboar so i can see what download speed i have, but whenever i try to put that in a scrit its says: vairable "when" is not defined
    how do i define it!!
    thx alot to those who helped
     
  2. macrumors 6502

    Joined:
    Sep 15, 2006
    #2
    I'm not certain that what you propose is possible, as a "when" statement is more or less an if used in a dynamic context - such as cron script.

    However you can do this a lot easier

    Make a new script using the following instead:

    Code:
    tell application "application 1" to activate
    tell application "application 2" to activate
    name the script to say app 1 and use the same graphic, place it in the dock.
    Complete.
     
  3. ATG
    macrumors regular

    Joined:
    Aug 7, 2005
    #3
    so you'd get:
    Code:
    tell application "Safari" to activate
    tell application "Dashboard" to activate
    Compile and save as an app. Paste the safari icon onto the new app and put it in your dock :)
     

Share This Page