autoiys Posted February 16, 2013 Share Posted February 16, 2013 How to send alt release and alt press in two different commands? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 16, 2013 Moderators Share Posted February 16, 2013 autoiys,Welcome to the AutoIt forum. Look at the Send page in the Help file and you will soon find out. 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...
PhoenixXL Posted February 16, 2013 Share Posted February 16, 2013 ExampleSend( "{ALTDOWN}" ) Send ( "f" ) Send( "{ALTUP}" ) My code: PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners. MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression. Link to comment Share on other sites More sharing options...
autoiys Posted February 16, 2013 Author Share Posted February 16, 2013 oh i didn't notice it was there... up down Link to comment Share on other sites More sharing options...
autoiys Posted February 16, 2013 Author Share Posted February 16, 2013 (edited) i changed 'alt' with 'a' but it doesn't get hold. i hold mouse button 3 and it only prints one a #include Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("04", $hDLL) Then Send("{a down}") While _IsPressed("04", $hDLL) <------ saw this from another's code is it correct? Sleep(2) WEnd Send("{a up}") sleep(2) EndIf WEnd DllClose($hDLL) Edited February 16, 2013 by autoiys Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 16, 2013 Moderators Share Posted February 16, 2013 autoiys,And that is exactly what you are asking the script to do - press the "a" key, wait until the mouse button is released, and then release the "a" key. And using a Sleep of less that 10 is pointless - you get 10 ms anyway. What exactly are you trying to do? It is much easier to offer advice on a specific problem that on general coding. 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...
autoiys Posted February 16, 2013 Author Share Posted February 16, 2013 Melba23 this is the whole code but only one "a' gets pressed in chrome address bar while holding middle mouse. it's supposed to print many. i am going to bind 'a' in diablo 2 to do stuff Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 16, 2013 Moderators Share Posted February 16, 2013 i am going to bind 'a' in diablo 2 to do stuffUnfortunately you appear to have missed the Forum rules when you joined. Please read them now (there is also a link at bottom right of each page) - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. 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...
Recommended Posts