-
[RESOLVED] [Flash 8] Applescript not being called
Hi,
I've got a cross-platform CD which should open different PDFs. I've created AppleScript files to open the PDFs and when I open them by double-clicking they open the PDF as they should.
However, Flash seems to be not calling them. I'm using the following function:
function openPDF(which){
if (platform=="WIN"){
fscommand("exec", which + ".exe");
}else{
fscommand("exec", which);
}
}
The last time I did a CD like this was a few years ago and I saved the applescript files (on system 9) as compiled script files and they worked fine. However the script editor doesn't give this option any more - so I was compiling them as application (.app) files but flash seems to be ignoring them. I've tried using fscommand("exec", which + ".app"); and that doesn't work either.
Any ideas? I'm pretty desperate.
-
Lifetime Friend of Site Staff
Are you putting the script files in the fscommand folder?
-
I am indeed. I have the PDFs inside the fscommand folder too.
-
Northcode - I've just found a post over at actionscript.org where you gave someone a code snippet not so long ago:
fscommand("exec", target + "_script");
This is what I used for a previous project a few years ago when I created the applescript files on the old Mac running OS 9. I saved them as compiled scripts and called them using fscommand("exec", target + "_script"). The newer mac (the old one died) only allows me to save as script (which when double-clicked opens the script file in the AppleScript editor) or as an application (.app). There is no option to save a compiled script.
How should I be saving these files? Maybe this is where I'm going wrong though I thought fscommand could open .app files.
I'm using Flash 8 because I read about how buggy CS3 is for fscommand.
-
Lifetime Friend of Site Staff
I've never had any luck with uncompiled scripts, they work on some machines but not on everything. I can't believe they would just remove the option to compile a script. The .app file should be the "compiled" version of the script and fscommand can deal with that.
-
I've figured it out. For the benefit of anyone who might be having the same problems, I had .bat and .exe files of the same name as the .app files in the fscommand folder. This seems to have been confusing the projector. I added "_script" to the name of the .app file and added the extension to the fscommand:
fscommand("exec", which + "_script.app");
If I had burned it as was it probably would have worked because the .bat and .exe files would have been hidden from the Mac on the CD.
-
I'm having an issue with it...
ok, so I have cs3 and it doesn't work, so I went to my non intel based mac with cs2.
I made an applescript, saved as an application and run only. I double click on it and it opens the folder like I want. (I had burned a cd named what I wanted so it opens the folder on the cd).
but when I run my mac projector it doesn't work. yes the folders are in a fscommand folder.
here's my script on the button
on (release) {
fscommand("exec", "openpdfe");
}
-
Lifetime Friend of Site Staff
As I pointed out in this post, the EXEC command is broken in Flash CS3.
You won't be pleased to hear this, but you've run headlong into a known issue.
Adobe badly bruised the EXEC function when they released CS3 as I mentioned on my blog in this post almost a year ago... FSCommand EXEC is Broken in Flash CS3.
The latest copy of my Proxy utility (version 3.0) fixes this for Windows but I haven't created a solution for the Mac yet
-
yes, I saw your post, which is why I tried it in CS2 on a non intel computer and it still doesn't work.
-
Lifetime Friend of Site Staff
Can you EXEC any other application you put in the fscommand folder or do you just have problems with compiled AppleScript's?
-
actually no. ok now you're on to something. But I'm doing what I'm supposed to , right? for the test I took another projector, called it project and then did
on (release) {
fscommand("exec", "project");
}
I put the files in the same directory as the main projector. I also tried putting it in a fscommand folder. I also tried launching a index.htm document. no luck. I gotta be doing something stupid.
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
|