Sign in to follow this  
Followers 0
Guest vitamanc

Flash Projector (.exe) opens .PDF files? HELP!

4 posts in this topic

Hi All,

I'm totally new to the game -- just downloaded AutoIt v3.

I'm publishing a projector Flash.exe and "heard" I can

use this app to easily open .pdf, word docs, etc, etc.

I know Flash has it's own FS Commands for such things, but heard

this 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

Share this post

Link to post
Share on other sites

#2 ·  Posted (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")
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 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.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0