Jump to content

Random?


lolp1
 Share

Recommended Posts

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
Link to comment
Share on other sites

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.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...