Thanks to both of you for your help - I've tried both suggestions, the script still functions but the tray icons are still stock.
I want to post another working script I have where the icons do in fact change to the ones I have specified. Bear in mind this and the other script are launched from the same directory, the .ico files are in that directory and both using AutoHotKey v1.1.22.07. Please also bear in mind I am no coder, using Autohotkey for the most basic of scripts - the very first script I wrote was to disable the Win key which was a huge nuisance during my FPS gaming sessions.
Code: Select all
#NoEnv
#persistent
SetWorkingDir %A_ScriptDir%
#SingleInstance force
Menu, Tray, NoStandard
Menu, Tray, Add , Pause, Pau
Menu, Tray, Add , Suspend, Sus
Menu, Tray, Add , Reload, Rel
Menu, Tray, Add , Exit, Exi
Menu, Tray, Default, Exit
Menu, Tray, Icon , normal.ico,, 1
Return
F10::Media_Prev
F12::Media_Next
F11::Media_Play_Pause
F1::Volume_Mute
F2::Volume_Down
F3::Volume_Up
Pau:
MsgBox Test
Return
RCtrl::
suspend
GoTO refreshICON
Sus:
Suspend, Toggle
refreshICON:
if (A_IsSuspended)
Menu, Tray, Icon , red_s.ico
Else
Menu, Tray, Icon , normal.ico
Return
Exi:
ExitApp
Return
Rel:
Reload
Return