Jump to content
Sign in to follow this  
lolp1

Random?

Recommended Posts

lolp1

Hello, I'm still trying to learn all of auto-it. How can I get this to choose at random from a list web sites I make?

EG: First mouse click goes to google.com, second goes to ask.com, ect ect from a list I've made.

ElseIf _IsPressed(01) Then 
          $aUrl = "www.websitehere.com" 
          $oIE = _IECreate($aUrl)
Edited by lolp1

Share this post


Link to post
Share on other sites
GaryFrost

Have you tried using the Random function?

put the list of urls in a array for example:

Global $aUrls[3] = ["www.google.com", "www.autoitscript.com","www.ask.com"]

$i_url = Random(0,2,1)
$oIE = _IECreate($aUrls[$i_url])
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
lolp1

I'll try this thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×