Guest vitamanc Posted June 12, 2004 Share Posted June 12, 2004 Hi All,I'm totally new to the game -- just downloaded AutoIt v3.I'm publishing a projector Flash.exe and "heard" I canuse this app to easily open .pdf, word docs, etc, etc.I know Flash has it's own FS Commands for such things, but heardthis is a smoother bet.ANY suggestions, samples, or ideas on are much appreciated.Be gentle & speak slowly -- I'm more designer than coder!Thanx so much Link to comment Share on other sites More sharing options...
pekster Posted June 12, 2004 Share Posted June 12, 2004 (edited) I may not have fully understood what you need, but I have designed an example script that puts a new text file (called "Text File.txt") in the script's directory, and then uses notepad to open it. With AutoIt, you can open any file as long a you run it through the binary executable file that is responsible for handeling it. In the case of my text file, I used notepad.exe. However, you can use any application you want, such as Word.exe for a word file, etc. Keep in mind that you usually have to define a full path to files. I got away with avoiding that for notepad.exe since it's in the %PATH%.$file = FileOpen(@ScriptDir & "\Text File.txt", 2);open this file for write If $file = -1 Then;make sure the file is valid ;if it's not, let the user know and exit MsgBox(0, "Error", "Unable to open file for write. Script halted") Exit EndIf FileWriteLine($file, "This is a sample text file");write two lines to the file: FileWriteLine($file, "Here is another line of the sample file") ;now display the file using "notepad.exe" and giving the file as a paramater Run("notepad.exe " & '"' & @ScriptDir & '\Text File.txt"')Fixed a minor typo Edited June 12, 2004 by pekster [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
Josbe Posted June 12, 2004 Share Posted June 12, 2004 Obviously...this isn't the proper forum. But you can view about the FS commands. "exec" for example. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Josbe Posted June 12, 2004 Share Posted June 12, 2004 I could do this with Flash 5, now with MX I haven't tried it. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now