Fwd: Quit app and retarget
Fwd: Quit app and retarget
On 16 Apr 2010, at 10:35, email@hidden wrote:
> The following script fails with Xcode got an error if Xcode is already running: Connection is invalid.
> Presumably this is because I quit xcode and then retarget.
>
> Is there a way to structure the AS syntax to make this work?
>
> Workarounds would presumably include GUI scripting using System Events.
>
> tell application "Xcode" to quit
>
fix is to insert here: delay 1
A simple "delay 1" is enough to enable a reconnection.
In my running code I had commented out the bump script during testing to avoid unnecessary bumps.
Hence there was no real delay between the tell blocks.
Is this purely and simply a timing issue or does the delay call allow the process to clean up the connection ref.
A delay of 0 fails to re-enable the connection.
> --
> -- bump the project version
> --
> set bumpScript to "cd " & myPath & " ; agvtool bump -all"
> do shell script bumpScript
>
> tell application "Xcode"
>
> --
> -- load our project, target and then build
> -
> -
> end tell
>
>
> Regards
>
> Jonathan Mitchell
>
> Developer
> http://www.mugginsoft.com
_______________________________________________
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