• 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
Compiled AppleScript app won't do anything.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiled AppleScript app won't do anything.


  • Subject: Compiled AppleScript app won't do anything.
  • From: G S <email@hidden>
  • Date: Tue, 7 Sep 2010 23:47:23 -0700

Hi all.

There's no "Compile AppleScript" build phase anymore, so apparently
the thing to do is create a Cocoa-app target and include the script as
a source file.  I did that, and verified that the script is properly
recognized in the Xcode project as sourcecode.applescript.  There's
also a main.m file that's compiled in.  I'll paste both below.  The
app will launch, but it doesn't perform any of the actions in the
script.

What is it that I haven't done?

Thanks!

main.m
---------------------------

extern void ASKInitialize();
extern int NSApplicationMain(int argc, const char *argv[]);

int main(int argc, const char *argv[])
{
    ASKInitialize();
    return NSApplicationMain(argc, argv);
}


Application.applescript
------------------------------

display dialog "Gonna tell QuickTime to open the file in a minute."

on idle
	quit
end idle

on open of theFiles
	display dialog "Telling QuickTime to open the file."
	tell application "QuickTime Player"
		repeat with theFile in theFiles
			open theFile
		end repeat

		activate
	end tell

	quit
end open
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: objc runtime question
  • Next by Date: Re: IB question
  • Previous by thread: objc runtime question
  • Next by thread: What's the Path for includes needed by Precompiled headers in Xcode?
  • Index(es):
    • Date
    • Thread