• 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: tell application to my_function()?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tell application to my_function()?


  • Subject: Re: tell application to my_function()?
  • From: Matthew Bogosian <email@hidden>
  • Date: Thu, 28 Apr 2005 11:19:06 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Unfortunately, this happens even if I use a subroutine with no arguments:

AppleScript Studio application "my_app":

	on test()
		log "foo"
	end test

	on launched the_app
		test()
	end launched

Script:

	try
		tell application "my_app" to test()
	on error err
		log err
	end try

	tell application "my_app" to quit

When I start my_app, "foo" prints on the Run Log. When I run the script, the error message "Can't continue test." is printed to the log, and then my_app quits (so the second tell is working).

What does "Can't continue XXX." mean? It's a little vague compared to what I'm used to in every other programming/scripting language I've ever used. Is there an equivalent to a stack trace or errno in AppleScript? Any place I can get more useful information?

Any ideas? Any help is very much appreciated.

	-- Matt


On Apr 28, 2005, at 10:30, Paul F. Henegan wrote:

on 28.04.2005 03:00, Matthew Bogosian at email@hidden wrote:

I have an application called "my_app" that
I'm writing in AppleScript using AppleScript Studio. It has a
subroutine showWeb(a_url) (a_url is a string).

I'm writing another script to try to call my_app's showWeb(...)
subroutine. Here's what I'm doing in the second script:

tell application "my_app"
set web_window to window "WebWindow"
tell web_window to set alpha value to 0.5
tell web_window to show
showWeb("http://www.apple.com/";)
end tell

Unfortunately, when I try to run the secondary script, it keeps
presenting the error: "Can't continue showWeb." (the other commands
work fine). Incidentally, showWeb(...) calls other subroutines defined in my_app (if that makes a difference).

Try assigning the value to a variable, such as:

set the_URL to "http://www.apple.com/";
showWeb(the_URL)

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (Darwin)

iD8DBQFCcSkgnLpDzL5I7l8RArRaAJsEFf0JIAMny0i17MQpZDF4mdL72ACfQ5Ms
Zn00NqDTd0lMq1Ad6gzem+I=
=fekB
-----END PGP SIGNATURE-----

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


  • Follow-Ups:
    • Re: tell application to my_function()?
      • From: "Paul F. Henegan" <email@hidden>
  • Prev by Date: Another Keynote-like dictionary
  • Next by Date: sync APPLE WORKS DATABASE AND PALM os database
  • Previous by thread: Re: tell application to my_function()?
  • Next by thread: Re: tell application to my_function()?
  • Index(es):
    • Date
    • Thread