>>847
Shell_TrayWndってタスクバーのことだろ?

F1::
WinHide, ahk_class Shell_TrayWnd
Return

F2::
WinShow, ahk_class Shell_TrayWnd
Return

だけのスクリプトで試したけど何も問題無いぞ
そもそもこんなことしなくてもOS側設定の自動的に隠すオンと、WinActivateだけで事足りると思うんだが