Code: Select all
msgbox % := Win_DetectInput("SciTE.exe")
Win_DetectInput(title){
StringTrimRight, title, Tcut, 4
If Title = #32768
TheTit := "ahk_class . title"
Else if title is xdigit
TheTit := "ahk_id . title"
Else if strlen(Title) = 4
thetit := "ahk_pid . Title"
Else if Instr(Title, ".exe")
Thetit := "ahk_exe . title"
Else if title := TCut
Thetit := Title
Else if title contains Class
Thetit := "ahk_class . Title"
Else if title contains _
Thetit := "ahk_class . Title"
Else if title contains -
Thetit := Title
Else if title contains SciTE
Thetit := "ahk_class" . Title
Return TheTit
}
However, its returning blank. Even when I msgbox % title at the very beginning, its blank. HOWEVER when I put SciTE4AutoHotkey, it returns positive as being active,m therefore it works. Its working in the sense that not working still "works" for any window title.
Anyway, I think this one is a bit beyond me, or im just burnt and missing something easy. Anyway, thought Id share my Idea. I also made a run script