Is there any idea where to start.
I've come across this blog post: how do I write an Alt+Tab replacement program?
Are there any AHK functions that I can use to make things easier.
![Image](https://i.imgur.com/KMjrP07.png)
Code: Select all
!TAB::
{
WinGetClass, CLASSVAR, A
WinGet, PROCESSVAR, ProcessName, A
group_name := CreateGUID()
group_name := StrReplace(group_name, "-")
group_name := Trim(group_name, "{}")
GroupAdd, %group_name%, ahk_exe %PROCESSVAR%
GroupActivate, %group_name% ; activate the next one that matches class and exe but not PID
return
}
; from https://bit.ly/2MIihmb
CreateGUID()
{
VarSetCapacity(pguid, 16, 0)
if !(DllCall("ole32.dll\CoCreateGuid", "ptr", &pguid)) {
size := VarSetCapacity(sguid, (38 << !!A_IsUnicode) + 1, 0)
if (DllCall("ole32.dll\StringFromGUID2", "ptr", &pguid, "ptr", &sguid, "int", size))
return StrGet(&sguid)
}
return ""
}