Arul 1 Posted February 29, 2012 Report Share Posted February 29, 2012 I am trying to get data from a file. For that I used the UI Open File command and everything works fine. But when a user forgets file which means the variable is empty then the script goes into error. So I used a If statement with comparison parameter. If #variable=$false then stop script. But I want the bot again go to the first step which is the UI Open file command and then stop script. How do I do it ? Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted February 29, 2012 Report Share Posted February 29, 2012 if #variable = $nothingthan ( alert ( "message")Stop Script()) Quote Link to post Share on other sites
Arul 1 Posted February 29, 2012 Author Report Share Posted February 29, 2012 if #variable = $nothingthan ( alert ( "message")Stop Script())Thank you but will this make the bot to go and check again whether the user has uploaded the file this time. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted February 29, 2012 Report Share Posted February 29, 2012 no this would stop the bot. a way around it to not stop the bot, but prompt the user to pick a file you can have it look if variable = $nothing than, alert user to set a file, and pause the bot, requiring them to hit play after they set a file. Video example:http://screencast.com/t/ujJdaFXbK Here is the example code ui open file("my open file", #open file var) if($comparison(#open file var, "=", $nothing)) { then { alert("Please set the Open File option in the UI area.") loop while($comparison(#open file var, "=", $nothing)) { wait(3) } } else { } } navigate("http://botguru.net", "Wait") Quote Link to post Share on other sites
Arul 1 Posted February 29, 2012 Author Report Share Posted February 29, 2012 Thank you very much. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.