Article View: adobe.scripting.indesign
Article #861[Applescript CS2] Problem with link status result (runtime vs script)
From: Shane_Stanley
Date: Thu, 26 Feb 2009 22:51
Date: Thu, 26 Feb 2009 22:51
37 lines
2477 bytes
2477 bytes
On 27/2/09 9:19 AM, "EricGagnon" <member@adobeforums.com> wrote: > I have this problem where the link status is reported appropriately when i > execute the script throught the script editor (or Applescript Debugger) but > give a different result at runtime (when compiled/run as application or > embeded in a Realbasic application). That's because AppleScript doesn't load ID's dictionary at runtime. When you do it in an editor, the editor translates back and forth between the raw codes and the terminology you use to write scripts, but that doen't happen with a compiled app. > > In the script, i do a simple "as string" on the link status. > > I get results like "'constant *****lmbd". Exactly. > > I have tried to catch the value more directly: > By exemple instead of tStatus= status of link.. (as string) > I have done something like: > if status of link = normal then > tLogStatus="normal" > end if > > Doesnt work. It should. Try this: set theStatus to status of link x -- so you only get it once if theStatus = normal then set thestatus to "normal" else if... -- Shane Stanley <sstanley@myriad-com.com.au> AppleScript Pro Sessions <http://scriptingmatters.com/aspro>
Technical Details
Message-ID:
<C5CD6834.4EF93%sstanley@myriad-com.com.au>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,ad22739ba656ab84,start X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Shane_Stanley@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: [Applescript CS2] Problem with link status result (runtime vs script) Message-ID: <C5CD6834.4EF93%sstanley@myriad-com.com.au> Date: Thu, 26 Feb 2009 14:51:48 -0800 Lines: 45 Received: from outbound.icp-qv1-irony-out3.iinet.net.au [203.59.1.148] by adobeforums.com; Thu, 26 Feb 2009 14:52:25 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsAAOKrpkl8qAjL/2dsb2JhbAAI2HmEEQY X-IronPort-AV: E=Sophos;i="4.38,273,1233500400"; d="scan'208";a="394760448" Received: from unknown (HELO [10.1.1.4]) ([124.168.8.203]) by outbound.icp-qv1-irony-out3.iinet.net.au with ESMTP; 27 Feb 2009 07:51:51 +0900 User-Agent: Microsoft-Entourage/12.15.0.081119 Thread-Topic: [Applescript CS2] Problem with link status result (runtime vs script) Thread-Index: AcmYZM4tTdqJjPjGiEOEtlTK1XZN/Q== MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit