• 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: Paths from my Mac, hidden, compiled into my script?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Paths from my Mac, hidden, compiled into my script?


  • Subject: Re: Paths from my Mac, hidden, compiled into my script?
  • From: "koenig.yvan" <email@hidden>
  • Date: Fri, 22 Nov 2013 21:00:40 +0100

Le 22/11/2013 à 20:51, Jerry Krinock <email@hidden> a écrit :

> I codesigned (“code”-“signed”) an AppleScript application (.app), zipped and uploaded it to my server.  The user downloaded it and reported to me that, at the point where it was supposed to create a directory on his desktop, it threw an error indicating that the directory “/Users/jk/Desktop/…” did not exist.  I am “jk”, and that is *my* Desktop.
>
> So, of course, I searched the script to see if I had left a hard-coded path in there.  No, I had not.
>
> Then I downloaded the script onto another Mac and, voila, reproduced the problem.  So I opened up the script in AppleScript Editor on that other Mac, added some log statements, ran, but the problem did not recur.  Furthermore it continued to work even after I removed the log statements and double-clicked the AppleScript .app in Finder.
>
> Breaking open the package and comparing it with a freshly-unzipped version of the download, I found that, in the edited app, the main.scpt file is about 20% smaller, and breaking the freshly-unzipped one open with a text editor, I find that the “/Users/jk/Desktop/…”, and other paths on my Mac, although they do not appear when viewing in AppleScript Editor, appear in there among the gibberish I see with the text editor.  Further tests indicate that this seems unrelated to codesigning (the code signature).
>
> This looks like a long slog.  Can anyone give me a head start?  What would cause this local information to be compiled into my script?  This is Mavericks.
>
> Thanks
>
> Jerry Krinock

My understanding is that your script saved some global values.
Try to encapsulate it in a  on Run … end run  block.
If it uses explicit globals or properties, clean them before quitting the script.


Yvan KOENIG (VALLAURIS, France) vendredi 22 novembre 2013 21:00:35






 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: Paths from my Mac, hidden, compiled into my script?
      • From: Håvard Graudo <email@hidden>
References: 
 >Paths from my Mac, hidden, compiled into my script? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Paths from my Mac, hidden, compiled into my script?
  • Next by Date: Re: Paths from my Mac, hidden, compiled into my script?
  • Previous by thread: Paths from my Mac, hidden, compiled into my script?
  • Next by thread: Re: Paths from my Mac, hidden, compiled into my script?
  • Index(es):
    • Date
    • Thread