Can I change a script taskbar icon of a msgbox?
Can I change a script taskbar icon of a msgbox?
The tray icon is not visible and the script don't have a gui,just a simple msgbox that appears on a condition
Re: Can I change a script taskbar icon of a msgbox?
Courtesy of StackOverflow.
https://stackoverflow.com/questions/12573868/how-do-i-set-the-autohotkey-msgbox-taskbar-icon
Since you're not using a Gui for your script, it seems this would best achieve the results you requested.
+OwnDialogs hides the MsgBox's taskbar item, and we compensate using an "invisible" Gui with a custom icon to imitate the MsgBox taskbar item.
https://stackoverflow.com/questions/12573868/how-do-i-set-the-autohotkey-msgbox-taskbar-icon
Since you're not using a Gui for your script, it seems this would best achieve the results you requested.
Code: Select all
#SingleInstance, Force
#NoTrayIcon
Menu, Tray, Icon, Shell32.dll, 5 ; Folder icon
Gui, +OwnDialogs
Gui, Show ; Since it has zero dimensions, it should be invisible.
MsgBox, Testing...
ExitApp
+OwnDialogs hides the MsgBox's taskbar item, and we compensate using an "invisible" Gui with a custom icon to imitate the MsgBox taskbar item.
Re: Can I change a script taskbar icon of a msgbox?
Simply precede the MsgBox line with "Gui +OwnDialogs". AHK hidden window becomes the owner of the MsgBox, suppressing the taskbar button.
Code: Select all
#SingleInstance Force
#NoEnv
#NoTrayIcon
Gui +OwnDialogs
MsgBox
ExitApp
Who is online
Users browsing this forum: No registered users and 136 guests