Apparently you can't use a function with variables for AdlibRegister
Like you declare it with a variable even an optional one and it throws an error if you try and call it
Thats ok though I figured out a hack using eval to get a better result
Registered_Funct(250);Register Sleep(10000) Registered_Funct(-1);UnRegister Func Registered_Funct($iTime = -1) Local $i_Time = Eval("iTime") If $i_Time > 0 Then AdlibRegister("Registered_Funct", $i_Time) ElseIf $i_Time < 0 Then AdlibUnRegister("Registered_Funct") Else ConsoleWrite("Do Stuff") EndIf EndFunc
Surely it has an impact on efficiency though...
hi all, how can i move mouse to the place where pixel changes
While Sleep (3000)
$pix = PixelChecksum(0,0,55,55)
If IsArray($pix) = True Then
Hello, and good day
Im trying to make a sentence autocompleter so that when you type certain words (or commands) the scripts, and im in need of help/pointers
That is what i have at the time and the issues i have currently is that:
- I cant find an easy way to reset the counter to 0 in case a different letter from those are pressed ( tried NOT _ispressed but i think i got it wrong)
-Is there another way to detect the key press that _ispressed? (i couldnt find it so far), since i feel like it is too clunky ( although maybe that is just me and my way to code)
- for some reason the hex code (6F) for the / (divide nume pad) isnt working for me
Im thinking of making a text file with some words to use them as variables/comparations (so that at least removes the need of a variable for the words in the script) and make the script make a temporal text file to save the input and then compare it with the other one. But i dont know if that is a good approach.
Thanks for your time and patience.
Is there any difference in timers and AdlibRegister ?
performance usage reliability or any kind of difference I want use few timers at once so it will make difference.
I have problem with timers and I saw AdlibRegister behaves similar like:
wont stop crashing slowing program so much maybe is there any trick to make it better?
I want when clicking the exit button the window will close. If content changes upon exit the program will automatically choose not save.
Look forward to the help, thanks.
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <AutoItConstants.au3> $GUI = GUICreate("Form1", 220, 119, 192, 124, $WS_SYSMENU) GUISetFont(10, 400, 0, "Tahoma") GUICtrlCreateGroup("Chuẩn bị trình chiếu", 16, 16, 185, 65) $ok_Button = GUICtrlCreateButton("Ok", 32, 48, 75, 25) $exit_Button = GUICtrlCreateButton("Exit", 112, 48, 75, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $ok_Button ShellExecute(@MyDocumentsDir&'\Dich-thuat\Short-Document.pdf', "", "", Default, @SW_MAXIMIZE) WinWaitActive("Data and Computer Communications (Eighth Edition) - Google Chrome") ShellExecute(@MyDocumentsDir&'\Dich-thuat\Document.rtf', "", "", Default, @SW_MAXIMIZE) WinWaitActive("Document.rtf [Compatibility Mode] - Word") ShellExecute(@MyDocumentsDir&'\Dich-thuat\Presentation1.pptx', "", "", Default, @SW_MAXIMIZE) WinWaitActive("Presentation1.pptx - PowerPoint") MouseClick("left", 1381, 886, 1) Sleep(2000) MsgBox(64, "Thông báo", "Đã chuẩn bị xong") Case $exit_Button WinClose("Presentation1.pptx - PowerPoint") ;I need help handling this place Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd