GoliaX Posted April 25, 2019 Posted April 25, 2019 Hello all, I can't figure out why this happens, maybe some of you find what i am doing wrong. I have 2 inputs in my GUI, to end user can change mouse click delay and send key delay. I have this as code: Opt("MouseClickDownDelay", Number(GUICtrlRead($Inputm))) Opt("MouseClickDelay", Number(GUICtrlRead($Inputm))) Opt("SendKeyDownDelay", Number(GUICtrlRead($Inputk))) Opt("SendKeyDelay", Number(GUICtrlRead($Inputk))) I use 2 same valor inputs for these 4 opt. Then when I press start script, the log GUICrtEdit shows 33 for MouseDelay and 37 for KeyDelay, then I thoght It is showing the number in hex, then i place Dec($Inputm) in CtrlSetData to show in log and it shows it in decimal but diferent number than what you choose in the GUI. In real, even if you change the end user inputs, will always show 51 as mousedelay and 55 as keydelay. code: Global $Inputk = GUICtrlCreateInput("40", 447, 223, 41, 22, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER)) Global $Inputm = GUICtrlCreateInput("50", 247, 223, 41, 22, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER,$ES_NUMBER)) Func _start_bot() If WinExists("example_window") = true Then Opt("MouseClickDownDelay", Number(GUICtrlRead($Inputm))) Opt("MouseClickDelay", Number(GUICtrlRead($Inputm))) Opt("SendKeyDownDelay", Number(GUICtrlRead($Inputk))) Opt("SendKeyDelay", Number(GUICtrlRead($Inputk))) GUICtrlSetData($label10, "["& _NowTime()&"]" & " ClickMouseDelay: " & Dec($Inputm) & @CRLF, "") GUICtrlSetData($label10, "["& _NowTime()&"]" & " KeySendDelay: " & Dec($Inputk) & @CRLF, "") sleep(1000) What am I doing wrong? Thank you in advance
Moderators Melba23 Posted April 25, 2019 Moderators Posted April 25, 2019 GoliaX, Welcome to the AutoIt forum. Those numbers are the ControlIDs of the inputs - you need to display their content. And unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no further 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
Recommended Posts