Re: stay running
Re: stay running
- Subject: Re: stay running
- From: Luther Fuller <email@hidden>
- Date: Sat, 09 Apr 2011 15:50:39 -0500
On Apr 9, 2011, at 3:10 PM, louie wrote: I know that there is a check box to make a script stay running when saving the script. I have a script that produces a script. Is there a way in code to make a script stay running?
Are you writing your script to a text file to be compiled by AppleScript Editor? If so, AppleScript Editor is scriptable and you can do this ...
set sourceName to (displayed name of sourceRef) as text -- tell application "AppleScript Editor" launch open sourceRef -- an alias to the text file containing your new script if not (exists document sourceName) then -- error "The source file could not be opened because it is not editable." end if set docRef to a reference to first document -- a reference to your new script if |stayOpen| of projectParams then save docRef in objectRef as filetype with run only and stay open without startup screen else save docRef in objectRef as filetype with run only without stay open and startup screen end if close docRef end tell
|
_______________________________________________
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