0 Replies Latest reply on Feb 26, 2009 2:51 PM by sstanleyau

    [Applescript CS2] Problem with link status result (runtime vs script)

    sstanleyau Level 4
      On 27/2/09 9:19 AM, "EricGagnon" <member@adobeforums.com> wrote:<br /><br />>   I have this problem where the link status is reported appropriately when i<br />> execute the script throught the script editor (or Applescript Debugger) but<br />> give a different result at runtime (when compiled/run as application or<br />> embeded in a Realbasic application).<br /><br />That's because AppleScript doesn't load ID's dictionary at runtime. When you<br />do it in an editor, the editor translates back and forth between the raw<br />codes and the terminology you use to write scripts, but that doen't happen<br />with a compiled app.<br />> <br />>  In the script, i do a simple "as string" on the link status.<br />> <br />>  I get results like "'constant *****lmbd".<br /><br />Exactly.<br />> <br />>  I have tried to catch the value more directly:<br />>   By exemple instead of tStatus= status of link.. (as string)<br />>   I have done something like:<br />>       if status of link = normal then<br />>           tLogStatus="normal"<br />>       end if <br />> <br />>  Doesnt work. <br /><br />It should. Try this:<br /><br />set theStatus to status of link x -- so you only get it once<br />if theStatus = normal then<br />set thestatus to "normal"<br />else if...<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au><br />AppleScript Pro Sessions <a href=http://scriptingmatters.com/aspro>