Common writable folders
Jim Ault
JimAultWins at yahoo.com
Thu Jan 18 15:10:50 EST 2007
On 1/18/07 11:41 AM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
> Thanks. It's the space in "Application Support" that is causing the
> trouble. I ran it in the Applescript editor and it really doesn't like
> my file path. If I use slashes, it complains and won't compile. If I use
> colons, it puts out two errors:
>
> No such file or directory ":Library:Application:"
> No such file or directory "Support:myFolder:"
>
> Blech.
You might try the form:
alias "path:folder:file" -- in quotes for Applescript syntax
------- test 1 ------------------
In the script editor, do a new script one-liner
set daFile to choose file "Please make your click count"
You will see the result is the form the AScript likes
------- test 2 ------------------
To do this from a Rev script
put quote into q
answer file "Make it count"
if it is empty then exit to top
put revMacFromUnixPath(it) into FName
get "tell application "&q&"Finder"&q &cr
get it &"return the modification date of alias "
get it & q&FName&q &cr
get it & "end tell"
do (it) as AppleScript
On 1/18/07 11:41 AM, "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
> Chris Sheffield wrote:
>>
>> On Jan 18, 2007, at 11:35 AM, J. Landman Gay wrote:
>>
>>> Where are you indicating it should be executed as applescript?
>>>
>>> Could I see a sample of your entire command sequence? The above isn't
>>> accepted by Rev as-is.
>>
>>
>> Oops, sorry about that. I do have it set to run as applescript. I just
>> forgot to add that in my email. So my whole line of code, without
>> putting the command in a variable, would be something like:
>>
>> do "do shell script" && quote & "chmod 755 /myfolder/myfile" & quote &&
>> "with administrator privileges" as AppleScript
>>
>>
>> As I said before, I'm doing this on a single file, not on a folder. And
>> my path does not contain any spaces.
>
> Thanks. It's the space in "Application Support" that is causing the
> trouble. I ran it in the Applescript editor and it really doesn't like
> my file path. If I use slashes, it complains and won't compile. If I use
> colons, it puts out two errors:
>
> No such file or directory ":Library:Application:"
> No such file or directory "Support:myFolder:"
>
> Blech.
More information about the use-livecode
mailing list