Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


can i "jump" in vbs

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,29551
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> can i "jump" in vbs
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 can i "jump" in vbs - 1/6/2006 12:44:16 AM   
  barocco


Posts: 49
Score: 0
Joined: 4/24/2005
From:
Status: offline
my code:

data=inputbox("Input data")
if data="" then wscript.quit

i want to have the data  checked after input~the user will be prompt to enter again if an invalid data was entered

can i do just like i can  do in assembler language:create a lable and then "jump"
thanks!!!

< Message edited by barocco -- 1/7/2006 2:07:54 PM >


_____________________________

Godness light my path
 
 
Post #: 1
 
 RE: can i "jump" in vbs - 1/6/2006 1:55:26 AM   
  mbouchard


Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
While you can't "jump" to a label you could call a function or set a variable to bypass code as needed.  But would need a bit more info on what you are trying to do before making any recommendations.

But as to the input, you could put in a loop to make sure that the user types in something. 

doThing = false
Do
   data = inputbox("Input something")
   If IsEmpty(data) then
       ret = MsgBox("No Data entered, do you want to retry or cancel?", vbRetryCancel, "Cancel Pressed")
         If ret = vbCancel then
            wscript.Quit
         End If
   ElseIf len(data) = 0 then
       msgbox "Input box is empty, you must enter something to continue",vbInformation,"Ok Pressed"
   Else
      doThing = True
   End If
Loop until doThing = True

Msgbox "You have entered: " & data

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to barocco)
 
 
Post #: 2
 
 RE: can i "jump" in vbs - 1/6/2006 2:13:37 AM   
  barocco


Posts: 49
Score: 0
Joined: 4/24/2005
From:
Status: offline
thanks!

_____________________________

Godness light my path

(in reply to mbouchard)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> can i "jump" in vbs Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts