• 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: Call a handler from applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Call a handler from applescript


  • Subject: Re: Call a handler from applescript
  • From: Yan Wong <email@hidden>
  • Date: Fri, 30 Jan 2004 20:14:27 +0000

Paul Berkowitz <email@hidden> wrote

On 1/30/04 5:27 AM, "Walter Ian Kaye" <email@hidden> wrote:
Hmm. It works for "regular" applets made by Script Editor.
Maybe AS Studio apps require a different technique?

This isn't a Studio application, I don't think. It's an applet. The problem
derives from the fact that all applets have the same creator code "aplt",
rather than a unique creator code such as commercial application have. Your
system does not know 'application "Signal"' and probably picked some other
applet on Yan's computer, which does not have a my_signal handler.

No, it is an Applescript Studio application (well, written in XCode actually)

If this is just for your own use, just hardcode the full path to the applet
in:

This is what I did exactly:

1) created a new applescript studio application in XCode called "test2".
2) placed the following code in test2.applescript:

on my_signal(txt)
display dialog txt
return 0
end my_signal

3) changed the signature of the target executable to "SHSC" (it could have been anything)

4) compiled it and moved the test2.app application in the build folder to /Applications

5) Opened script editor, and pasted the following code in

tell application "MyDisk:Applications:test2.app:" to activate
tell application "MyDisk:Applications:test2.app:" to my_signal("hello")

----
When run, this applescript opens the "test2" application, then produces the error:
test2 got an error: Can't continue my_signal.

So what am I doing wrong?

Yan
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Call a handler from applescript
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Interface builder question
  • Next by Date: Re: Illustrator has placed images that need to be embedded
  • Previous by thread: Re: Applescript and email harvesting
  • Next by thread: Re: Call a handler from applescript
  • Index(es):
    • Date
    • Thread