Tim Net Posted December 8, 2008 Posted December 8, 2008 I've tried this several different ways and can't seem to get it to work. I do have three ico files, resource hacker in the right spot and it does compile. #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\3.ico HotKeySet("{ESC}","quit") while 1 TraySetIcon( "D:\Temp\icon\1.ico",3) sleep(1000) TraySetIcon( "D:\Temp\icon\2.ico",4) sleep(1000) TraySetIcon( "D:\Temp\icon\3.ico",5) sleep(1000) WEnd I just want the tray icon to rotate. Thanks.
DeeRiee Posted December 8, 2008 Posted December 8, 2008 Try this : #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\3.ico HotKeySet("{ESC}","quit") while 1 TraySetIcon( "D:\Temp\icon\1.ico",3) sleep(1000) TraySetIcon( "D:\Temp\icon\2.ico",4) sleep(1000) TraySetIcon( "D:\Temp\icon\3.ico",5) sleep(1000) WEnd Func quit() Exit EndFunc
Tim Net Posted December 8, 2008 Author Posted December 8, 2008 Try what? Don't worry about the quit() function, that works just fine. It's the icon changes that I am trying to get moving. Did I miss something else in the guts of the code? Thanks. Try this : #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\3.ico HotKeySet("{ESC}","quit") while 1 TraySetIcon( "D:\Temp\icon\1.ico",3) sleep(1000) TraySetIcon( "D:\Temp\icon\2.ico",4) sleep(1000) TraySetIcon( "D:\Temp\icon\3.ico",5) sleep(1000) WEnd Func quit() Exit EndFunc
Developers Jos Posted December 8, 2008 Developers Posted December 8, 2008 (edited) You are not referring to the internal stored Icons when you run the compiled script. Look at the example in the SciTE4AutoIt3 helpfile which can be found in the AutoIt3Wrapper section. Jos Edited December 8, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Zedna Posted December 8, 2008 Posted December 8, 2008 (edited) There are default 4 icons in EXE so your first icon must have (negative 1-based) index -5:#AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\Temp\icon\3.ico HotKeySet("{ESC}","quit") while 1 TraySetIcon(@ScriptFullPath,-5) sleep(1000) TraySetIcon(@ScriptFullPath,-6) sleep(1000) TraySetIcon(@ScriptFullPath,-7) sleep(1000) WEndEDIT: Next time post in correct forum. Edited December 8, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Tim Net Posted December 8, 2008 Author Posted December 8, 2008 What group should this have gone to? #AutoIt3Wrapper_Res_Icon_Add=d:\temp\icon\1.ico #AutoIt3Wrapper_Res_Icon_Add=d:\temp\icon\2.ico #AutoIt3Wrapper_Res_Icon_Add=d:\temp\icon\3.ico HotKeySet("{ESC}","quit") while 1 TraySetIcon( @ScriptFullPath,-5) sleep(1000) TraySetIcon( @ScriptFullPath,-6) sleep(1000) TraySetIcon( @ScriptFullPath,-7) sleep(1000) WEnd func quit() Exit endfunc I am using code and arguments that look correct . Resource Hacker(reshack.exe) is in the "C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper" directory(C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\ResHacker.exe) and the "Compile with Options" shows the second tab achecked for "Update Target program resource information". I am using AutoIT 3.2.12.1. If I open .exe with reshacker.exe, I do not see any of the .ico files embedded that I am trying to get working. When I conpile with options, I can see the reference to ResHacker.exe passing by but it just seems like it's not attaching. Any ideas? Thanks.
Developers Jos Posted December 8, 2008 Developers Posted December 8, 2008 (edited) What group should this have gone to?Where it is now... I moved it from Examples. What group should this have gone to? #AutoIt3Wrapper_Res_Icon_Add=d:\temp\icon\1.ico #AutoIt3Wrapper_Res_Icon_Add=d:\temp\icon\2.ico #AutoIt3Wrapper_Res_Icon_Add=d:\temp\icon\3.ico HotKeySet("{ESC}","quit") while 1 TraySetIcon( @ScriptFullPath,-5) sleep(1000) TraySetIcon( @ScriptFullPath,-6) sleep(1000) TraySetIcon( @ScriptFullPath,-7) sleep(1000) WEnd func quit() Exit endfunc I am using code and arguments that look correct . Resource Hacker(reshack.exe) is in the "C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper" directory(C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\ResHacker.exe) and the "Compile with Options" shows the second tab achecked for "Update Target program resource information". I am using AutoIT 3.2.12.1. If I open .exe with reshacker.exe, I do not see any of the .ico files embedded that I am trying to get working. When I conpile with options, I can see the reference to ResHacker.exe passing by but it just seems like it's not attaching. Any ideas? Thanks.Post the text shown in the SciTEoutput pane to see what is happening when you press F7. By the way: Reshacker is not used by AutoIt3Wrapper anymore since the last couple of releases. Jos Edited December 8, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Tim Net Posted December 8, 2008 Author Posted December 8, 2008 It turns out that I was using an old version of Scite and the wrapper. I updated to the newer version and Voila! Sorry for the trouble. The F7 showed me the icon adding now. Thanks.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now