
Miliardsto
Active Members-
Posts
123 -
Joined
-
Last visited
Everything posted by Miliardsto
-
We have here a working script (Found on this forum - someone said its best way to set timers) I want to set timers in my program cause AdLibRegister crashes, infinite loops etc. Its a working small program to test these timers below. #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> Global $iMemo _Main() Func _Main() Global $hGUI Global $timerID1 = 1, $timerID2 = 2 Global $callBackFunc1, $callBackFunc2 Global $timerName1, $timerName2 $hGUI = GUICreate("My Timers", 400, 296) $iMemo = GUICtrlCreateEdit("", 2, 32, 396, 226, BitOR($WS_HSCROLL, $WS_VSCROLL)) GUICtrlSetFont($iMemo, 9, 400, 0, "Courier New") GUISetState() setTimer($callBackFunc1, $timerName1, $timerID1, 1000, 'hello') setTimer($callBackFunc2, $timerName2, $timerID2, 2000, 'hello2') While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd killTimer($timerName1, $callBackFunc1) killTimer($timerName2, $callBackFunc2) EndFunc ;==>_Main ; ================= MY FUNCS ============================ Func setTimer(ByRef $callBackFunc, ByRef $timerName, $timerID = 1, $time = 1000, $funcName = 'hello') $callBackFunc = DllCallbackRegister($funcName, "none", "hwnd;int;int;dword") $timerName = _WinAPI_SetTimer($hGUI, $timerID, $time, DllCallbackGetPtr($callBackFunc)) EndFunc Func killTimer($timerName, $callBackFunc) _WinAPI_KillTimer($hGUI, $timerName) DllCallbackFree($callBackFunc) EndFunc ; ============================================= ; Write a line to the memo control Func MemoWrite($sMessage) GUICtrlSetData($iMemo, $sMessage & @CRLF, 1) EndFunc ;==>MemoWrite Func _WinAPI_KillTimer($hWnd, $iIDEvent) Local $iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $iIDEvent) If @error Then Return SetError(-1, -1, 0) Return $iResult[0] <> 0 EndFunc ;==>_WinAPI_KillTimer Func _WinAPI_SetTimer($hWnd, $iIDEvent, $iElapse, $pTimerFunc = 0) Local $iResult = DllCall("user32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", $iIDEvent, "int", $iElapse, "ptr", $pTimerFunc) If @error Then Return SetError(-1, -1, 0) Return $iResult[0] EndFunc ;==>_WinAPI_SetTimer Func _TimerCallBackFunc($hWnd, $Msg, $iIDTimer, $dwTime) MemoWrite("Timer " & $iIDTimer & " Fired") For $i = 999 To 1 Step -1 ConsoleWrite($i & @CRLF) Next EndFunc ;==>_TimerCallBackFunc ; ============== Funs to call =============================== Func hello($hWnd, $nMsg, $iIDTimer, $dwTime) MemoWrite("Timer " & $iIDTimer & " Fired") For $i = 999 To 1 Step -1 ConsoleWrite($i & @CRLF) Next EndFunc ;==>_TimerCallBackFunc Func hello2($hWnd, $nMsg, $iIDTimer, $dwTime) MemoWrite("Timer " & $iIDTimer & " Fired") For $i = 999 To 1 Step -1 ConsoleWrite($i & @CRLF) Next EndFunc ;==>_TimerCallBackFunc And i wanted to apply these timers to my final program. I get error: error: doingThings() called by a previous line with 0 arg(s). Min = 4. First previous line calling this Func is 31. Func doingThings($hWnd, $nMsg, $iIDTimer, $dwTime) There are pieces of code below: There I replaced AdlibRegister by setTimer and calling it like in previous working program (just doingThings in last param in setTimer function) Func r_offOn_doingThings() If _Metro_CheckboxIsChecked($r_offOn_doingThings) Then _Metro_CheckboxUnCheck($r_offOn_doingThings) ;AdlibUnRegister("doingThings") killTimer($timerName1, $callBackFunc1) Else If _checkDeclared(True,False) == False Then ; check if is declared to run func (HP,TITLE,REGION)- core_funcs Else _Metro_CheckboxCheck($r_offOn_doingThings) setTimer($callBackFunc1, $timerName1, 1, 1600, "doingThings") ;AdlibRegister("doingsThings", 1800) EndIf EndIf EndFunc And function name with params looks like this Func doingThings($hWnd, $nMsg, $iIDTimer, $dwTime) EndFunc #include Timers.au3 #CS THere are globals vars: globalVariables/timers ByRef $callBackFunc: var ByRef $timerName: var $timerID = 1: var ID $time = 1000: how often call func $funcName: function to call #CE Global $timerID1 = 1, $timerID2 = 2 Global $callBackFunc1, $callBackFunc2 Global $timerName1, $timerName2 Func setTimer(ByRef $callBackFunc, ByRef $timerName, $timerID = 1, $time = 1000, $funcName = "doingThings") $callBackFunc = DllCallbackRegister($funcName, "none", "hwnd;int;int;dword") $timerName = _WinAPI_SetTimer($GUI, $timerID, $time, DllCallbackGetPtr($callBackFunc)) EndFunc Func killTimer($timerName, $callBackFunc) _WinAPI_KillTimer($GUI, $timerName) DllCallbackFree($callBackFunc) EndFunc Func _WinAPI_KillTimer($hWnd, $iIDEvent) Local $iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $iIDEvent) If @error Then Return SetError(-1, -1, 0) Return $iResult[0] <> 0 EndFunc ;==>_WinAPI_KillTimer Func _WinAPI_SetTimer($hWnd, $iIDEvent, $iElapse, $pTimerFunc = 0) Local $iResult = DllCall("user32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", $iIDEvent, "int", $iElapse, "ptr", $pTimerFunc) If @error Then Return SetError(-1, -1, 0) Return $iResult[0] EndFunc ;==>_WinAPI_SetTimer Thats it. And why in first working program it does not say this function below is calling with 0 args but Min is 4? setTimer($callBackFunc1, $timerName1, 1, 1600, "doingThings") When I applied this code to my final program it wants 4 arguments in function call. I rode i cant pass parameters to the callback func . What I have to do. I tried something like this: Func doingThings($hWnd = Default, $nMsg = Default, $iIDTimer = Default, $dwTime = Default) but then function is not working dont know whats going on
-
I made function by hotkey. It use ALT+END one time and no use ALT+HOME. Sometimes it uses ALT+HOME only ; Press Esc to terminate script, Pause/Break to "pause" #include <Color.au3> #include <MsgBoxConstants.au3> HotKeySet("{ESC}", "Terminate") HotKeySet("{F1}", "Zooming") ;;;; Body of program would go here ;;;; While 1 Sleep(10) WEnd ;;;;;;;; Func Zooming() ;Send("{ALTDOWN}") ; Send("{HOME}") ;Sleep(150) Send("!{END 5}") Sleep(100) Send("!{HOME}") EndFunc Func Terminate() Exit 0 EndFunc ;==>Terminate
-
I want to send 5 times ALT+END keys and 1 time ALT+HOME I have tried a lot of variations like etc: Send("{ALTDOWN}") Send("{END}") Send("{ALTUP}") // other Send("{!END}") Send("!{END}") // other Send("{ALT DOWN}") Sometimes it worked one time pressed, but it must be send 5 times.
-
Im making requests to REST API WORDPRESS is it right code ? $metabox = 'meta_box={"uuid":" ' & urlEncode($MY_ID) & ' "}' _httpRequest("https://MYSITE/wp-json/wp/v2/users/" & $id &"?", "POST", $metabox,$success) In postman im making request like this and its working. it should be the same in autoit https://MYSITE/wp-json/wp/v2/users/8?meta_box={"uuid": "2342342342"}
-
I have errors like this ### StripOnly/StripFunc Error: Found Call() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function. >### current Func: checkAndRun d:\pliki\autoit3\lofty-tibiabot v2\#po zmianach adlibregister\inc\jsondb\jsondb.au3(155,1): Warning for line:Call($funcName) -### StripOnly/StripFunc Error: Found Call() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by this Function. >### current Func: checkAndRun d:\pliki\autoit3\lofty-tibiabot v2\#po zmianach adlibregister\inc\jsondb\jsondb.au3(157,1): Warning for line:Call($funcName) How to deal with that errors my function looks like this below. Depends on $funcName it calls that function by this passed name. How to change code to make it working? I have tried this code to ignore but not working too. Func checkAndRun($offOn,$checkbox,$funcName,$toggle=False) ; this func check state of running function (checked checkbox) and check it or uncheck depends of state from json DB ; 1 off / on value from mobile phone - so want to on or off ? ; 2 checkbox which one is it to determine if its checked now or no in bot ; 3 for toggles (default all are checkboxes) $checkedOrNo = $toggle ? _Metro_ToggleIsChecked($checkbox) : _Metro_CheckboxIsChecked($checkbox) ; added Off/On values becouse steppers in mobile has values Off/On ; changed to Yes/No ; Do nothing becouse the same values If $checkedOrNo == False And ( $offOn == False Or $offOn == "No" ) Then ; do nothing Return ElseIf $checkedOrNo == True And ( $offOn == True Or $offOn == "Yes" ) Then ; do nothing Return ; not the same so make function call ElseIf $checkedOrNo == True And ( $offOn == False Or $offOn == "No" ) Then ; stop func ConsoleWrite("Stop func " & $funcName) Call($funcName) ElseIf $checkedOrNo == False And ( $offOn == True Or $offOn == "Yes" ) Then ; run func Call($funcName) ConsoleWrite("Run func " & $funcName) EndIf EndFunc I run these function above in other files like that: checkAndRun($offOn_heal,$s_offOn_heal,"s_offOn_heal") ; checkbox checkAndRun($offOn_healSec,$s_offOn_healSec,"s_offOn_healSec") ; checkbox checkAndRun($offOn_spell,$s_offOn_spell,"s_offOn_spell") ; checkbox
-
how to use this? from hold left button from x y and up on x y+300 #include <ImageSearch.au3> #include <SendMessage.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> Opt("MouseCoordMode", 1) global $y, $x, $x2, $y2 $sText = "Swintusz" $handle = WinGetHandle($sText) Sleep(200) dragAr() Func dragAr() Local $search = _ImageSearch('ar.bmp', 0, $x, $y, 32) If $search = 1 Then Local $hWndControl = $handle ; Set to handel of the control Local $wParam = 0 Local $lParam = BitRotate($x,16,"D") $lParam = BitXOR($lParam,$y) _SendMessage($hWndControl, $WM_LBUTTONDOWN,$wParam,$lParam) Sleep(1000) $y=$y+330 Local $wParam = 0 Local $lParam = BitRotate($x,16,"D") $lParam = BitXOR($lParam,$y) _SendMessage($hWndControl, $WM_LBUTTONDOWN,$wParam,$lParam) EndIf EndFunc
-
Hello I have problem with traymenu. If I run function trayMenu() with has inside while loop of course main loop (main program with gui) does not work. This is how it looks in init file trayMenu() #include "../inc/whileLoop.au3" Func trayMenu() Global $trayExit = TrayCreateItem("Exit") TraySetState($TRAY_ICONSTATE_SHOW) ; Show the tray menu. While 1 Switch TrayGetMsg() Case $trayExit ; Exit the loop. Terminate() EndSwitch Wend EndFunc #MAIN LOOP While 1 $nMsg = GUIGetMsg() Switch $nMsg ; ===================================================== CORE ACTIONS ========================================================================== Case $GUI_EVENT_CLOSE, $GUI_CLOSE_BUTTON _Metro_GUIDelete($GUI) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Exit Case $GUI_MINIMIZE_BUTTON GUISetState(@SW_MINIMIZE, $GUI) Case $GUI_EVENT_RESTORE restore_switchGUI() ;_switchGUI($gui_active,$gui_active) ; normal switch causing problem Case $GUI_MENU_BUTTON ;Create an Array containing menu button names Local $MenuButtonsArray = $menusArray ; get from global array ; Open the metro Menu. See decleration of $MenuButtonsArray above. Local $MenuSelect = _Metro_MenuStart($GUI, 140, $MenuButtonsArray) EndSwitch WEnd is there possibility to main loop contain second switch for TrayGetMsg() ? Or how achieve it working together
-
Peace Equalizer shows power of AutoIt
Miliardsto replied to PeterVerbeek's topic in AutoIt Example Scripts
great work man- 52 replies
-
Im trying to use FastFind but it still givin me a wrong coordinates. My red color from function is in the middle of the screen and the mouse go to the left of screen. How to search for that. My recnangle to search look like this in attachment #include "FastFind.au3" HotKeySet("{F9}", "ShowMe") HotKeySet("{ESC}", "Terminate") $FFhWnd = WinGetHandle("[ACTIVE]") FFSetWnd($FFhWnd) While 1 Sleep(10) WEnd Func ShowMe() $color = 0x00EE0000 $color1 = 0x00FA0000 $sVariation = 20 Local $aCoords = FFBestSpot(32, 30, 70, 500, 500, 0x00EE0000, $sVariation) ;Local $aCoords = FFNearestSpot(32, 30, 600, 600, 0x00FA0000,$sVariation) If Not @error Then ;MsgBox(0, "Coords", $aCoords[0] & ", " & $aCoords[1]) ConsoleWrite("Coords" & $aCoords[0] & " " & $aCoords[1] & " Found pixels in coolor = " & $aCoords[2] & @LF ) MouseMove($aCoords[0], $aCoords[1]) Else MsgBox(0, "Coords", "Match not found.") EndIf EndFunc Func Terminate() Exit 0 EndFunc ;==>Terminate In that file are functions widely described. https://github.com/FastFrench/FastFind/blob/master/FF help/Examples/HelpFile/FastFind.au3
-
This tool is so powerful. Is it possible to tracking object with autoit in real time on the screen? Please some links, examples of code, tips , whatever, on how to achieve this
-
Detect rectangular shapes
Miliardsto replied to Miliardsto's topic in AutoIt General Help and Support
aaa ok xd. sorry man I dont know why I made assumption in my mind its your UDF without comparing your nick and this thread author nick xD -
Detect rectangular shapes
Miliardsto replied to Miliardsto's topic in AutoIt General Help and Support
Wow I made research. Tried your examples. This tool is so powerfull. I am interested in tracking these objects (squares) in real time on the computer screen. Have you already done such things with the use of opencv and autoit? Please give me links, examples of code, tips , whatever, on how to achieve this with the help of your functions rewritten in autoit. Thanks you man -
In attachmens are the similiar rectangular shapes which one I want to detect and then make a mouse click inside center of this square. So on the screen would appear shape like this (various colors) And how to detect them? Thats what I invented and tried to do but it is still inefficient. If you have any ideas how to detect these shapes or there are UDFs to use in this case or something. Please tell me. ImageSearch would be useless I think becouse cant set transparent inside square. I can search for a piece of square (corners better) but there could be a few colors and sometimes corners and pieces of rectangulars are covered. I can use pixelsearch. It should search from top left to right bottom always but it doesnt I dont know why . If it would then I can get x and y of first top-left pixel of square and then check pixelgetcolor for some next pixels and be sure thats the searched square but pixelsearch, sometimes detect pixel with definied color in right of square, sometimes in left, sometimes in bottom... its code for this pixelsearch but it does not work properly so its here only for viewing purposes ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused, $Runner HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") ;;;; Body of program would go here ;;;; While 1 Sleep(10) WEnd ;;;;;;;; Func TogglePause() $Paused = Not $Paused While $Paused Sleep(10) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func ShowMe() $shadeVariation = 2 $red = 0xFF0000 $redSec = 0xF40000 $red3 = 0x8B0000 $green = 0x00ff00 $green2 = 0x00f200 $leftTopX = 130 $leftTopY = 130 $rightBottomX = 800 $rightBottomY = 800 $red_cord = PixelSearch($leftTopX, $leftTopY,$rightBottomX, $rightBottomY, $red,$shadeVariation) $redSec_cord = PixelSearch($leftTopX, $leftTopY,$rightBottomX, $rightBottomY, $redSec,$shadeVariation) $red3_cord = PixelSearch($leftTopX, $leftTopY,$rightBottomX, $rightBottomY, $red3,$shadeVariation) If IsArray($red_cord) = True Then checkIfIts($red,$red_cord) ; -------------------------------------------------------- Elseif IsArray($redSec_cord) = True Then checkIfIts($red3,$redSec_cord) ; -------------------------------------------------------- Elseif IsArray($red3_cord) = True Then checkIfIts($redSec,$red3_cord) ; -------------------------------------------------------- Else MsgBox(0,"!","Could not find colur") EndIf EndFunc ;==>ShowMe Func checkIfIts($color,$cord) MouseMove($cord[0], $cord[1], 1) ConsoleWrite($cord[0] & " " & $cord[1]+90) ; check 2 x times in bottom and 2x in right to be sure its a target $firstShift = 20 $secondShift = 50 $bottom1 = Hex(PixelGetColor($cord[0], $cord[1]+$firstShift)) ;Sleep(1000) MouseMove($cord[0], $cord[1]+$firstShift, 1) $bottom2 = Hex(PixelGetColor($cord[0], $cord[1]+$secondShift)) $right1 = Hex(PixelGetColor($cord[0]+$firstShift, $cord[1])) $right2 = Hex(PixelGetColor($cord[0]+$secondShift+10, $cord[1])) ConsoleWrite("color = " & Hex($color) & @LF) ConsoleWrite("color bottom = " & $bottom1 & @LF) ConsoleWrite("color bottom2 = " & $bottom2 & @LF) ConsoleWrite("color right1 = " & $right1 & @LF) ConsoleWrite("color right2 = " & $right2 & @LF) If $bottom1 = $color Or $bottom2 = $color Or $right1 = $color Or $right2 = $color Then MouseMove($cord[0], $cord[1], 1) EndIf EndFunc
-
How to make function run which one make WinSetOnTop when GUI is active or when user focusing on program (everytime when user interact with program) ? Im trying with GUIRegisterMSG like here #include <Date.au3> #include <MsgBoxConstants.au3> #include <GuiListBox.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> HotKeySet("{ESC}", "Terminate") Global $gui = GUICreate("Test", 150, 58,@DesktopWidth-300,@DesktopHeight-58,$WS_POPUP,BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) Global $idListview = GUICtrlCreateListView("", 0, 0, 150, 58,BitOR($LBS_NOTIFY,$LBS_SORT), 0) ;_GuiCtrlMakeTrans(-1,100) ; Add column _GUICtrlListView_AddColumn($idListview, "Msgs", 100) GUICtrlSetFont(-1, 7, 400, 0, "Segoe UI") GUICtrlSetColor(-1, 0x470C4F) GUICtrlSetBkColor($idListview, 0x310638) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Terminate() Exit EndFunc GUIRegisterMsg ( $WM_ACTIVATE, "makeOnTop" ) Func makeOnTop($hWnd, $iMsg, $iwParam, $ilParam) WinSetOnTop($msgList, "", $WINDOWS_ONTOP) ; Need to do it becouse it disappears Return $GUI_RUNDEFMSG EndFunc
-
I have the following code. You can see there are $color_normal and $color_trans In my case normal is too dark . And color trans is to much violet. If you run it you will see how its looks. I want gui with listView have the same color like taskbar in windows 10. How to achieve that? #include <Date.au3> #include <MsgBoxConstants.au3> #include <GuiListBox.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> HotKeySet("{ESC}", "Terminate") $color_normal = "0x" & StringLeft(StringRight(RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentPalette"), 24), 6) $color_trans = "0x" & StringLeft(StringRight(RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentPalette"), 16), 6) $trans = RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency") ConsoleWrite("Transpart = " & $trans & @CRLF) ConsoleWrite("Color normal = " & $color_normal & @CRLF) ConsoleWrite("Color trans = " & $color_trans & @CRLF) ConsoleWrite(_Get_taskbar_color()); It return AARRGGBB $taskbarColor = _Get_taskbar_color() Global $gui = GUICreate("Test", 150, 58,@DesktopWidth-300,@DesktopHeight-58,$WS_POPUP,BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) Global $idListview = GUICtrlCreateListView("", 0, 0, 150, 58,BitOR($LBS_NOTIFY,$LBS_SORT), 0) ;_GuiCtrlMakeTrans(-1,100) ; Add column _GUICtrlListView_AddColumn($idListview, "Msgs", 100) GUICtrlSetFont(-1, 7, 400, 0, "Segoe UI") GUICtrlSetColor(-1, 0x470C4F) GUICtrlSetBkColor($idListview, 0x310638) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Terminate() Exit EndFunc Func _Get_taskbar_color() If RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "ColorPrevalence") Then If RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency") Then Return "0xD9" & StringLeft(StringRight(RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentPalette"), 16), 6) Else Return "0xFF" & StringLeft(StringRight(RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Accent", "AccentPalette"), 24), 6) EndIf Else If RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize", "EnableTransparency") Then Return "0xD9000000" Else Return "0xFF000000" EndIf EndIf EndFunc
-
Thats my code and you can se how I call func checkAndRun() Third parameter is the same as second but second is a variable name with $ and the third parameter is the function name as string. ; run func checkAndRun($offOn_heal,$s_offOn_heal,"s_offOn_heal") ; checkbox Func checkAndRun($offOn,$checkbox,$funcName,$toggle=False) ; this func check state of running function (checked checkbox) and check it or uncheck depends of state from json DB ; 1 so want to on or off ? ; 2 checkbox which one is it to determine if its checked now or no ; 3 for toggles (default all are checkboxes) If Not $toggle Then $checkedOrNo = _Metro_CheckboxIsChecked($checkbox) Else $checkedOrNo = _Metro_ToggleIsChecked($checkbox) EndIf $func = "$checkbox" ConsoleWrite("func - " & $func) If $checkedOrNo == False And $offOn == False Then Return ElseIf $checkedOrNo == True And $offOn == True Then Return ElseIf $checkedOrNo == True And $offOn == False Then ConsoleWrite("Stop func " & $funcName) Call($funcName) ElseIf $checkedOrNo == False And $offOn == True Then Call($funcName) ConsoleWrite("Run func " & $funcName) EndIf EndFunc So is there possibility to after call func like this with 2 parameters checkAndRun($offOn_heal,$s_offOn_heal) ; checkbox and in body of function make something like this to get from this -> $s_offOn_heal to this -> "s_offOn_heal"
-
Send msg to message loop (while loop)
Miliardsto replied to Miliardsto's topic in AutoIt General Help and Support
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 -
Send msg to message loop (while loop)
Miliardsto replied to Miliardsto's topic in AutoIt General Help and Support
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 -
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
-
JSON encode backslashes problem
Miliardsto replied to Miliardsto's topic in AutoIt General Help and Support
accidentaly posted in xsomething . and on json thread copied just link. sorry -
JSON encode backslashes problem
Miliardsto replied to Miliardsto's topic in AutoIt General Help and Support
please help me -
JSON encode backslashes problem
Miliardsto replied to Miliardsto's topic in AutoIt General Help and Support
kkk