Opening External Files from MaxGUI
BlitzMax Forums/BlitzMax Beginners Area/Opening External Files from MaxGUI
Hi again,
Is there a way to open an external file for viewing in MaxGUI?
I've used 'Execfile' in BlitzPlus but can't find its equivalent in Max!
Any help would be appreciated
Look for Openfile(), readfile(), writefile() or have I misunderstood?
I was unsure if these were the commands i needed.
What I need to do is click on a button in my window and it will open an external pdf using acrobat reader.
I have done this in the past with BlitzPlus but am at a loss as to what to use in MaxGUI.
Thanks
executing would be system_ or createprocess
you need to use system_ "executable.exe" Also if the executable has spaces you will need to use chr() to tell it to place quotes before and after the executable.
[code]
system_ "C:/Program Files/Adobe/Acrobat 7.0/Reader/AcroRd32.exe 6432.pdf"
While True
WaitSystem()
Wend
[code]
works on winxp
in case they have a different version installed it might be safer to scan "C:/Program Files/Adobe" for AcroRd32.exe and use whatever path you find
Thanks, will give it a go.
Great, that worked a treat.
If the file location was the same except for the drive letter is there a way to specify the address without naming the drive.
Hope that makes sense.
Thanks again