Re: compiled scripts
Re: compiled scripts
On Dec 23, 2010, at 3:07pm, tom wible wrote:
>> Here, after having ensured that main.app has correctly run once, I may move it all around (even across filesystems or on another box), copy it, delete the original, delete Hey.app, delete folder /DVR and its contents... and still have a fully working main.app.
>>
>> No need to ever locate Hey.app.
>
> that's what i thought would be the case: the property S : load script POSIX file P loads a copy & that's why the file's so big...
You are comparing apples and something that is not apples.
Axel is reporting that he RAN the script and had no problem (which is also what I suggested).
You are expecting the same result after COMPLILING, which clearly doesn't work.
>
>> The real question thus seems to be: what makes yours tvpi2email.app/tvpi2crontab.app pair differ from the above main.app/Hey.app pair?
Actually the real question is why not just take the extra step to run the script before distributing, rather than expect it to rely on undocumented behavior. Persistence of properties between runs is well documented.
>
> On Dec 23, 2010, at 3:00 PM, ed wrote:
>> However, if your script is an app, you could run the script locally and store the script object as a property and distribute that, but just compiling doesn't do it.
>
> i believe that's what's happening w/axel's example, but don't know why it isn't working in my case...
Yes, that is what's happening, and it's not working in your case because you are not running it. I'm not sure where you got the idea that a properties were persistent after compiling, but that's not in the documentation and that's not the case.
I also noticed that a file's size increases depending on the size of the loaded script in a property, and it does seem to be a short leap from there to the behavior you're hoping for, but it doesn't work that way and it's not designed to work that way.
This isn't even a bug, but it would be a reasonable feature request. (although I can think of a number of reasons to not execute the load script command on compile, which is what would have to happen to make it work the way you want).
>
> oh, well, once i got past the 1st hurdle (i just distributed the included script) another came up: tvpi2crontab loads a 3rd script, which also had 2 be distributed...
>
> then it wanted to know where VirtualDVHS.app was (called by the 3rd script, but not by the code in the 1st script)
>
> then it wanted iRed, which has nothing 2 do with email...i give up: a/s 4 the win: 6mb to run 13 lines;-}
> _______________________________________________
Actually, it sounds like you're script is running a lot more than 13 lines, it sounds like you're using 13 lines to call embedded and loaded scripts and those are much bigger.
What you're trying to do is very doable with appleScript, but you need to do it appleScript's way.
ES
_______________________________________________
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