• 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: Close the script window in the Script Editor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Close the script window in the Script Editor


  • Subject: Re: Close the script window in the Script Editor
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 6 Oct 2008 19:24:58 +0200

Le 5 oct. 08 à 17:52, Emile Schwarz a écrit :

Hi all,

as it happens sometimes, asking a question lead in some alternate answers. I get this after some readings (The it and me Kkeywords, page 40) that make my brain working and getting a solution: get the window id at the beg of the script and use the reference to close the window. In the prior tries, I really have one window closed, but I didn't realized 'till I needed it!

I reply to my own question: [but the trick does not work :( ]

before the first tell statement line:

-- Get a reference to this window [in order to close it later]
set RefThisWindow to front window


before the main end tell statement line: -- close me, I am now useless! close RefThisWindow saving ask

and I get an error: unable to close this script while it is running (translated from French)...

Hello Emile,

Perhaps are you looking for something like this:

	tell application "Script Editor"

		set D to open alias "Disk:folder:somescript.scpt"

		execute D

		close D

	end tell

This will at least avoid to have the script trying to close itself...

HTH,
Axel _______________________________________________
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: 
 >Close the script window in the Script Editor (From: Emile Schwarz <email@hidden>)
 >Re: Close the script window in the Script Editor (From: Emile Schwarz <email@hidden>)

  • Prev by Date: Re: Quicktime get info
  • Next by Date: Can the AppleScript implementation of an AS application be exposed via terminology?
  • Previous by thread: Re: Close the script window in the Script Editor
  • Next by thread: Quicktime get info
  • Index(es):
    • Date
    • Thread