Hello,
I have a very frustrating issue. I enter this as my script:
try set fpath to posix file "/private/tmp/p.txt" set f to open for access file fpath set r to read f close access f display dialog r end try
When I run this script by itself it works.
If I copy and paste that into a folder action it does not run. Below:
on adding folder items to this_folder after receiving added_item try do shell script "command > /private/tmp/p.txt" try set fpath to file "Macintosh HD:private:tmp:p.txt" set f to open for access file fpath set r to read f close access f display dialog r end try end try end adding folder items to
Any reason why this wouldn't work?
Also interesting is that it doesn't work if I change the 'display dialog r' to 'display dialog " " & r'. In the script editor the path to the file also changes font ever so slightly when I change that line and try to run it. ??? I really am baffled by this. I am pretty new to applescript, but I have never experienced an issue like this in other languages.
Thank you,
|