• 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
Fwd: Quit app and retarget
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Quit app and retarget


  • Subject: Fwd: Quit app and retarget
  • From: "email@hidden" <email@hidden>
  • Date: Fri, 16 Apr 2010 14:07:12 +0100

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

  • Prev by Date: Quit app and retarget
  • Next by Date: OSAScript class reference
  • Previous by thread: Quit app and retarget
  • Next by thread: Re: Quit app and retarget
  • Index(es):
    • Date
    • Thread