• 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: How to "Tell" a varible name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to "Tell" a varible name


  • Subject: Re: How to "Tell" a varible name
  • From: Angie Ahl <email@hidden>
  • Date: Wed, 7 Feb 2001 17:02:25 +0000

I don't know if this helps but I've had loads of fun with this tell technique in the past.

When you target an application with its name (as in example 2) the applescript is checked against the applications dictionary, so it checks to see that webstar understands each of the instructions when it compiles.

with the tell by variable technique it can't check the instructions against the dictionary as it doesn't yet know what application will be dealing with it, so it checks against the application that telling the variable (lost I was) in this case the finder.

This may or may not be the problem, I'm still a newbie myself, but I got around these problems by using the apple event instead.

Check out the tell by variable tips at the applescriptsource book

http://www.applescriptsourcebook.com/tips/tellbyvariable.html

Most excellent...

THANKS MR CHEESMAN,


<start shameless request for beta people>
now of to finish our first piece of shareware driven by a Filemaker runtime and applescript, going into beta if anyone wants to join the fun.... It's for managing far too many links :-)
http://www.vertebrate.co.uk/linkmachine/download.html
<end shameless request for beta people>


HTH

Angie



I am having problems getting a simple "Tell application" task to work using a variable Tell target. Sorry if this has come up before...

For example, this issues no error but fails to work properly

tell application "Finder"
get name of (the first process whose creator type is "WWW")
end tell

set WebStar to result as text
Display dialog Webstar
--> Webstar 4.4b2
tell application WebStar
Display dialog "Inside Tell" -- To see if we actually get into the Tell
--> Inside Tell

Do stuff
-- Fails to do stuff, no error messages

on error errMsg number errNum
error number errNum
end tell

While this works as expected, again without errors

tell application "Webstar 4.4b2"
Display dialog "Inside Tell"
--> Inside Tell

Do stuff
-- Does stuff just fine

on error errMsg number errNum
error number errNum
end tell

Could this be a Webstar problem, or am I making an applescripting error?

Thank you for any guidance,

Richard
_______________________________________________
applescript-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/applescript-users


  • Follow-Ups:
    • Re: How to "Tell" a varible name
      • From: Emmanuel <email@hidden>
References: 
 >How to "Tell" a varible name (From: SeaSoft Systems <email@hidden>)

  • Prev by Date: Scripting behind At Ease?
  • Next by Date: Re: Metamorphosax! (revisited)
  • Previous by thread: How to "Tell" a varible name
  • Next by thread: Re: How to "Tell" a varible name
  • Index(es):
    • Date
    • Thread