|
-
Thanks for the info.
So is is possible to lauch a pdf file using ACRORD32.EXE without using SWF Studio?
I assume RunOrg is part of SWF Studio and that I cannot use this command if I do not have SWF Studio?
Thanks
Paul
-
Can I put my pdf files in a separate folder on the CDROM? Does this have to be within fscommand folder OR can it be outside it?
Thanks
Paul
-
Lifetime Friend of Site Staff
The trick that RUNORG makes possible is changing the current directory to the folder where the Acrobat executable is. You can do this easily from a BAT file with the CD command. After that the files you open can be anywhere you like on the CD. The only thing that has to go in the FSCommand folder is the BAT file and the renamed copy of PROXY.EXE.
-
Thanks Northcode.
Not quite sure how what you suggest is done. Can you show me some example code.
Say for example I want to put my pdf files in a folder called "media" on the root of the CDROM.
If I want to launch a pdf called "readme.pdf" which is in this folder, what would be the name and contents of the bat file inside the fscommand folder to do this?
Also if it is not too difficult to explain, if I have an "acrobat" folder also in the root of the CDROM, how would the code use this version of acrobat to launch the pdf file?
Many thanks
Paul
-
Proxy only halfway working w/ MS Word.
Hi Northcode
Your Proxy.exe utility is a great, however I'm having inconsistent success with it.
I am having a similar problem that ticktack had earlier in the thread: using proxy works somewhat-- it opens the correct application but doesn't open the actual doc file. (I am trying to open MS Word docs from a Flash projector on PC)
If MS Word is already open and I click on the button to open the doc file it works correctly. Is there a bug in the proxy app or is this a Word thing?
Directly clicking on the renamed proxy.exe file opens the doc correctly, as well as clicking on the .bat file. The doc types are correctly associated with Word--they have the correct icon and double clicking them opens correctly.
Please note that I've applied the proxy.exe usage to some Excel, PDF and JPG files in the same project and they works perfectly.
The only thing I can think of is that some of my file names are kind of long. ie. "Frequently_Asked_Questions.doc", though I didn't think that should matter.
All of my files are in the FSCOMMAND folder, all of the .bat files contain "start filename.doc" (they all worked correctly before using proxy.exe). I'm using Flash MX (not 2004), Windows XP and Office XP.
Sorry for bringing up kind of an old subject, but I just can't figure it out. Any help would be greatly appreciated.
thanks so much
-dnad
-
Lifetime Friend of Site Staff
If you use long file names then you have to quote the file names or they won't be handled properly, for example...
use:
start "c:\my documents\whatever.doc"
instead of
start c:\my documents\whatever.doc
-
pdf launch
Hi Ny comet
Im trying to place an applescript file which launches a pdf - but cant seem to get it to work.
The applescript file works, (ie it launches the correct file with acrobat) but when i use
on (release)
fscommand ("exec", M001pdf_script)
nothing happens. I have placed the applescript file in the same folder as the mac projector....
can somebody please help?
-
Lifetime Friend of Site Staff
Is M001pdf_script a variable name or the name of your script? If it's the name of your script then you need to call the EXEC command like this to make it work...
fscommand("exec", "M001pdf_script");
-
Senior Member
Sorry to bring up an old thread..
Northcode-
1.)..first CD-projector project ..and I learned MUCH during this thread. Your staying with the thread until the end...top notch.
Now..on to my question I kwow the 2Desktop saves a file to the users desktop... and the NEW version opens a SAVE dialog box....
Is there anyway to specifiy WHERE you want a file to be saved (like hard coded somewhere) and have it always be the same...WITHOUT a SAVE AS dialog box showing? (or a DOS box.)??
Basically...like for an UPDATE from a CD..
click here to update your version:
it just finds the path...
example: ("C:\Program Files\version.exe")
..and overwrites file... I would prefer to NOT have the confirm overwrite file box..but not essential...
FREE would be BEST....but my boss would probably spring for a 3rdparty utility..is not tooo much.. =)
thanks for ANY ideas you can provide for a solution to this.
thanks
-whispers-
-
Lifetime Friend of Site Staff
Sure, you can just combine my FREE Proxy utility with a plain old COPY command in a BAT file. Proxy will hide the DOS box when the BAT file runs.
If you need to find a special folder (like Program Files) to use as the base for the copy then you might need help from an external utility, but you can find a lot of common locations in environment variables that Windows creates for you though - and they are eaily usable from BAT files.
-
Senior Member
OK..thanks..so I dont need any 3rd party utility?
Now for the hard part... I dont think I have ever written a BAT file before... (maybe when I tried to open a .PDF file from CD....once..ALONG ago!) LOL..
Any helpful links to where I can read up on writing a COPY command in a BAT file?
I think I can drudge my way through your PROXY utility..(lots of helpful posts in here alone)..
Also....where can I find out about "environment variables"?
I think I am going to try one "button" that does it the secret..silent way....and one "button" that opens a SAVE window..in case it was installed to a custom location....
Any ideas?..or tips? on how to accomplish this?..thing I should be aware of?
the ABOVE help would be most helpfulll and QUITE enough though.. =)
The 3rd party app. I "MIGHT" need...would this be like an .exe on the cd that I "call" to find/place the file in the users C:\programfiles\etc\etc\etc ??
thanks
-whispers-
-
Lifetime Friend of Site Staff
If you just type "SET" at a DOS prompt and hit enter you'll get a list of available environment variables. Thesre are things that Windows create for you to use in BAT files and applications. The contain many useful pieces of information and point to folders commonly required by BAT files. When you see things like this in the environment variable list...
SystemDrive=C:
SystemRoot=C:\WINNT
You can use them in BAT files by putting "%" signs on either side of the variable name, that tells the command processor (that interprets your BAT files) to replace the %whatever% with the contents of the environment variabled named "whatever".
Try this simple example in a BAT file to see environment variable substitution in action 
Code:
echo The system drive is %SystemDrive%
-
Senior Member
Simple COPY command .BAT file..
OK...I have my proxy.exe (renamed to update.exe) and my .bat file (named update.bat) located in the FSCOMMAND folder...
Would my .BAT file be like this? (tyring to save the file to program files/diretory_Name)
update.bat:
Code:
copy /Y "\update\*.*" "%programfiles%\rootFolder\subFolder"
(thank you to Northcode for supplying me with this)
using the %programfiles% is using the environment variables to find the program files diretory..no matter what OS? or user profile..etc..etc correct?
Now to perform a check to see if the FILE (or is it directory) already exists I would use this command line:
Code:
md %programfiles%\rootFolder\subFolder
And this is a check to see if the "FILE" exsists?..(right?)
Code:
if not exist "%programfiles%\rootFolder\subFolder\fileName.exe"
What is the MD stand for (alwyas thought it was make directory)
Is this to check for the directrory? or to check for the FILE? What if the directory does NOT exsist? Does it create one? (I probably do NOT want that then)..if NOT there..proabably want it to abort or say "No such directory..please check installation path" (or whatever)
Basically this file HAS to exsist..or theres no point in copying..(it should OVERWRITE..not just copy to a blank directory)
Now...how do I utilize "SAY.exe"? DO I have to brun in through the .bat file like 2desktop?
example: "say \documents\readme.pdf" (which I know it isnt right..but I dont how the strings are pased to say.exe?)
SO my .BAT file (without adding any kind of "check" to see if "copy" was successfull) would look like this? :
Code:
REM ** copy command from CD > ProgramFiles**
copy /y "\update\fileName.exe" "%programfiles%\rootFolder\subFolder"
REM ** check to se if "FILE" exsists (after COPY command)**
if not exist "%programfiles%\Myapp\myfile.txt" goto error
:okay
Update was Successfull
goto done
:error
The copy failed or the file does NOT exsist.
:done
Am I understanding everything correctly so far? Does everythign look correct?
Now I will try to tackle the "response" back to flash part (reading a text file from the C: drive.)
Can this be cheated or something? Maybe when the alert pop-up shows..the click "OK" button..or close it..the focus would be on the "CD" again...is there anyway to maybe provoke an action form an onFocus event? (once they close pop-up defaults back to focuson CD menu)??
Thought Id ask! LOL
Thanks
I will post back on the common text file part for passing a DONE value back to FLASH
-whispers-
-
Lifetime Friend of Site Staff
MD is make directory. Saying md %programfiles%\rootFolder\subFolder will work on 2000 and probably XP, but I'm not 100% about Win9x and ME. To be safe you can do it in two steps (see below) to make sure it works on all operating systems.
Code:
md %programfiles%\rootFolder
md %programfiles%\rootFolder\subFolder
If you want you can check the special errorlevel variable that the command processor sets after each command and jump to an error label. If the command completed successfully then the errorlevel will be 0, otherwise the errorlevel has a non-zero value.
Testing the special errorlevel variable is a bit different, if you want to test for any errorlevel except 0 then you say "if errorlevel 1" which really means any errorlevel of 1 or higher. So to test for any error after an MD or COPY command, you can do this...
Code:
md %programfiles%\rootFolder
if errorlevel 1 goto error1
md %programfiles%\rootFolder\subFolder
if errorlevel 1 goto error2
copy /y "\update\fileName.exe" "%programfiles%\rootFolder\subFolder"
if errorlevel 1 goto error3
:okay
REM ** if we get here everything is okay
:error1
echo could not create %programfiles%\rootFolder
goto done
:error2
echo could not create %programfiles%\rootFolder\subFolder
goto done
:error3
echo the copy command failed
goto done
:done
If you combine that with the example I showed you in the other thread, you can just set the status variable in the text file and you don't need to use the SAY utility, you can display your errors in Flash.
-
I'm trying to make a cross platform projector with a button that will open a PDF in the users default viewer. I used the Applescript found in this thread and finally got it to work. I have the folowing script in the first frame of the movie
function SmartExec(file)
{
platform = $version.slice(0, 3);
if (platform == "WIN") {
fscommnd("exec", file+".exe");
} else {
fscommand("exec", file+".app");
}
}
and added the call for the function to the button. When I output the Projector I get the folowing message in the output window.
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 5: There is no method with the name 'slice'.
platform = $version.slice(0, 3);
Any ideas?
Also I hade to change .scpt to .app to get the appelescript to work on its own. I have also seen it writen _scpt. What is the difference between the three versions? Does it make a difference?
Thanks
-
Lifetime Friend of Site Staff
If the version of Flash you're using doesn't support slice, you can change the function to use substring instead of slice, like this...
Code:
function SmartExec(file)
{
platform = substring($version, 0, 3);
if (platform == "WIN") {
fscommnd("exec", file+".exe");
} else {
fscommand("exec", file+".app");
}
}
-
Thanks for the quick response.
The code you sugested works fine on Flash MX 2004.
Does anyone know what the difference between the Applescript extensions _scpt, .scpt and .app are? If I use .app, which is the only one that works on my MAC (OSX 10.3), will it work on other OSX versions? What about applescripts OS 9?
-
Lifetime Friend of Site Staff
the "_" stuff was just a convention I use for my own convenience, you can adjust the SmartExec function to execute whatever you like as long as you're consistent in how you name your files so SmartExec can find them.
The source for AppleScript files is normally stored in a .scpt file by the script editor and .app files are created when you compile an AppleScript.
-
I have proxy.exe working, Applescript working and SmartExec working. I am having trouble having the bat file find the PDF file in a folder other than fscommand.
I want to put the PDF's in a folder in the root called PDF. My bat file reads:
===============
START \PDF\testfile.pdf
===============
Is this correct? This dosen't work with the files on the hard drive. Do I have to burn a cd for it to work?
Also I found a typo in the SmartExec code in most of the posts in this thread. On the the line after
if (platform == "WIN") {
fscommand is missing the "a".
Thanks again for all your help.
-
Lifetime Friend of Site Staff
Since you're using \pdf\testfile.pdf, Windows is going to look at the root of whatever drive you run that BAT file on for a folder called PDF and then for testfile.pdf in there. If you move your files to the root of your C: drive and try it from there it should work, otherwise you will have to burn it to a CD to test it properly.
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
|