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 


cancel button question
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 18, 2003 2:56 am    Post subject: cancel button question Reply with quote

hello all

When i have it ask a user for input and if they hit the cancel button my program keeps running it don't stop Sad what i'am doing wrong or missing


Code:

%%P1 = @input(Enter your name : ,User)



thanks
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Feb 18, 2003 4:08 am    Post subject: Reply with quote

Try something like this:
Code:

%%P1 = @input(Enter your name : ,User)
if @not(%%P1)
   goto EVLOOP
end

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 18, 2003 4:16 am    Post subject: hummm Reply with quote

but i don't have a evloop in my script Sad
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Feb 18, 2003 4:19 am    Post subject: Reply with quote

Well... the point is to check if you have user input or not,
you can do whatever ya want from there. If you insist
on getting user input, put a label above the @input() and
keep sending it back there...
Code:

:GetInfo
%%P1 = @input(Enter your name : ,User)
if @not(%%P1)
   goto GetInfo
end

Or ya can have the program exit or whatever...

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 18, 2003 4:24 am    Post subject: hummm Reply with quote

but the cancel button still don't work Sad
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Feb 18, 2003 4:27 am    Post subject: Reply with quote

C'mon Tim - what do ya want it to do if the user hits CANCEL?
_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 18, 2003 4:29 am    Post subject: Reply with quote

exit the script Smile

sorry i should have said that
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Feb 18, 2003 4:30 am    Post subject: Reply with quote

OK - my bad. Since ya have "User" as the default, ya gotta
check for that, as well as no value...
Code:

%%P1 = @input(Enter your name : ,User)
if @not(%%P1) @equal(%%P1, "User")
   EXIT
end

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 18, 2003 4:34 am    Post subject: hummm Reply with quote

hummm unless i'am missing something here Cancel still does not exit the script Sad
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Tue Feb 18, 2003 4:38 am    Post subject: Reply with quote

OK - check the example again, I edited it right after I posted it.

If this is in a subroutine, you'll have to use "goto CLOSE" or
something. You should always have a CLOSE label - this is what
Windows looks for to close the program at shutdown, etc.

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 18, 2003 5:48 am    Post subject: cool Reply with quote

thanks that seems to work


question what s/w you guys used to make icons for vds?


thanks
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 18, 2003 6:08 am    Post subject: hummm Reply with quote

humm

well i thought it was working but now no mater if i hit ok or cancel it stops the script Sad
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Feb 18, 2003 6:30 am    Post subject: Reply with quote

Just follow Mac's lead - he knows what he's doing.. Wink

Try something like this:

Code:

:LABEL
%%P1 = @input(Enter your name : ,User)
if @not(%%P1)@equal(%%P1, "User")
   INFO Exiting..
   goto CLOSE
else
  goto DOSOME
end

:CLOSE
EXIT

:DOSOME
INFO Name entered..


Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Tue Feb 18, 2003 7:04 am    Post subject: kk Reply with quote

question when someone enter a name into the text box but the next question they are asked to enter a file name how can one check to make sure the file ext is enter in the text box to and if they don't enter the file ext have vds added it..can this be done?
Back to top
View user's profile Send private message
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Tue Feb 18, 2003 8:28 am    Post subject: Reply with quote

Sure thing.

You have your filename in a variable, so you just evaluate the filename to check if it matches your
requirements:

For example (filename in variable %%file):

Code:

%%file = myname.tx
REM Let's say you want to force the .TXT extension
if @equal(@ext(%%file),txt)
  REM Required file extension OK - go do your stuff
  goto SOMELABEL
else
  REM No extension or not the right one
  %%file = @name(%%file)".txt"
  Info %%file
end


Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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