Jump to content

how to use..if then else


Recommended Posts

hi there,

please help me im building a gui. i want to open help. The help file is in the same folder where my gui is placed. i want to use "if then else" option. i have written this

If ProcessExists("helpwin.exe") Then

MsgBox(4096,"", "file already open.")

Else

$file = FileOpen("@AutoItExe\helpwin.exe", 0)

EndIf

-----THE FIRST STATEMENT WORKS PROPERLY

If ProcessExists("helpwin.exe") Then

MsgBox(4096,"", "already open.")

-----BUT THIS ONE DO NOT OPEN HELPWIN.EXE

Else

$file = FileOpen("@AutoItExe\helpwin.exe", 0)

EndIf

Please tell me how i can do this...its urgent

any example? or suggestion?

Link to comment
Share on other sites

if im not mistaken (often am) but Fileopen() opens txt files.. am i right? not exes

Link to comment
Share on other sites

let me try run command....

Cody i think that .txt is just for exampe, i should open any file

fileopen does not just open any file, it is specifically for modification of files for use in other functions (filewrite(), filewriteline(), etc).

You want Run() or ShellExecute() if you are going to be executing files.

Edited by maqleod
[u]You can download my projects at:[/u] Pulsar Software
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...