| View previous topic :: View next topic |
| Author |
Message |
michaelmcstay Newbie
Joined: 16 Oct 2005 Posts: 6 Location: UT
|
Posted: Sun Oct 16, 2005 7:03 pm Post subject: Stuck on IF |
|
|
hi i have one more question its about the IF
i'm not use to vds IF
i'm trying to use a var %%file like this
if the var contains the word test goto w
i can not fig it out the way i have been trying it it just go's to :w regardless if the var %%file contains the word test .
i would like to have it end if the var dose not contain test
would someone kick start me on this i can fig out with a lil push
thank you
michael
| Code: | If %%file(test)
goto w
end
:w
%R = @msgbox(Message,Title,$000) |
|
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Sun Oct 16, 2005 8:02 pm Post subject: |
|
|
You can do it many ways, if you are using a normal windowed program you probably have the main event loop labled :evloop
| Code: |
%%file = "test"
if @equal(%%file, "test")
goto w
else
goto evloop
end
:w
%R = @msgbox(Message,Title,$000)
exit
|
- OR -
| Code: |
%%file = "test"
if @equal(%%file, "test")
%R = @msgbox(Message,Title,$000)
end
|
|
|
| Back to top |
|
 |
michaelmcstay Newbie
Joined: 16 Oct 2005 Posts: 6 Location: UT
|
Posted: Sun Oct 16, 2005 10:31 pm Post subject: |
|
|
thank you very much for the help on that i had a feeling that the @equal was Used but i could not get it to work i left the " " out
hehehehe
thank you
michael |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Mon Oct 17, 2005 9:05 am Post subject: |
|
|
Or you could use the below EXAMPLE for an actual HD file check:
| Code: | %%file_path_exe = c:\filepath\file.exe
IF @FILE(%%file_path_exe)
rem if true
ELSE
rem if false
END |
Not sure what you want to do  |
|
| Back to top |
|
 |
|