CptSpike Posted September 28, 2012 Posted September 28, 2012 (edited) EDIT: God I'm an idiot. Still got the problem, but _IsPressed doesn't seem to work. Oh well the principle is the same Hi all, So I'm having a slight problem with the MouseUp function. Here's the example code I'm working with: #include <Misc.au3> HotKeySet("{ESC}","quit") while(1) $input1=_IsPressed(11) if $input1=1 then mousedown("right") elseif $input1=0 then mouseup("right") EndIf WEnd func quit() Exit EndFunc (Forgot the html code to put it in special tags:() I'd be careful running that though; for me it constantly right clicks regardless of whether 'W' is pressed or not. Had the same problem using any input by the way, just put that in for ease of use. I want it to work like the Send() function when you hold down a key, i.e, while this button is being held down, hold down the mouse button, then release...you get the idea. (I know this looks pointless at the mo, but I'm trying to convert pulling the trigger on a game controller to holding down the right mouse button. NOT GAME AUTOMATION just using a controller with a game that doesn't support one) Thanks for reading -CptSpike Edited September 28, 2012 by CptSpike
Moderators Melba23 Posted September 28, 2012 Moderators Posted September 28, 2012 CptSpike, pulling the trigger on a game controller to holding down the right mouse button. [...] just using a controller with a game that doesn't support one NOT GAME AUTOMATIONYou might not be "automating" the game, but by your own admission you are certainly "interacting" with one. Please read the Forum Rules carefully before you post again. Thread locked. 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
Recommended Posts