potitpanda Posted April 20, 2008 Posted April 20, 2008 I have added 4 icons in my script with this method. #AutoIt3Wrapper_res_Icon_Add=C:\connecting.ico #AutoIt3Wrapper_res_Icon_Add=C:\connecte.ico #AutoIt3Wrapper_res_Icon_Add=C:\deconnecte.ico #AutoIt3Wrapper_res_Icon_Add=C:\screen.ico How to switch betweenn them ? Actually I use this method TraySetIcon(@ScriptDir & "\connecte.ico") and I want to change it.... in order to use the 4 wrappers.
Swift Posted April 20, 2008 Posted April 20, 2008 Use FileInstall() To install it to the temp dir, and then later use: TraySetIcon("...")!
Developers Jos Posted April 20, 2008 Developers Posted April 20, 2008 (edited) Use FileInstall() To install it to the temp dir, and then later use: TraySetIcon("...")!Nothing wrong with using the ICO's from the resources. This example is included in the SciTE4AutoIt3 helpfile: #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype1.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype2.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype3.ico #AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype-blank.ico #include <GUIConstants.au3> GUICreate("Demo resource ICO's") $h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON) GUISetState() For $x = 0 To 7 $rc = TraySetIcon(@ScriptFullPath, -$x) $rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, -$x) If $x < 3 Then TrayTip("Default ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) Else TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) EndIf Sleep(2000) Next GUIDelete() Edited April 20, 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.
potitpanda Posted April 20, 2008 Author Posted April 20, 2008 Yes, i have seen the example but I Don't understand it ...
Xenobiologist Posted April 21, 2008 Posted April 21, 2008 Hi, you need to compile it. The icons are stored int your exe. Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
potitpanda Posted April 21, 2008 Author Posted April 21, 2008 OKay but i have problem which number is calling Which Icon with this little command ??? I have already tested this, with -5 to 5 range and my resource icons doesn't appear.....
Xenobiologist Posted April 21, 2008 Posted April 21, 2008 Hi, #include <ButtonConstants.au3> #AutoIt3Wrapper_res_Icon_Add=c:\Downloads\Icons\Applications\App001.ico #AutoIt3Wrapper_res_Icon_Add=c:\Downloads\Icons\Applications\App005.ico #AutoIt3Wrapper_res_Icon_Add=c:\Downloads\Icons\Applications\App010.ico #AutoIt3Wrapper_res_Icon_Add=c:\Downloads\Icons\Applications\App015.ico GUICreate("Demo resource ICO's") $h_Button1 = GUICtrlCreateButton("my picture button", 10, 20, 40, 40, $BS_ICON) GUISetState() For $x = 4 To 7 $rc = TraySetIcon(@ScriptFullPath, -$x) $rc2 = GUICtrlSetImage($h_Button1, @ScriptFullPath, -$x) TrayTip("New ico:" & $x, "TraySetIcon rc:" & $rc & @LF & "GUICtrlSetImage rc:" & $rc2, 3) Sleep(2000) Next GUIDelete() Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
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