Currently Being ModeratedFeb 23, 2013 3:02 PM (in response to A.P.M. Wülfinghoff)
I have a natural question when reviewing your AppleScript. Are there language variants of AppleScript, and in particular, the use of localized (NL) tekst for the English text? Since this appears on the last line before the ignored statements, and is the only deviation from English in the entire AppleScript, I was just curious.
On further study, I think I answered that question.
Currently Being ModeratedFeb 23, 2013 3:09 PM (in response to VikingOSX)
I don't think there exist language variants of Applescript.
Tekst is Dutch for text, and as a non-English speaker I have the advantage of being able to use natural - to me -words in the script which express what they are and can be used, while the same word in English could be and in this case actually is a reserved word within Applescript.
By the way, for the convenience of the potential readers and contributors I already had translated most of the Dutch I used in the original version.
Currently Being ModeratedFeb 25, 2013 5:17 AM (in response to A.P.M. Wülfinghoff)
In your script, url_path is a string of characters in the form of a file system reference, not a path or a file system reference in itself.
I can't test this at the moment, but I think AppleScript Editor is doing some hidden coercion which doesn't happen when the script is run from FMP. You may need to force the coercion of url_path within the script.
How does this work:
tell application "Finder"
....... main script....
set the_folder to folder url_path -- this is the coercion
completely ignored, even the display etc. statements
move picture to the_folder
(There isn't any need to open the folder in order to move the files into it.)
Currently Being ModeratedFeb 25, 2013 6:42 AM (in response to HD)
Thanks for your comment.
You are right: url_path is not a real URL, its name is a remnant of an earlier version of the programme.
Your coercive statement boils in effect down to :
"set url_path to folder url_path"
I tried it out, but unfortunately it doesn't work.
Nevertheless, you set my mind on a new trail, I suspect that you are right in that some coercion is needed to force the script in the FMP environment.
Currently Being ModeratedFeb 25, 2013 7:52 AM (in response to A.P.M. Wülfinghoff)
open location is meant to open internet-scheme urls in the default browser. try open location "http://www.google.com" and see what happens. if you're just trying to open a folder in the Finder, say open folder the_folder.
Currently Being ModeratedFeb 28, 2013 5:22 PM (in response to twtwtw)
In case you are interested, the solution proved to be:
move contents of picture to url_path
The first line is optional, it really opens the folder.
[picture might be a reserved word, I used a Dutch equivalent]
It's a lucky guess, tho it took me hours to find it.
It beats me how I should have rationally reached this solution.