# [alt]キーダブルタップでVSCodeを保存してChromeへ切り替え
~LAlt:: ;~ prefix when the hotkey fires, its key's native function will not be blocked
IF !(A_TickCount < LAlt)
{
KeyWait, LAlt
LAlt := A_TickCount + 150
Return
}
LAlt =
If WinActive("ahk_exe chrome.exe"){ ;Chromeがアクティブな時は何もしない
}else If WinActive("ahk_exe Code.exe"){ ;VS Codeがアクティブなら保存してChromeをアクティブにする
Send,^+s
WinActivate,ahk_exe chrome.exe
}else{
WinActivate,ahk_exe chrome.exe ;それ以外はChromeをアクティブにする
}
return
# [alt]キーダブルタップで Chromeへ切り替え
~LAlt:: ;~ prefix when the hotkey fires, its key's native function will not be blocked
IF !(A_TickCount < LAlt)
{
KeyWait, LAlt
LAlt := A_TickCount + 150
Return
}
LAlt =
IfWinExist ahk_class Chrome_WidgetWin_1
winactivate ahk_class Chrome_WidgetWin_1
else
Run chrome.exe
WinWaitActive ahk_class Chrome_WidgetWin_1
Return
# [alt]キーダブルタップで Chrome起動
~LAlt:: ;~ prefix when the hotkey fires, its key's native function will not be blocked
IF !(A_TickCount < LAlt)
{
KeyWait, LAlt
LAlt := A_TickCount + 500
Return
}
LAlt =
Run chrome.exe
Return