• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: To Run or Not To Run. That is the Question.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: To Run or Not To Run. That is the Question.


  • Subject: Re: To Run or Not To Run. That is the Question.
  • From: Yvan KOENIG <email@hidden>
  • Date: Wed, 04 Mar 2015 14:28:10 +0100


Le 04/03/2015 à 14:02, S. J. Cunningham <email@hidden> a écrit :

And the answer is....

You have to launch, then run it.  You can't just run it.  Or just activate it.

https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_about_handlers.html#//apple_ref/doc/uid/TP40000983-CH206-SW17

Voodoo.

According to the documentation, I tried to use this code:

launch application "script"
run application "script"


English is not my native language so, as I was not sure that I understood well your sentence 
You have to launch, then run it.  You can't just run it.  Or just activate it.
I tried also :
launch application "script"
activate application "script"

With this last attempt, the app's icon bounced in the Dock (whose behavior was temporarily modified) but the dialog didn't appear.

To be sure that the dialog was not behind a window, I edited the app itself as :

on run
tell application "SystemUIServer" to display dialog "Running"
end run

But got no more luck.

At last I tried with the code for lazy users :

activate application "script"

and it worked flawlessly.

Yvan KOENIG (VALLAURIS, France) mercredi 4 mars 2015 14:21:39




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >To Run or Not To Run. That is the Question. (From: "S. J. Cunningham" <email@hidden>)
 >Re: To Run or Not To Run. That is the Question. (From: "S. J. Cunningham" <email@hidden>)

  • Prev by Date: Re: To Run or Not To Run. That is the Question.
  • Next by Date: Re: launch command bug
  • Previous by thread: Re: To Run or Not To Run. That is the Question.
  • Next by thread: Re: launch command bug
  • Index(es):
    • Date
    • Thread