Sign in to follow this  
Followers 0
apache

how to use..if then else

7 posts in this topic

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?

Share this post


Link to post
Share on other sites



try using Run() instead of FileOpen

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

let me try run command....

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

its not workin with RUN :D

Share this post


Link to post
Share on other sites

Thanks Megaleod..shellexecute is working.. :D

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