How do i pin an ahk script to the taskbar on windows 11

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
moltenlava
Posts: 1
Joined: 11 Jan 2022, 12:14

How do i pin an ahk script to the taskbar on windows 11

Post by moltenlava » 20 Jan 2022, 08:55

More of a windows problem than an ahk problem but ive googled a lot but i cant seem to find any hits, for those that dont know, dragging and pinning was removed in windows 11. Most other apps have a pin to taskbar option in the right click menu but all of my ahk scripts dont seem to have this option.
Is there no other way other than converting it to an exe?
Image
Attachments
image.png
image.png (19.15 KiB) Viewed 1701 times

User avatar
mikeyww
Posts: 26599
Joined: 09 Sep 2014, 18:38

Re: How do i pin an ahk script to the taskbar on windows 11

Post by mikeyww » 20 Jan 2022, 09:22

Welcome to this AutoHotkey forum!

Unless GUI is shown, there is typically no AHK window to pin to the taskbar. The AHK icon runs in the system tray.

lexikos
Posts: 9553
Joined: 30 Sep 2013, 04:07
Contact:

Re: How do i pin an ahk script to the taskbar on windows 11

Post by lexikos » 15 Apr 2022, 19:30

I don't recall being able to "drag and pin" (or pin by any other means) an individual document or script file to the taskbar on Windows 7 or 10. Only programs could be pinned to the taskbar directly. I suggest the following:

You could create a shortcut to AutoHotkey.exe, append the script path as a parameter, and pin the shortcut. I used this approach on Windows 10, and it is still working after upgrading to 11.

You could create a copy of AutoHotkey.exe, rename it to the same as the script (but with the .exe extension) and place it in the same directory as the script. Then pin the exe. To change the icon you can either use a PE resource editor, or create a shortcut to the exe, customize the icon and pin the shortcut. As before, you can edit and reload the script without "recompiling" or otherwise updating the exe, but you might want to update it when you update AutoHotkey.

Post Reply

Return to “Ask for Help (v1)”