1

I have a script that activates sublime text window:

#s::
IfWinExist ,Sublime
    {
    ifWinActive
        {
        WinActivatebottom ,Sublime
    }
    else
    {
        WinActivate
    }
    return
}

If there are many windows of sublime text it shows them one after another (each time I press it shows the next window).

My question is: There is one project (moshe.project), That I don't want to show. How I add an expection to it

For example: ifWinExists, Sublime !moshe

1 Answer 1

1
 ; autoexecute section:
SetTitleMatchMode, 2
; GroupAdd, GroupName, WinTitle, WinText, Label, ExcludeTitle
GroupAdd, Sublime_group, Sublime,,,moshe
     return   ; end of autoexecute section


#IfWinExist, ahk_group Sublime_group

#s::
IfWinNotActive, ahk_group Sublime_group
    GroupActivate, Sublime_group, R  ; activates the newest window (the one most recently active)
else
    GroupActivate, Sublime_group  ; activates the oldest window
Return

#IfWinExist

EDIT: Use Window Spy to find the exact title of the window you want exclude.

EDIT2: I modified the code to catch all windows that have "sublime" in the title, and don't have "moshe" in the title.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .