View Full Version : Passing a variable to Applescript using FSCommand
04-13-2002, 08:08 PM
Hey guys... Im new to apple script, but Im making a script to copy images to a folder that it creates on the desktop. I want to pass the current image as a variable from flash to the applescript so it can save it there. Im doing this dynamically because I have like 300 pictures to choose from and I cant (or at least wouldnt like to) make a script file to copy each one. So pretty much I just want to know how to pass curImage to the Applescript.
This is what I have so far:
tell the application "Finder"
if exists folder "Test Folder" of desktop then
set imgTarget to folder "Test Folder" of desktop
make new folder
tell the result to set its name to "Test Folder"
set imgTarget to folder result
Any help would be appreciated,
04-14-2002, 09:42 PM
Somones got to know!
I opened a topic on this subject at Apple.com's board also. No luck there yet either. Heres the link:
04-16-2002, 11:25 AM
I want to know the same, hoe do i pass variables to my applescript?
04-16-2002, 02:12 PM
Come on! Theres got to be a MAC-Genius out there somewhere!
04-16-2002, 02:40 PM
What I am doing, as you can see with the Flash code, is executing a command in Flash to run an outside program. With a PC you can also send along all sorts of parameters. I want to send a parameter to the applescript.
Like maybe this (At least this is how you would do it if it worked like a PC):
fscommand ("exec", ":images:picCopier.asc\image32.jpg");
set %1 to curImage
tell the applicati........
some PC examples for clarification:
04-16-2002, 03:01 PM
did you get it to work, post your samples
04-16-2002, 07:52 PM
No I havent gotten it to work. I dont know the syntax or even if its possible. But you should be able to do everything with a MAC that you can do with a PC right!! :eek: Please someone help!
Thanks a ton,
04-17-2002, 06:41 AM
I read on another forum, think were-here that the applescript is a hardcoded file, you can't pass variables to it, so for each time you want to use the applescript, you have to have a different one for each different thing you want to do from flash. You put the applescript in an fscommand folder.
I am going to put my mac projector in a html file, this is the easiest way to pass variables, then you can use the browser....
I'm not to clear about the point yet, but nobody can assist me...
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.