• 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
Script Editor making Classic Applications in Snow Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Script Editor making Classic Applications in Snow Leopard


  • Subject: Script Editor making Classic Applications in Snow Leopard
  • From: "Daniel Brieck Jr." <email@hidden>
  • Date: Mon, 18 Jan 2010 03:07:10 -0500

Hi all,

Below is a script that that scripts the AppleScript Editor to write a script that is an application.  This script ran fine on 10.5 and can be modified to run on 10.4 and 10.3. That aside this script complies and works as expected, and generates a AppleScript application script, however there is a problem. Mac OS X 10.6 Snow Leopard thinks that the script is a classic application. Double clicking the script in the Finder gives an error "You can't open the application SomeScript because the Classic environment is no longer supported." Also the icon is labeled with the gray no execute overlay, since the OS thinks the app is a classic app. Now if you take that crippled app that was just made and drop it on the AppleScript Editor app it opens and you can save it as an application, at which point it saves as expected with a correct icon and works when double clicked. I am not too sure whats  going on here. Can anyone get this script to work on Snow Leopard, without it making a classic application. I am not sure if  its just my syntax is bad / outdated or if there is a bug in the save Script Editor Suite. As far as the Dictionary goes my syntax should be valid, right?

Thanks,
Daniel J. Brieck Jr.

-------------------------

set NameOFConnect to "SomeScript"

AHandler(NameOFConnect)

on AHandler(NameOFConnect)

	set theResult to null

	--Open the application in stealth mode
	launch application "AppleScript Editor"

	tell application "AppleScript Editor"


		make new document
		set NewDocumemntName to result

		--Getting the accurate window name part from the document class
		set windowName to name of NewDocumemntName

		--make created window in-visible


		tell window windowName

			set visible to false

		end tell

		--Write some stuff to the script here.
		tell text of document windowName
			make new paragraph at paragraph 1 with data "say \"Hello
		\""


		end tell
		--Put up the save dialog box

		--Make sure the Script Editor is visible
		activate

		try
			choose file name with prompt "Confirm Name and specify a location" default name (NameOFConnect) default location the path to scripts folder from user domain
			set theResult to result
			save document windowName as "application" in theResult --with run only
		end try


		--close windows

		try
			close window (NameOFConnect)
		end try

		try
			close window (windowName)
		end try


	end tell

	return theResult

end AHandler

-----------------------------------------

Attachment: TestScripttxt.applescript
Description: Binary data







 _______________________________________________
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

  • Follow-Ups:
    • Re: Script Editor making Classic Applications in Snow Leopard
      • From: Thomas Fischer <email@hidden>
    • Re: Script Editor making Classic Applications in Snow Leopard
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: right click menu
  • Next by Date: Re: Script Editor making Classic Applications in Snow Leopard
  • Previous by thread: Re: right click menu
  • Next by thread: Re: Script Editor making Classic Applications in Snow Leopard
  • Index(es):
    • Date
    • Thread