|
-
i'm well aware of the faq and question number 5, "How do I open a document with a FS Command?" it works great.
my question is this.
can that applescript be altered to be more flexible?
for the pc, i was able to download this totally sweet bat file. all i have to do is type in the directory and file name and it'll open any file type [pdf, doc, ppt, mov]
here's the flash code to accompany that runme.bat file
fscommand ("exec", "runme.bat\tdirectory/filename.ext");
here's the code in the bat
@echo off
rem Batch file to enable flash to call external files
rem produced by 2heads - http://www.2heads.tv
start %2 %1
can the applescript be changed to mimic this wonderful bat on a mac? you see, i have approx. 30 files to launch from this projector. I'd really hate to create 30 applescripts and have them clutter the window.
thanks in advance.
-
Senior Member
It's not applescript that's the problem. It's easily capable of doing what you ask, its that there is no way to pass the variable from flash to applescript,
so you can't specify which file to open...
-
thanks for the heads-up, but how is what i'm asking possible if a variable can't be passed through the applescript?
i refuse to believe that it's impossible [i'm too pig-headed]
i'm a bit confused. if you know the actionscript or applescript please clue me in. i'm a designer, not a programmer. i'm totally illiterate when it comes to this stuff.
-
Senior Member
Well basically it goes something like this;
The only way to pass variables out of Flash 5 is via HTTP (with get URL) so in order to be able to capture those variables you need to be running an http server which can interpret http headers and pass on the info to a CGI script (which could be an applescript for example, but are more commonly written in perl).
In other words, unless you're willing to write a small http server which you autorun so that it will parse the http headers and pass on the variable to an applscript, as far as i know it can't be done.
The only other thing i can think of is the xml object. I'm not entirely sure how flash passes out xml arguments (probably via http as well, as it's inteded for serverside) but it's a vague possibilitiy. Problem is, how flash passes xml to applescript...anyone know (Gerbs? me2222?)
-
this project is a standalone application. it'll be running of a cr-rom, calling files [doc's, ppt's, and pdf's] to open that are also on the cdrom.
does this information affect your answer?
-
Senior Member
It makes it worse.
running an http server just to open a word document is bad enough, running one of a cd is even worse.
I'm still looking into the xml possibility, but don't count on anything any time soon.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|