RE: Issue with AS variable in OS 10.2
RE: Issue with AS variable in OS 10.2
- Subject: RE: Issue with AS variable in OS 10.2
- From: "Francois Houle" <email@hidden>
- Date: Thu, 24 Mar 2005 11:39:09 -0500
- Thread-topic: Issue with AS variable in OS 10.2
Based on what both replies suggested here are my findings:
1. Just modifying the do shell script as Paul suggested did not work
2. Because of what Axel suggested I tryed to simply type in "set folder_size to 123" and I still got the same error back stating that the variable is not defined. No other value returned a valid variable...
I'm realy wondering what's up now. Any other ideas ?
PS: The sed command does leave trailing spaces but as we can see above, that was not the issue
François Houle
Customer Support ( IT Help Desk)
IST Customer Services (ICS)
McGill University
514-398-4400 ext 04528
email@hidden
-----------------------------------------------------------------
For IT support, contact email@hidden
514-398-3398
-----Original Message-----
From: applescript-users-bounces+francois.houle=email@hidden [mailto:applescript-users-bounces+francois.houle=email@hidden] On Behalf Of Axel Luttgens
Sent: Thursday, March 24, 2005 10:33 AM
To: AppleScript Users
Subject: Re: Issue with AS variable in OS 10.2
francois.houle wrote:
>Hi all,
>
>I have a script that I originally setup in panther, but also wanted to
>have it work on 10.2. So since it basically was setting a variable to
>the result of a "do shell scrip", I thought it would be rather easy...
>So I modified the command and tested it in the Terminal... Works
>beautifully and gives me what I want as a result in the terminal...
>However, the moment I out it in the AS as following
>
>set the folder_size to do shell script "du -s /Volumes/servername | sed
>s'=/Volumes/servername=='"
>if folder_size is greater than 0 then
>blablabla
>end if
>
>When I attempt to run the script in 10.2.8 it automatically returns
>that the variable folder_size is not defined... It does compile
>properly and run properly in the terminal... Also works properly in
>Panther... Anyone have an idea why 10.2 doesn't ? Are there differences
>which I have not forseen betwen 10.2 and 10.3 when setting variables ?
>I can't see any in the dictionaries...
>
>
>Frank
>
>
I just launched a 10.2.8 here and ran your script, almost unchanged, in SE.
No problem encountered...
It seems we need some more information.
Could you try again, with the event log window opened, and post the log?
Axel
As a side-note: your 'sed' command leaves spaces after the digits.
Moreover, the comparison 'is greater than' is performed on strings, not on numbers; this may lead to problems because, for example, "1000000" < "9"!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden