forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Stuck on IF

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
michaelmcstay
Newbie


Joined: 16 Oct 2005
Posts: 6
Location: UT

PostPosted: Sun Oct 16, 2005 7:03 pm    Post subject: Stuck on IF Reply with quote

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
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Sun Oct 16, 2005 8:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
michaelmcstay
Newbie


Joined: 16 Oct 2005
Posts: 6
Location: UT

PostPosted: Sun Oct 16, 2005 10:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Mon Oct 17, 2005 9:05 am    Post subject: Reply with quote

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 Rolleyes
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group