Jump to content
UBot Underground

Newbie Define command question


Recommended Posts

Ok, I am creating a define command for a series of steps that I always repeat in my bot..involving :

 

wait : so bewtween 0 and 15 seconds

 

&

 

wait for browser event everything loaded

 

 

So now when I type and drag my custom command it gives me a field box with my custom command

name.

 

So if I put 1...is that number of cycles or seconds that this command will run ...?

 

I have defined the number of seconds already...so I am confused....

Link to post
Share on other sites
  • 2 weeks later...

you have added a parameter input to your function by the sounds of it.  if you don't know what that means then you should remove it. You don't need it for a basic define, and once you get the hang of using them more you can start to add parameters in.

Link to post
Share on other sites


loop(10) {
navigate("http://www.bing.com/", "Wait")
PageLoadWait()
navigate("http://www.google.com/", "Wait")
PageLoadWait()
}
define PageLoadWait {
wait($rand(0, 15))
wait for browser event("Everything Loaded", 15)
}


 

Link to post
Share on other sites

Yeah, as quite_interesting said, it looks like you used parameter for define function, which only passes the value you enter to local variable with name you defined in define command.

 

Since you are not passing that variable to "wait" command, entering the value into "field box" won't effect delay time.

 

If you are not using threads you don't need parameters, so you can remove the parameter by clearing out parameter name in define node.

 

However, the best way to code define commands is to use parameters, so you can also use them in threaded versions, so here is an example with parameter:

WAIT CUSTOM(1)
define WAIT CUSTOM(#DEF SECONDS) {
    wait(#DEF SECONDS)
}

I hope that helps.

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...