gblxd91 Posted December 18, 2014 Posted December 18, 2014 hello guys i need a little help with something stupid i need send a click in a window to test and learn i'm using notepad/desktop i dont find how i can use inputs ( $input6,$input5 ) to send the coords to cliker. something like MouseClick("left", input6, input5, 2) input6(665),input5(310) its in gui how i can make my code understend it ?? because he send a click to 0x / 0y =/
Moderators JLogan3o13 Posted December 18, 2014 Moderators Posted December 18, 2014 If you have a variable names $input5 and one named $input6, you would do something like this: MouseClick("", $input5, $input6) Just make sure that $input5 and $input6 are actual numbers, not strings. Posting your full code would help immensely. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
gblxd91 Posted December 18, 2014 Author Posted December 18, 2014 (edited) If you have a variable names $input5 and one named $input6, you would do something like this: MouseClick("", $input5, $input6) Just make sure that $input5 and $input6 are actual numbers, not strings. Posting your full code would help immensely. i'm using gui inputs so i think is it in a text mode?(maybe the string) so i need convert it to a nuber? how i can do that? sorry for my bad english kkk expandcollapse popup[autoit] #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\gabriel\desktop\nova pasta\koda\forms\test.kxf $Form1_1 = GUICreate(" test", 342, 258, 190, 125) GUISetIcon("C:launcher.exe", -1) $Checkbox3 = GUICtrlCreateCheckbox("", 12, 60, 17, 17) $input6 = GUICtrlCreateInput("X", 48, 40, 73, 21) $Label1 = GUICtrlCreateLabel(" AUTO 1 ", 48, 16, 73, 17, -1, BitOR($WS_EX_STATICEDGE,$GUI_WS_EX_PARENTDRAG)) $Label2 = GUICtrlCreateLabel(" AUTO 2 ", 236, 20, 80, 17, -1, BitOR($WS_EX_STATICEDGE,$GUI_WS_EX_PARENTDRAG)) $Label3 = GUICtrlCreateLabel(" AUTO 2 ", 236, 124, 79, 17, -1, BitOR($WS_EX_STATICEDGE,$GUI_WS_EX_PARENTDRAG)) $Checkbox2 = GUICtrlCreateCheckbox("", 204, 68, 17, 17) $Label4 = GUICtrlCreateLabel("ativar", 8, 40, 30, 17) $Label5 = GUICtrlCreateLabel("ativar", 196, 44, 30, 17) $input5 = GUICtrlCreateInput("Y", 48, 64, 73, 21) $Input1 = GUICtrlCreateInput("X", 236, 44, 73, 21) $Input2 = GUICtrlCreateInput("Y", 236, 68, 73, 21) $Input3 = GUICtrlCreateInput("X", 236, 148, 73, 21) $Input4 = GUICtrlCreateInput("Y", 236, 172, 73, 21) $Input7 = GUICtrlCreateInput("X", 45, 178, 73, 21) $Label6 = GUICtrlCreateLabel(" TARGET ", 45, 130, 60, 17, -1, BitOR($WS_EX_STATICEDGE,$GUI_WS_EX_PARENTDRAG)) $Input8 = GUICtrlCreateInput("Y", 45, 202, 73, 21) $Input10 = GUICtrlCreateInput("Click Delay", 48, 88, 73, 21) $Input9 = GUICtrlCreateInput("Click Delay", 237, 90, 73, 21) $Input11 = GUICtrlCreateInput("Click Delay", 45, 154, 73, 21) $StatusBar1 = _GUICtrlStatusBar_Create($Form1_1) $Checkbox1 = GUICtrlCreateCheckbox("", 20, 180, 17, 17) $Label7 = GUICtrlCreateLabel("ativar", 12, 156, 30, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit case $checkbox3 If BitAnd(GUICtrlRead($Checkbox3),$GUI_UNCHECKED) = $GUI_UNCHECKED then Sleep (5000) Else MouseClick("left", $input6, $input5, 2) EndIf EndSwitch WEnd [/autoit] Edited December 18, 2014 by gblxd91
Solution BrewManNH Posted December 18, 2014 Solution Posted December 18, 2014 You need to use GUICtrlRead($input6) and not just $input6, that's just the control ID for the input control. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
gblxd91 Posted December 18, 2014 Author Posted December 18, 2014 ohh i"m so stupid thx man is it !! love u kkk
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