Jump to content
UBot Underground

[Tutorial v4] Commands - Functions - Parameters


Recommended Posts

Link to tutorial on Define Command or Function as well as Parameters

 

http://www.botguru.net/ubot-studio-tutorials/define-command-or-function-ubot-studio-v4-tutorial/

 

I have begun the tutorial section of the BotGuru.net website. This is the first of many more to come. Have specifics you want tutorials on feel free to send me some details on what your needs are.

Link to post
Share on other sites

TJ, Very well explained. thank you

 

 

Two things that I learned , and they could be bugs

 

1. Sometimes functions should be on top

 

2. Sometimes you need to set the variables you pass to commands and functions

 

 

I did not run into these problems before, but I will be checking them in the future.

 

Thanks again.

Link to post
Share on other sites

Actually that's incorrect and completely unnecessary.

 

You do not need to redefine a variable since the parameter is automatically that variable.

Just remove those two nodes and it works fine.

 

define burek(#sirov, #burek) {
   navigate("http://www.google.com", "Wait")
   type text(<name="q">, "{#sirov}{#burek}", "Standard")
}
burek("this works", "without duplicate set commands")

Link to post
Share on other sites

Actually that's incorrect and completely unnecessary.

 

You do not need to redefine a variable since the parameter is automatically that variable.

Just remove those two nodes and it works fine.

 

define burek(#sirov, #burek) {
   navigate("http://www.google.com", "Wait")
   type text(<name="q">, "{#sirov}{#burek}", "Standard")
}
burek("this works", "without duplicate set commands")

 

I think TJ found that you need to set them sometimes not always, that is why I said it could be a bug.

Link to post
Share on other sites

That might be the case (I haven't noticed any problems with them passing), but you're still essentially saying that #one=#one so if it doesn't get passed/set in the first place, it doesn't get "re-set" on any of the later commands, no matter how many you put in there...

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