riceking Posted August 5, 2010 Share Posted August 5, 2010 $Random = Random(25, 100, 1) Send("{Right down}") Sleep($Random) Send("{Right up}") It only sends right once then stops. Help please. \ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 5, 2010 Moderators Share Posted August 5, 2010 riceking,It only sends right once then stopsWhich is exactly what I would expect it to do. You are asking AutoIt to press the key, wait for 25 to 100 milliseconds, and then release the key. Typical typematic delays are of the order of 200-500 ms, so there is little chance of that intervening to pump out multiple ketstrokes. You asked for one keystroke, and one keystroke you got. Help pleaseTo do what? Please try and formulate sensible questions or we cannot offer any advice. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
riceking Posted August 5, 2010 Author Share Posted August 5, 2010 (edited) O, I'm sorry, then shall I refrase? How do I hold down a key and have it send the key value for a certain time without send("{right}") and looping it. Like the average computer when you hold the key it would send more then one. Holding it down is different then spamming the key, as spamming the key is has a different purpose, I just want to have it held down and send continuous keys for a random time then stop sending. I hope I made sense >.< Edit: So should I increase the range for random? Edited August 5, 2010 by riceking \ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 5, 2010 Moderators Share Posted August 5, 2010 riceking,I now understand what you want, although I do not understand why you want it! As I mentioned above, you need to keep the key held down long enough to get the typematic repeats started. As the shortest typematic delay is usually about 200ms (any lower and you tend to get "key bounce" problems) I would suggest changing your Sleep statement to read:Sleep(200 + $Random)Now you stand a fair chance of getting the typematic repeats triggering and thus producing a stream of keystrokes until you release the key.Would you mind explaining why you want to do this? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
riceking Posted August 5, 2010 Author Share Posted August 5, 2010 (edited) Just a view count script on my photobucket almost like youtube but different. If you double right arrow it moves to another picture, if you hold it scrolls through your own album = more hits/views Edit: I've tested it, only sends 1 right the stops. I've tried extending the sleep time but it still doesn't work Edited August 5, 2010 by riceking \ Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 5, 2010 Share Posted August 5, 2010 Do multiple Send()'s instead. .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...
riceking Posted August 5, 2010 Author Share Posted August 5, 2010 I've said multiple sends don't function as a send and hold down. \ Link to comment Share on other sites More sharing options...
somdcomputerguy Posted August 5, 2010 Share Posted August 5, 2010 Language Reference - Loops Statements - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
czardas Posted August 5, 2010 Share Posted August 5, 2010 I doubt this will work. HotKeySet("{ESC}", "_Quit") sleep(5000) ; 5 seconds to get ready to go While 1 Send("{Right down}") WEnd Func _Quit() Send("{Right up}") Exit EndFunc operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Bert Posted August 5, 2010 Share Posted August 5, 2010 Photobucket is web based. You would be better served learning IE.au3 and make a script that looks for what you need. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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