Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find a "Save As" window with AutoHotkey?

Tags:

autohotkey

I'm trying to find out if there is a "Save As" box open with this WinExist script

if WinExist,Save As,Save As
MsgBox, is there
else
MsgBox, is not there
like image 371
Steve Avatar asked Dec 03 '25 12:12

Steve


1 Answers

Your original code is almost correct:

  • The space between if and WinExist must be removed.
  • The second parameter of ifWinExist is WinTitle. If the Save As dialog does not contain the text "Save As", you must remove that second parameter. This is the case on my Windows 7 system with English (Australia) regional settings.

Working examples:

; ifWinExist command
ifWinExist, Save As
    MsgBox, is there
else
    MsgBox, is not there

; if(expression) and WinExist() function
if WinExist("Save As")
    MsgBox, is there
else
    MsgBox, is not there

You can also combine criteria:

ifWinExist, Save As ahk_class #32770
like image 137
Lexikos Avatar answered Dec 07 '25 15:12

Lexikos