Links
Comment on page

👨‍💻 Scriptler

AutoHotkey (AHK) ile ilgili script örnekleri ve açıklamalar

🚀 Kişisel Pencere Yöneticim

🌟 Faydalı Scriptler

👨‍💼 Pencere Yönetimi

Exe
Class
WinGet, id, list, ahk_exe %ahk_exe%
Loop, %id%
{
this_ID := id%A_Index%
WinGetTitle, title, ahk_id %this_ID%
If (title = "")
continue
; İşlem
}
IfWinExist, ahk_class CabinetWClass
{
IfWinNotActive, ahk_class CabinetWClass
WinActivate, ahk_class CabinetWClass
Else
{
WinMinimize
WinHide
}
}

👁‍🗨 Pencereyi Gizleme / Gösterme

Görev Çubuğuna Alma
İkon Kısmına Alma
İkon Kısmına Alma
ToggleWindow(windowName)
{
WinGet, WinState, MinMax, %windowName%
if (WinState == -1)
{
WinRestore
WinActivate
}
else
{
WinMinimize
WinMinimize ; Tureng için 2 tane pencere açılıyor
}
return
}
ToogleTray(windowName, mode=3)
{
SetTitleMatchMode, %mode%
DetectHiddenWindows, Off
IfWinNotExist, %windowName%
{
WinRestore
WinShow
WinActivate
}
else
{
WinHide
}
return
}
ToogleTrayWithId(ahkId, mode=3)
{
SetTitleMatchMode, %mode%
DetectHiddenWindows, Off
IfWinNotExist, ahk_id %ahkId%
{
WinRestore
WinShow
WinActivate
}
else
{
WinHide
}
return
}

✨ Pencere Yoksa Oluşturma ve Gizleme / Gösterme

Görev Çubuğu
İkon
İkon 2
ShowWin(windowName, url, mode=3)
{
SetTitleMatchMode, %mode%
IfWinExist, %windowName%
ToggleWindow(windowName)
else
Run, %url%
return
}
ShowTray(windowName, url, mode=3)
{
SetTitleMatchMode, %mode%
DetectHiddenWindows, On
IfWinExist, %windowName%
ToogleTray(windowName, mode)
else
Run, %url%
return
}
ShowTrayWithClass(className, url, mode=3)
{
SetTitleMatchMode, %mode%
DetectHiddenWindows, On
found := False
WinGet, id, list, ahk_class %className%
Loop, %id%
{
this_ID := id%A_Index%
IfWinExist ahk_id %this_ID%
{
WinGetTitle, title
If (title = "")
continue
ToogleTrayWithId(this_ID, mode)
found := True
}
}
If (!found)
Run, %url%
return
}

🎴 Hesap Makinesini Tray Icon Olarak Açma

#Persistent
Menu, Tray,Icon, Calc.exe, 1
Menu, Tray, NoStandard
Menu, Tray, Add, &Calculator, Calc
Menu, Tray, Add,
Menu, Tray, Standard
Menu, Tray, Default, &Calculator
Return
Calc:
If WinExist("Calculator")
WinClose, Calculator
else
Run, Calc.exe
Return

🧹 Taskbar'dan Kaldırma

WinSet, ExStyle, ^0x80, ahk_id %ahkID%

🧐 Aktif Olan Tüm Pencerelerin ID'sini Alma

WinGet, WindowID, List
Loop, % WindowID {
cWindow = % WindowID%A_Index%
WinGetTitle, Title, ahk_id %cWindow%
WinGetClass, Class, ahk_id %cWindow%
Message=% Message "`n" Class "`t`t" Title
}
MsgBox, 64, List of Visible Windows, %Message%
ExitApp
2023 © Yunus Emre AK