Hi,
How do I correct this script please?
Many Thanks
Gareth
Script error "Error: Can;t load icon."
Re: Script error "Error: Can;t load icon."
by not making up imaginary file extensions .iconfile
Re: Script error "Error: Can;t load icon."
I think this wasn't meant as a file extension, but the OP wants to access the associative array named script which we can also see in the error message, so my guess would be:
Code: Select all
Menu, Tray, Icon, % script.iconfile
Re: Script error "Error: Can;t load icon."
in that case the error dialog doesnt make any sense. filepath-accepting command parameters shouldnt support expressions by default(and im pretty sure Menu tray, Icon in this case doesnt), and yet script.iconfile is not interpreted literally but dereferenced(ive just noticed). either the error dialog doesnt report %s that actually exist in the code or idk whats going on. ill have to add this to my evergrowing list of reasons not to use v1.. ever.
post the actual code. even so, u wont be able to debug the error since the only error reporting these icon functions do amounts to "it didnt work". ull have to either run the script under the visual studio debugger and step through ahk's source or u can try replicating the source with DllCalls and implement ur own error check. but most probably, its because the icon file doesnt exist(eg ur antivirus has already deleted it from appdata/roaming)
post the actual code. even so, u wont be able to debug the error since the only error reporting these icon functions do amounts to "it didnt work". ull have to either run the script under the visual studio debugger and step through ahk's source or u can try replicating the source with DllCalls and implement ur own error check. but most probably, its because the icon file doesnt exist(eg ur antivirus has already deleted it from appdata/roaming)