Jump to content
UBot Underground

[Solved]Trying To Get Data From A File


Recommended Posts

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 ?

Link to post
Share on other sites

if #variable = $nothing

than (

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.

Link to post
Share on other sites

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")

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...