Hello, When i open the Script Editor and press a random keyboard button it instantly closed the editor without Error. i can do line but when i want to write something in it it instantly closed. How can i fix this? Greeting Levi
Autoitscript Forum
www.autoitscript.com/forum ↗Invision Community-Forum auf Englisch. 8 beobachtete Rubriken: Announcements and Site News, AutoIt GUI Help and Support, AutoItX Help and Support, AutoIt General Help and Support, User Moderation, AutoIt Projects and Collaboration, Old AutoIt v2 Help and Support und AutoIt Technical Discussion.
- Diskussionen pro Tag
- 1
- Eingesammelte Diskussionen
- 214
- Beiträge pro Tag
- 26
- Rubriken
- 8
- Beobachtete Quellen
- 9
- Software
- Invision Community
Neueste Diskussionen
Alle 4 Stunden aus dem öffentlichen Feed des Forums eingesammelt. Wiedergegeben werden nur Titel, Link und der Anfang der Nachricht; jeder Link führt zur Quelle zurück.
Hello. I just had to do a minor adjustment to a script a couple of years old and found this difference: With Autoit 3.3.16.0 it was fine to use "" to specify same widht and hide with cell realtive operations: Opt("guicoordmode",2) ; cell relative for $i = 2 to $a2Buttons[0][0] $a2Buttons[$i][0]=GUICtrlCreateButton("Undefiniert - " & $i,-1,5,"","",$BS_LEFT) GUICtrlSetFont(-1,8.5,$fw_dontcare,$gui_fontnormal,"courier new") GUICtrlSetState(-1,$gui_hide) Next With Autoit 3.3.18.0 the relative buttons don't show up, until the "" is replaced with either "default", or a valid value or variable. After these years of course I do not remember anymore, where I picked this "" from to "use same values as before". Perhaps this more strict behaviour could be added here? https://www.autoitscript.com/autoit3/docs/script_breaking_changes.htm cu, Rudi.
I have been having significant issues showing tooltips on toolbar buttons. For example, if I run the _GUICtrlToolbar_SetToolTips example 10 times, the tooltips work maybe 1 or 2 times out of 10 runs. Sometimes no tooltips show at all Sometimes the tooltips show blank Sometimes the tooltips only show a border Sometimes the tooltips text shows but off-center on the tooltip Sometimes (rarely) the tooltips show properly I have tried responding to $TTN_GETDISPINFOW (like the help file example) and I've also tried $TBN_GETINFOTIPW which also works but suffers the same failure rate. Some online help suggests "Stack-Allocated Buffer Lifetime" and memory related issues for the tooltip text but that is all beyond my understanding. I've also tried forcing AutoIt to run as x86 hoping that it might narrow down the issue but it also failed in the same way. Does anyone know more about why this only works 10-20% of the time? Thank you.
Hello all, I have developed a code to use WinActivate to login to an application for validation/testing. If I RDP to the machine, the code executes successfully. However, if I use an interactive console session, it does not work. I initially thought the root cause was related to the screen resolution, but even after settings the resolution to 1920x1080, the issue still persists. I would greatly appreciate your help. Thank you in advance! -SK
Not an help request, just a reminder for programmers in most languages. The range of integers representable in a signed Int64 is [-9223372036854775808, 9223372036854775807], or hex [0x8000000000000000, 0x7FFFFFFFFFFFFFFF]. This is well known. But what is the range of integers continuously and exactly representable in a 64-bit real ? I happen to have found a bug in a program (not AutoIt) whose author didn't suspect this limitation of the range: It is [-9007199254740992, 9007199254740992], that is 3 orders of magnitude less than for signed Int64. Note that modern CPUs have the capacity to perform intermediate operations using 80-bit floats, but I/O always revert to 64-bit format unless extra caution is involved. Of course applications juggling with such huge values are rare, yet it's worth keeping this limitation in mind.
Hi everyone, I have a noob question: I have a fairly long piece of code, and I've simplified it to the bare essentials to illustrate the problem. When I click a button to trigger a function, I get a spinning hourglass icon in Windows. Strangely enough, the AutoIT GUI works perfectly fine, but I'm sure there must be a small mistake somewhere in the code. Thanks. #NoTrayIcon #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include $Gui = GUICreate( "GUI", 300, 200) $Button_Connectr = GUICtrlCreateButton("&Call Function", 20, 20, 200, 40) GUIStartGroup() GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE then DriveMapDel("P:") Exit EndIf If $msg = $Button_Connectr then F_LWR() Sleep(5) WEnd Func F_LWR() GUISetCursor(15,1) EndFunc
Hello everybody What is the correct way to remove all keys at once in a Map declared as Local Static ? Because cycling through all the keys to remove them one by one isn't user friendly and not a good solution in case of a big Map. I found a way to do it, but maybe you know if there is a native instruction that does it better ? Please have a look at the following canvas, where a user drags one of the Tab controls inside the GUI to move it at a different place (they may be several Tab controls in the GUI as stated in the help file, function GUICtrlCreateTab) : A GUI can only hold a single tab control, but it is possible to create child GUIs each holding a tab control. Func WM_ENTERSIZEMOVE($hWnd, $iMsg, $wParam, $lParam) Switch $hWnd Case $g_hGUIMask If $g_sClassName = "SysTabControl32" Then _TabIsMoving($g_idControl, $WM_ENTERSIZEMOVE) EndIf Case ... ... EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_ENTERSIZEMOVE Func WM_MOVE($hWnd, $iMsg, $wParam, $lParam) Switch $hWnd Case $g_hGUIMask ... ; any control of the GUI just moved here (Tab control or other control), then : If $g_sClassName = "SysTabControl32" Then _TabIsMoving($g_idControl, $WM_MOVE) EndIf Case ... ... EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_MOVE Func WM_EXITSIZEMOVE($hWnd, $iMsg, $wParam, $lParam) Switch $hWnd Case $g_hGUIMask If $g_sClassName = "SysTabControl32" Then _TabIsMoving($g_idControl, $WM_EXITSIZEMOVE) EndIf Case ... ... EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_EXITSIZEMOVE Func _TabIsMov
Hello, I need to run an external program, read its stdout until there's nothing left to read, display whatever stdout + stderr finally contain, and end. For some reason, the following code outputs tons of repeats. I expected 1) each call to StdoutRead() to empty the buffer, and 2) no repeats. What am I doing wrong? Thank you. #include #include #include #include #include #include #include #include $sCMD = @ComSpec & " /c DIR" Local $line = "" Local $foo = Run($sCMD , "C:\", @SW_SHOW, BitOR($STDERR_CHILD, $STDOUT_CHILD)) While Not @error $line &= StdoutRead($foo) ConsoleWrite($line & @CRLF) WEnd ConsoleWrite("Final STDOUT read:" & $line & @CRLF) ConsoleWrite("Stderr Read:" & StderrRead($foo) & @CRLF) ;=> Tons of empty lines, followed by several repeats of the $sCMD command output, followed by a single occurence of "STDOUT read:".
I was looking for a simple function to quickly tell me whether the master volume is muted or not. Most of what I found was old stuff that no longer applies to current versions of Windows. Nothing I found was simple. So this is what I wrote: #include ; needed for _WinAPI_EnumProcessWindows function Switch IsMuted() Case 0 MsgBox(0, "Master Volume", "Not Muted") Case 1 MsgBox(0, "Master Volume", "Muted") Case Else MsgBox(0, "Master Volume", "Unable to determine Muted Status") EndSwitch Func IsMuted() ; Returns 1 if master volume is muted. ; Returns 0 if master volume is not muted. ; In case of a problem, will return -1 and will set @error to -1 also. Local Const $eUnmute = "unmute" ; magic word to look for in text of Volume Mixer window to determine if muted or not ; this word may be different in non-English Windows installs Local $iPID ; PID of SndVol.exe process Local $bCloseProcWhenDone ; First check to see if SndVol.exe is already running. ; If so, use it. If not start a hidden instance of SndVol.exe. $iPID = ProcessExists("SndVol.exe") If $iPID = 0 Then ; No existing process, need to run SndVol.exe. $iPID = Run(@SystemDir & "\SndVol.exe", "", @SW_HIDE) $bCloseProcWhenDone = True Else $bCloseProcWhenDone = False EndIf ; Target window of process will have no Title but will have Class of #32770. ; Text of target window will include the magic word ('unmute' in English) only if mute is on. ; Need to be able to see text on a hidden window Local $iPriorOpt = Opt("WinDetectHiddenT
Hi, I have software that initiates an analysis by clicking a blue button on an open window. I'm trying to automate the initiation using a clicker script that prompts me to enter how many times the script should click. It would be best if the script could find the button automatically since the window may move around and sometimes be in the background. The clicks need to occur approximately 3 minutes apart, as many times as the user enters. It's the blue "stop/play" button in the picture that needs to be clicked. So far I've only found a way to receive input via a GUI: #include #include #include Main() Func Main() $Form1 = GUICreate("Name", 251, 161, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX)) $label1 = GUICtrlCreateLabel("Whatever you want to write", 10, 10) $Input1 = GUICtrlCreateInput("", 24, 96, 201, 21, $ES_NUMBER) GUICtrlSetLimit(-1, 4) $Button1 = GUICtrlCreateButton("OK", 24, 128, 75, 25) $Button2 = GUICtrlCreateButton("Cancel", 152, 130, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If StringLen(GUICtrlRead($Input1)) < 4 Then GUICtrlSetData($Input1, "") Else ConsoleWrite("Success" & @CRLF) EndIf EndSwitch WEnd Local $Counter = 0 While $Counter < $Input1 ; Perform mouse click ; Not sure how to do this ; Sleep for 3 minutes Sleep(60000 * 3) $Counter = $Counter + 1 WEnd EndFunc Thankful for any input : )
hi sorry for disturb I have a code that changes the Windows 11 right-click menu style back to Windows 10, then kills explorer and is supposed to relaunch it, but it doesn't relaunch it—it opens a folder instead. ; AutoIt - Gestione Menu Contestuale Windows 10/11 #include #include ; Crea la finestra $hGUI = GUICreate("Gestione Menu Contestuale", 380, 90, -1, -1, $WS_SYSMENU) $btnON = GUICtrlCreateButton("Tasto DX Win10 Style ON", 10, 20, 160, 50) $btnOFF = GUICtrlCreateButton("Tasto DX Win10 Style OFF", 200, 20, 160, 50) ; Aggiorna stato pulsanti UpdateButtons() GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $btnON ; Attiva stile Windows 10 RunWait(@ComSpec & ' /c reg add "HKCU\SOFTWARE\CLASSES\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /ve /f', "", @SW_HIDE) RestartExplorer() UpdateButtons() Case $btnOFF ; Ripristina stile Windows 11 RunWait(@ComSpec & ' /c reg delete "HKCU\SOFTWARE\CLASSES\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f', "", @SW_HIDE) RestartExplorer() UpdateButtons() EndSwitch WEnd ; Funzione per verificare se lo stile Windows 10 è attivo Func CheckWin10Style() Return RegRead("HKCU\SOFTWARE\CLASSES\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32", "") <> "" EndFunc ; Funzione per aggiornare lo stato dei pulsanti Func UpdateButtons() If CheckWin10Style() Then GUICtrlSetState($btnON, $GUI_DISABLE) GUICtrlSetState($btnOFF, $GUI_ENABLE) Else GUICtrlSetState($btnON, $GUI_ENABLE) GUICtrlSetState($bt
I'm playing around with the DPI related functions for DPI Awareness Context from UEZ's _WinAPI_DPI.au3 UDF. I need to be able to get the DPI Awareness Context values and make decisions based on those returns. The part that I don't understand is that the values for these are: $DPI_AWARENESS_UNAWARE = 0 Global Const $DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = $DPI_AWARENESS_UNAWARE - 3 Global Const $DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = $DPI_AWARENESS_UNAWARE - 4 So my assumption is that I would get a return of -3 for PMv1 and -4 for PMv2. But instead, I am getting a return of 18 for PMv1 and 34 for PMv2. I assume that there must be a way to interpret this return to match the initial -3 or -3 that I thought were the values. If anyone can help me understand this better, I would greatly appreciate it. Here is the script that I am testing: #include ;https://learn.microsoft.com/en-us/windows/win32/api/windef/ne-windef-dpi_awareness Global Enum $DPI_AWARENESS_INVALID = -1, $DPI_AWARENESS_UNAWARE = 0, $DPI_AWARENESS_SYSTEM_AWARE = 1, $DPI_AWARENESS_PER_MONITOR_AWARE = 2 ;https://learn.microsoft.com/en-us/windows/win32/hidpi/dpi-awareness-context Global Const $DPI_AWARENESS_CONTEXT_UNAWARE = $DPI_AWARENESS_UNAWARE - 1 Global Const $DPI_AWARENESS_CONTEXT_SYSTEM_AWARE = $DPI_AWARENESS_UNAWARE - 2 Global Const $DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE = $DPI_AWARENESS_UNAWARE - 3 Global Const $DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = $DPI_AWARENESS_UNAWARE - 4 Global Const $DPI_
214 Diskussionen eingesammelt seit 2 September 2026. Dieses Forum nach Stichwort beobachten →