TheCrimsonborn Posted September 10, 2021 Share Posted September 10, 2021 I searched for a long time but couldn't find the result I wanted. I want to set x and y coordinates with input method. I tried this; Global $x1 = GUICtrlCreateInput("X", 20, 20, 50, 0) Global $y1 = GUICtrlCreateInput("Y", 80, 20, 50, 0) MouseClick("left",$x1,$y1) sleep(1200) Link to comment Share on other sites More sharing options...
Developers Jos Posted September 10, 2021 Developers Share Posted September 10, 2021 You are not creating a GUI and reading the controls, so need to first open the helpfile and read up on how to create your own GUI. The other option is to simply ask for the values with an inputbox(). So what is it exactly you are trying to accomplish here? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
TheCrimsonborn Posted September 10, 2021 Author Share Posted September 10, 2021 6 minutes ago, Jos said: You are not creating a GUI and reading the controls, so need to first open the helpfile and read up on how to create your own GUI. The other option is to simply ask for the values with an inputbox(). So what is it exactly you are trying to accomplish here? Sorry for misinformation, this is my the my code expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Automator", 250, 450, 950, 100) Global $label1 = GUICtrlCreateLabel("Location of '' button", 20, 5) Global $x1 = GUICtrlCreateInput("X", 20, 20, 50, 0) Global $y1 = GUICtrlCreateInput("Y", 80, 20, 50, 0) Global $delay1 = GUICtrlCreateInput("1200", 140, 20, 50, 0) $label2 = GUICtrlCreateLabel("Location of ' ' button", 20, 55) $x2 = GUICtrlCreateInput("X", 20, 70, 50, 0) $y2 = GUICtrlCreateInput("Y", 80, 70, 50, 0) $delay2 = GUICtrlCreateInput("1200", 140, 70, 50, 0) Global $label3 = GUICtrlCreateLabel("Location of '' tab button", 20, 105) Global $x3 = GUICtrlCreateInput("X", 20, 120, 50, 0) Global $y3 = GUICtrlCreateInput("Y", 80, 120, 50, 0) Global $delay3 = GUICtrlCreateInput("500", 140, 120, 50, 0) Global $label4 = GUICtrlCreateLabel("Location of '' button", 20, 155) Global $x4 = GUICtrlCreateInput("X", 20, 170, 50, 0) Global $y4 = GUICtrlCreateInput("Y", 80, 170, 50, 0) Global $delay4 = GUICtrlCreateInput("1000", 140, 170, 50, 0) Global $label5 = GUICtrlCreateLabel("Location of '' button", 20, 205) Global $x5 = GUICtrlCreateInput("X", 20, 220, 50, 0) Global $y5 = GUICtrlCreateInput("Y", 80, 220, 50, 0) Global $delay5 = GUICtrlCreateInput("1000", 140, 220, 50, 0) $Button1 = GUICtrlCreateButton("Run!", 80, 400, 100, 25) $exit = GUICtrlCreateLabel("For Stop press F2", 88, 430) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### HotKeySet("{F2}",myExit) Func myExit() Exit EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 MsgBox(48,"Warning!", "Make sure your screen is displaying.") While 1 MouseClick("left",$x1,$y1) sleep(1200) MouseClick("left",$x2,$y2) sleep(1200) MouseClick("left",$x3,$y3) sleep(500) MouseClick("left",$x4,$y4) sleep(1000) MouseClick("left",$x5,$y5,2) sleep(1200) WEnd EndSwitch WEnd Link to comment Share on other sites More sharing options...
Developers Solution Jos Posted September 10, 2021 Developers Solution Share Posted September 10, 2021 So my comment is still valid: 11 minutes ago, Jos said: You are not ................. reading the controls There is no GuiCtrlRead() there to get the filled in value. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
TheCrimsonborn Posted September 10, 2021 Author Share Posted September 10, 2021 19 minutes ago, Jos said: So my comment is still valid: There is no GuiCtrlRead() there to get the filled in value. Reading laziness is a very bad habit... Thanks! 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