Definig variable "when"

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

  1. Keytachi macrumors regular

    Sep 14, 2006
    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. mufflon macrumors 6502

    Sep 15, 2006
    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:

    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.
  3. ATG macrumors regular

    Aug 7, 2005
    so you'd get:
    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