I have a program in which I import a file example.jpg, do a bunch of actions and export it as example.png (file has to have same name). This program in a "save as" window, leaves the file name box empty for some reason, in which I have to type "example" & click the save button. In a background I have main program's window which has this title: (note title changes to the below name as soon as save as dialog appears)
C:\Users\timoshina\Desktop\DONE\example.jpg ahk_class Afx:40000010003:6:18f00bb ahk_exe Program.exe
How can I copy only the "example" from the inactive window's title?
Here is the part of a code:
Code: Select all
#h:: ; test hotkey
SetTitleMatchMode, RegEx
WinWaitActive, Save As ahk_class #32770
IfWinExist, ahk_class Afx:400000:b:10003:6:
; copy file name without extention to clipboard
Send ^v
controlclick, Button2, Save As ahk_class #32770
return