Re: To Run or Not to Run
Re: To Run or Not to Run
- Subject: Re: To Run or Not to Run
- From: CYB <email@hidden>
- Date: Wed, 04 Mar 2015 18:07:31 -0600
- Thread-topic: To Run or Not to Run
Here on my mac 10.10.2 I run the script
tell application "Testapp"
run
end tell
Then I have the Testapp.app bouncing in the Dock, when I hit the icen I
have a message that say ³Press Run tu run this script or Quit to quit²
I hit the run button and then I get the dialog box ³Running² as expected
The Testapp.app is saved at the Desktop
Carlos Ysunza B.
El 01/01/04 0:00, "" <> escribió:
>
>MIME-version: 1.0
>Content-type: message/rfc822
>
>Date: Wed, 04 Mar 2015 12:30:54 +0100
>From: Yvan KOENIG <email@hidden>
>Subject: Re: To Run or Not To Run. That is the Question.
>In-reply-to: <email@hidden>
>To: liste AppleScript US <email@hidden>
>Message-id: <email@hidden>
>MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
>Content-type: multipart/alternative;
> boundary="Boundary_(ID_Eiz5sbtj6z4AOKu9RCqUbA)"
>Precedence: list
>Message: 1
>References: <email@hidden>
>List-Post: <mailto:email@hidden>
>
>
>--Boundary_(ID_Eiz5sbtj6z4AOKu9RCqUbA)
>Content-type: text/plain; charset=utf-8
>Content-transfer-encoding: quoted-printable
>
>
>> Le 04/03/2015 =C3=A0 03:42, S. J. Cunningham <email@hidden> a =
>=C3=A9crit :
>>=20
>> I have a simple script.app:
>>=20
>> on run {}
>> display dialog "Running"
>> end run
>>=20
>> Executing by double clicking from the Finder or by <tell application =
>"Finder" to open "script.app"> from another script displays "Running" =
>and then quits.
>>=20
>> However <tell application "script.app" to run> from another script =
>results in the error message:
>>=20
>> "script.app got an error: Can=E2=80=99t continue run."
>>=20
>> If I remove the "display dialog" I get the error message:
>>=20
>> "script.app got an error: Connection is invalid."
>>=20
>> What am I missing?
>
>Here, to run the app thru the Finder I was forced to use :
>
>set p2d to path to desktop as text
>tell application "Finder" to open (p2d & "Script.app") as alias
>
>
>When I inserted the instruction <tell application "Script.app" to run> =
>in a script, it compiled as
>tell application "script" to run
>
>When I ran this script under Yosemite, it did nothing more than sending =
>a beep.
>
>Yvan KOENIG (VALLAURIS, France) mercredi 4 mars 2015 12:30:33
>
>
>
>
>--Boundary_(ID_Eiz5sbtj6z4AOKu9RCqUbA)
>Content-type: text/html; charset=utf-8
>Content-transfer-encoding: quoted-printable
>
><html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
>charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
>-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
>class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div =
>class=3D"">Le 04/03/2015 =C3=A0 03:42, S. J. Cunningham <<a =
>href=3D"mailto:email@hidden" class=3D"">email@hidden</a>> =
>a =C3=A9crit :</div><br class=3D"Apple-interchange-newline"><div =
>class=3D"">I have a simple script.app:<br class=3D""><br class=3D"">on =
>run {}<br class=3D""><span class=3D"Apple-tab-span" =
>style=3D"white-space:pre"> </span>display dialog "Running"<br =
>class=3D"">end run<br class=3D""><br class=3D"">Executing by double =
>clicking from the Finder or by <tell application "Finder" to open =
>"script.app"> from another script displays "Running" and then =
>quits.<br class=3D""><br class=3D"">However <tell application =
>"script.app" to run> from another script results in the error =
>message:<br class=3D""><br class=3D""> =
> "script.app =
>got an error: Can=E2=80=99t continue run."<br class=3D""><br
>class=3D"">If=
> I remove the "display dialog" I get the error message:<br class=3D""><br
>=
>class=3D""> =
> "script.app =
>got an error: Connection is invalid."<br class=3D""><br class=3D"">What =
>am I missing?<br class=3D""></div></blockquote><br =
>class=3D""></div><div>Here, to run the app thru the Finder I was forced =
>to use :</div><div><br class=3D""></div><div><div style=3D"margin: 0px =
>0px 0px 20.3px; text-indent: -20.4px; font-family: 'Helvetica Neue';" =
>class=3D"">set<span style=3D"font-family: Verdana;" class=3D""> =
></span><span style=3D"font-family: Verdana; color: rgb(79, 143, 0);" =
>class=3D"">p2d</span><span style=3D"font-family: Verdana;" class=3D""> =
></span>to<span style=3D"font-family: Verdana;" class=3D""> </span><span =
>style=3D"text-decoration: underline ; font-variant-ligatures: =
>no-common-ligatures; color: #012fbe" class=3D"">path to</span><span =
>style=3D"font-family: Verdana;" class=3D""> </span><span =
>style=3D"font-variant-ligatures: no-common-ligatures; color: #5730be" =
>class=3D"">desktop</span><span style=3D"font-family: Verdana;"
>class=3D"">=
> </span><span style=3D"font-family: Verdana; color: rgb(1, 47, 190);" =
>class=3D"">as</span><span style=3D"font-family: Verdana;" class=3D""> =
></span><span style=3D"font-variant-ligatures: no-common-ligatures; =
>color: #0433ff" class=3D"">text</span></div><div style=3D"margin: 0px =
>0px 0px 20.3px; text-indent: -20.4px; font-family: Verdana;" =
>class=3D""><span style=3D"font-family: 'Helvetica Neue';" =
>class=3D"">tell</span> <span style=3D"font-family: 'Helvetica Neue'; =
>color: rgb(4, 51, 255);" class=3D"">application</span> "Finder" <span =
>style=3D"font-family: 'Helvetica Neue';" class=3D"">to</span> <span =
>style=3D"font-family: 'Helvetica Neue'; text-decoration: underline; =
>color: rgb(4, 51, 255);" class=3D"">open</span> (<span =
>style=3D"font-variant-ligatures: no-common-ligatures; color: #4f8f00" =
>class=3D"">p2d</span> & "Script.app") <span style=3D"font-family: =
>'Helvetica Neue';" class=3D"">as</span> <span style=3D"font-family: =
>'Helvetica Neue'; color: rgb(4, 51, 255);" =
>class=3D"">alias</span></div><div style=3D"margin: 0px 0px 0px 20.3px; =
>text-indent: -20.4px; font-family: Verdana;" class=3D""><span =
>style=3D"font-family: 'Helvetica Neue'; color: rgb(4, 51, 255);" =
>class=3D""><br class=3D""></span></div><div style=3D"margin: 0px 0px 0px =
>20.3px; text-indent: -20.4px; font-family: Verdana;" class=3D""><span =
>style=3D"font-family: 'Helvetica Neue'; color: rgb(4, 51, 255);" =
>class=3D""><br class=3D""></span></div></div>When I inserted the =
>instruction <tell application "Script.app" to run> in a =
>script, it compiled as<div class=3D""><div style=3D"margin: 0px;" =
>class=3D"">tell application "script" to run</div><div class=3D""><div =
>class=3D""><br class=3D""></div><div class=3D"">When I ran this script =
>under Yosemite, it did nothing more than sending a beep.</div><div =
>class=3D""><br class=3D""></div><div class=3D""><div style=3D"margin: =
>0px;" class=3D"">Yvan KOENIG (VALLAURIS, France) mercredi 4 mars 2015 =
>12:30:33</div></div><div style=3D"margin: 0px;" class=3D""><br =
>class=3D""></div><div style=3D"margin: 0px;" class=3D""><br =
>class=3D""></div><div class=3D""><br =
>class=3D""></div></div></div></body></html>=
>
>--Boundary_(ID_Eiz5sbtj6z4AOKu9RCqUbA)--
_______________________________________________
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