Miliardsto Posted April 14, 2019 Share Posted April 14, 2019 (edited) Hello I need send msg to controls ( to message loop - main while loop ) like this func do. I need to send msg to hided (no display on screen) gui too. GUICtrlSendMsg ( controlID, msg , wParam, lParam ) I could make simply run functions but I has a lot of logic in while loop like this. So need to fire fire example (on hided gui too) $s_offOn_sio Case $s_offOn_sio If _Metro_CheckboxIsChecked($s_offOn_sio) Then _Metro_CheckboxUnCheck($s_offOn_sio) AdlibUnRegister("hsio") Else If _checkDeclared(True,True) == False Then Else _Metro_CheckboxCheck($s_offOn_sio) AdlibRegister("hsio", 1900) EndIf EndIf Case $s_offOn_spell If _Metro_CheckboxIsChecked($s_offOn_sp) Then _Metro_CheckboxUnCheck($s_offOn_sp) AdlibUnRegister("caster") Else If _checkDeclared(True,True) == False Then Else _Metro_CheckboxCheck($s_offOn_sp) AdlibRegister("caster", 3500) Endif EndIf Case $r_offOn_increase If _Metro_CheckboxIsChecked($r_offOn_increase) Then _Metro_CheckboxUnCheck($r_offOn_increase) Else _Metro_CheckboxCheck($r_offOn_increase) EndIf Edited April 14, 2019 by Miliardsto Link to comment Share on other sites More sharing options...
jdelaney Posted April 14, 2019 Share Posted April 14, 2019 OK. What's the problem? You can still use functions on hidden windows. IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
Miliardsto Posted April 14, 2019 Author Share Posted April 14, 2019 how to run this "Cases" in message loop . Normally its fired up when button or switch is clicked. I need to simulate click on these buttons or send some function to run it. Like I wrote I wont like to simply call funcs becouse in while loop I got all the logic before function could be fired. I wont spend 3 days rewriting code Case $r_offOn_increase Case $s_offOn_sio Link to comment Share on other sites More sharing options...
Nine Posted April 14, 2019 Share Posted April 14, 2019 I would suggest you make a small runable script, go as far as you can. Then ask us for help when you hit a wall. Because, what you are showing us is totally incomprehensible. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Miliardsto Posted April 14, 2019 Author Share Posted April 14, 2019 xD take. how to run $idButton_Add without clicking button Add , when gui is hidden too? #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() Local $sMESSAGE = "The following buttons have been clicked" GUICreate("My GUI list") ; will create a dialog box that when displayed is centered Local $idButton_Add = GUICtrlCreateButton("Add", 64, 32, 75, 25) Local $idButton_Clear = GUICtrlCreateButton("Clear", 64, 72, 75, 25) Local $idMylist = GUICtrlCreateList("buttons that have been clicked", 176, 32, 121, 97) GUICtrlSetLimit(-1, 200) ; to limit horizontal scrolling GUICtrlSetData(-1, $sMESSAGE) Local $idButton_Close = GUICtrlCreateButton("my closing button", 64, 160, 175, 25) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton_Add GUICtrlSetData($idMylist, "You clicked button No1|") Case $idButton_Clear GUICtrlSetData($idMylist, "") Case $idButton_Close MsgBox($MB_SYSTEMMODAL, "", "the closing button has been clicked", 2) Exit EndSwitch WEnd EndFunc ;==>Example Link to comment Share on other sites More sharing options...
BrewManNH Posted April 14, 2019 Share Posted April 14, 2019 HotKeySet could call a function that could send a command to click the button, but you can't click a button without some way of telling it to click the button. Otherwise, what would be the point of having the buttons? BTW, if this is somehow related to game automation, you'd better read the forum rules. 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 Link to comment Share on other sites More sharing options...
Nine Posted April 14, 2019 Share Posted April 14, 2019 OK, we are getting somewhere. Now put (in comment at least) where you want to trigger those button pushes, This cannot be derived on some godly wish... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
jdelaney Posted April 14, 2019 Share Posted April 14, 2019 One way: HotKeySet IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. 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