IrishPride Posted July 10, 2011 Share Posted July 10, 2011 Hey again! I'm currently having a problem regarding the Send() and the Randomized function. I'm attempting to make a script that will randomly send either a "{LEFT}" or a "{RIGHT}" followed by some keys. Basically, rather than having it send: While 1 Send( "{RIGHT}" ) Sleep( 250 ) Send( "{LEFT}" ) WEnd I want the directions randomized. Any suggestions? Thanks in advance! Link to comment Share on other sites More sharing options...
JohnOne Posted July 10, 2011 Share Posted July 10, 2011 $iRnd = Random(0,1,1) If its 0 send left, if its 1 send right AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
smartee Posted July 10, 2011 Share Posted July 10, 2011 Suggestions? 1. Try searching the helpfile for the Random function 2. Try using it in your script Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted July 10, 2011 Share Posted July 10, 2011 Here's one way= While 1 Sleep(250) If Random(0, 1, 1) = 1 Then Send("{RIGHT}") Else Send("{LEFT}") EndIf WEnd .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
IrishPride Posted July 10, 2011 Author Share Posted July 10, 2011 Suggestions? 1. Try searching the helpfile for the Random function2. Try using it in your scriptI did, smartass. Maybe you could make yourself useful and do something other than trolling.Thanks to the others who actually had a helpful input. It's much appreciated. Link to comment Share on other sites More sharing options...
JohnOne Posted July 10, 2011 Share Posted July 10, 2011 Bit Harsh. smartee, just pointed you toward a function to use. When you look at it in the helpfile, the example are not disimilar to that above. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
smartee Posted July 10, 2011 Share Posted July 10, 2011 I did, smartass. Maybe you could make yourself useful and do something other than trolling.Thanks to the others who actually had a helpful input. It's much appreciated.Funny, I didn't see the function anywhere in the script of your original post. I guess handouts are welcome, but advice is not? I love how quickly your vocabulary degenerates, humor me and explain how you managed to try using the random function in your script without typing Random. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted July 10, 2011 Share Posted July 10, 2011 I did, smartass. Maybe you could make yourself useful and do something other than trolling.Just so you know, verbal abuse is not something we like at this website.You're okay for now but don't overdo it. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
IrishPride Posted July 10, 2011 Author Share Posted July 10, 2011 Funny, I didn't see the function anywhere in the script of your original post. I guess handouts are welcome, but advice is not? I love how quickly your vocabulary degenerates, humor me and explain how you managed to try using the random function in your script without typing Random.I did try the random function. And if you're too much of an idiot to realize it, this is the HELP section. Hence I'm asking for help. If you're going to get upset over my requesting assistance, you're obviously in no position to be answering those in need. Link to comment Share on other sites More sharing options...
IrishPride Posted July 10, 2011 Author Share Posted July 10, 2011 Just so you know, verbal abuse is not something we like at this website.You're okay for now but don't overdo it.It's understandable, but this kid needs to get off of the help section if he's going to get smart, when someone is asking to his community for assistance. Link to comment Share on other sites More sharing options...
taietel Posted July 10, 2011 Share Posted July 10, 2011 (edited) Before asking for help, READ the help file. What do you think is that for? [EDIT] Changed "Why" with "What" Edited July 10, 2011 by taietel Things you should know first...In the beginning there was only ONE! And zero... Progs: Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted July 10, 2011 Share Posted July 10, 2011 It's understandable, but this kid needs to get off of the help section if he's going to get smart, when someone is asking to his community for assistance.He never attacked you, so far you're the aggressor. Please stop posting until you've washed your mouth with soap or something. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
smartee Posted July 10, 2011 Share Posted July 10, 2011 It's understandable, but this kid needs to get off of the help section if he's going to get smart, when someone is asking to his community for assistance.Buddy, isn't it a bit too soon to start making enemies? I didn't mean to offend you.I'm disappointed with your attitude towards honest advice, do yourself a favor "kid", and cool down. The hot tempered ones don't last very long here. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now