Random Action - Forum

Forum Navigation
You need to log in to create posts and topics.

Random Action

hello guys ,  anyone knows how can i make random actions ? , i want make one single button , after click its run one action between a lot of it ..  and how can i learn more about visual neo ?

Uploaded files:
  • You need to login to have access to uploads.

Push Button Properties - PushButton 1

Random "2" "[RANDOM-NUMBER]"
.
If "[RANDOM-NUMBER]" "=" "0"
AlertBox "RANDOM = 0" "Hi ;)"
Else
If "[RANDOM-NUMBER]" "=" "1"
Balloon "Bye !!!" "-1" "-1" "0"
Else
If "[RANDOM-NUMBER]" "=" "2"
StickyNote "-1" "-1" "Ready ???" "0"
Else

EndIf
EndIf
EndIf

luishp, Vadim and hector68 have reacted to this post.
luishpVadimhector68

@hector68

Of course, you can do this.

For example, with the Random command you can generate the number you want in the range you specify, and then with the logical IF condition you can run the script you want.

Basic information about VisualNEO Win commands can be found in the help: https://winhelp.visualneo.com/

I have a free online course for learning from scratch, and although it's in Russian, the browser can translate now from any language to any other (I use the course to teach students, so it requires registration): https://distant.orgpsiholog.ru/course/view.php?id=20

 

 

luishp and hector68 have reacted to this post.
luishphector68

tnk you @rafamacor its works ,wohooo !

@vadim , good resources for learn , Thank you for help.

Uploaded files:
  • You need to login to have access to uploads.

@hector68

Yes, and it's better to close logical conditions with the EndIF command, this will save you from errors if you add code below.

It also makes sense to indent, it makes the code more understandable.

These two variants will work the same way:

 

Uploaded files:
  • You need to login to have access to uploads.
luishp and Darbdenral have reacted to this post.
luishpDarbdenral