Re: How to "Tell" a varible name (solved??)
Re: How to "Tell" a varible name (solved??)
- Subject: Re: How to "Tell" a varible name (solved??)
- From: Jolly Roger <email@hidden>
- Date: Wed, 07 Feb 2001 18:20:47 -0600
- Replyto: email@hidden
on 2/7/2001 5:23 PM, SeaSoft Systems (email@hidden) wrote:
>
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.
Richard,
Try changing "class" to "property" above. If that lets it compile, then I
have seen this before.
Here's a real live example. SoundJam has this problem. Here is a snippet
from a script I wrote that uses the raw code method to control SoundJam:
if gMediaPlayerCreator is "SCPL" then -- Media Player = SoundApp
tell gMediaPlayer
set +class STAT; to +constant SEstSTOP;
-- set +property stat; to +constant SEstSTOP;
-- ^^^^^^^^^^
-- you'll need to change this EACH TIME YOU COMPILE!
end tell
end if
When you change "class" to "property" the script will compile; but
AppleScript will change the word "property" to "class". The next time you
want to compile the script, you have to again change "class" to "property"
before the script will compile. What a pain!
Can someone tell me why this happens? Is it the fault of SoundJam, or is it
an AppleScript problem? Chris?
JR