Re: How to "Tell" a varible name
Re: How to "Tell" a varible name
- Subject: Re: How to "Tell" a varible name
- From: SeaSoft Systems <email@hidden>
- Date: Wed, 7 Feb 2001 15:23:10 -0800
At 13:04 -0800 2/7/2001, Emmanuel wrote:
I am having problems getting a simple "Tell application" task to
work using a variable Tell target. Sorry if this has come up
before...
There is a section about this fundamental matter in Smile's help (which, I
think, is available on T&B's site <http://www.tandb.com;au/smile/>). Open
Smile's help, go to "the Tell menu", then to "Linking a window to an app"
(OOTTOMH).
This was very informative, as was Angie Ahl's reference to The
Applescript Sourcebook.
The "Raw codes" method looked like it should work, so I tried it,
using Smile to get the codes. The problematic source script snippet
was
=======================================
set realmslist to "some text"
tell application "Finder"
set WebStar to (the first process whose creator type is "WWW") as text
end tell
tell application WebStar
try
set realms to realmslist
on error
end try
end tell
=======================================
This compiles without problem and the raw code translation is found to be:
=======================================
set realmslist to "some text"
tell application "Finder"
set WebStar to (the first process whose creator type is "WWW") as text
end tell
tell application WebStar
try
set <<class Prlm>> to realmslist
on error
end try
end tell
=======================================
Now the snippet will not compile but gives an error message:
Can't set <<class Prlm>> to realmslist
Access not allowed.
When "WebStar 4.4b2" is a running process, this also fails to compile:
=======================================
set realmslist to "some text"
tell application "WebStar 4.4b2"
try
set <<class Prlm>> to realmslist
on error
end try
end tell
=======================================
This all looks so promising, but now I am stumped again.
Thanks for all the help so far,
Richard