mesale0077 14 Posted May 30, 2010 (edited) hi this code worked #AutoIt3Wrapper_Res_Icon_Add=D:\ee\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\4.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\5.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\6.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\7.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\8.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\9.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\10.ico #include <GuiConstants.au3> $gui = GUICreate("GUI", 400, 400 -1, -1) GUISetState(@SW_SHOW) Do uu() Until GUIGetMsg() = -3 func uu() for $icoo = 5 to 14 $ico = $icoo * (-1) GUISetIcon(@ScriptFullPath, $ico) TraySetIcon(@ScriptFullPath, $ico) sleep(150) next endfunc ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, but this code dont work why? line 80 error why? #AutoIt3Wrapper_Res_Icon_Add=D:\ee\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\4.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\5.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\6.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\7.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\8.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\9.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\10.ico #include <GuiConstants.au3> $ico = 5 $icoo = 4 $gui = GUICreate("GUI", 400, 400, -1, -1) GUISetState(@SW_SHOW) AdlibEnable("aniFunc", 150) While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00050010 ) Exit EndSwitch Wend Func aniFunc() $icoo = $icoo + 1 $ico = $icoo * (-1) If $icoo > 14 Then $icoo = 5 $ico = 5 $ico = $icoo * (-1) EndIf GUISetIcon(@ScriptFullPath, $ico) TraySetIcon(@ScriptFullPath, $ico) EndFunc ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, this code line 80 error why? thank you for help me Edited May 30, 2010 by mesale0077 Share this post Link to post Share on other sites
water 2,393 Posted May 30, 2010 What AutoIt version do you use? As of 3.3.4.0 AdlibEnable/AdlibDisable were replaced with AdlibRegister/AdlibUnRegisterWhat error do you get exactly? Please post the error messageDid you post the full code? Because the posted code snippet has less then 80 linesBTW: Could you please post your code with [autoit] code tags? Makes reading much easier. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX (NEW 2020-12-15 - Version 1.6.3.1) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2020-06-27 - Version 1.3.2.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - WikiTask Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - WikiTutorials:ADO - Wiki, WebDriver - Wiki Share this post Link to post Share on other sites
mesale0077 14 Posted May 30, 2010 (edited) thank you ,this code worked expandcollapse popup#AutoIt3Wrapper_Res_Icon_Add=D:\ee\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\4.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\5.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\6.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\7.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\8.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\9.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\10.ico #include <GuiConstants.au3> $ico = 5 $icoo = 4 $gui = GUICreate("GUI", 400, 400, -1, -1) GUISetState(@SW_SHOW) AdlibRegister("aniFunc", 150) ;changed ok While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00050010 ) Exit EndSwitch Wend Func aniFunc() $icoo = $icoo + 1 $ico = $icoo * (-1) If $icoo > 14 Then $icoo = 5 $ico = 5 $ico = $icoo * (-1) EndIf GUISetIcon(@ScriptFullPath, $ico) TraySetIcon(@ScriptFullPath, $ico) EndFunc Edited May 30, 2010 by Jos added CODE tags... please use those when posting code. Share this post Link to post Share on other sites
mesale0077 14 Posted May 30, 2010 (edited) ok but ;GUISetIcon(@ScriptFullPath, $ico) $forum11 change or all forum change icon how is ? 3 forumexpandcollapse popup#AutoIt3Wrapper_Res_Icon_Add=D:\ee\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\4.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\5.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\6.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\7.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\8.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\9.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\10.ico #include <GuiConstants.au3> $ico = 5 $icoo = 4 #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form11 = GUICreate("Form1", 633, 447, 192, 124) $Button11 = GUICtrlCreateButton("Button11", 120, 312, 185, 65, $WS_GROUP) $Button21 = GUICtrlCreateButton("Button21", 352, 320, 177, 57, $WS_GROUP) $Input11 = GUICtrlCreateInput("Input11", 64, 64, 329, 21) $Input21 = GUICtrlCreateInput("Input21", 64, 96, 321, 21) GUISetState(@SW_SHOW) $Form22 = GUICreate("Form2", 633, 447, 192, 124) $Button22 = GUICtrlCreateButton("Button21", 80, 232, 185, 81, $WS_GROUP) $Button23 = GUICtrlCreateButton("Button22", 296, 240, 177, 73, $WS_GROUP) $Input1 = GUICtrlCreateInput("Input1", 32, 24, 233, 21) $Input2 = GUICtrlCreateInput("Input2", 328, 24, 233, 21) GUISetState(@SW_HIDE) $Form33 = GUICreate("Form3", 633, 447, 192, 124) $Edit31 = GUICtrlCreateEdit("", 56, 24, 497, 273) GUICtrlSetData(-1, "Edit1") $Button31 = GUICtrlCreateButton("Button1", 112, 344, 385, 57, $WS_GROUP) GUISetState(@SW_HIDE) #EndRegion ### END Koda GUI section ### AdlibRegister("aniFunc", 150) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Form1, "int", 1000, "long", 0x00050010);implode GUISetState(@SW_SHOW, $Form1) GUIDelete() Exit Case $Button11 $rr = GUICtrlRead($Input11) $zz = GUICtrlRead($Input21) GUISetState(@SW_HIDE, $Form11) GUISetState(@SW_SHOW,$Form33) EndSwitch WEnd Func aniFunc() $icoo = $icoo + 1 $ico = $icoo * (-1) If $icoo > 14 Then $icoo = 5 $ico = 5 $ico = $icoo * (-1) EndIf GUISetIcon(@ScriptFullPath, $ico) <= ;$forum11 change or all forum change icon how is ? TraySetIcon(@ScriptFullPath, $ico) EndFunc thank you help me Edited May 30, 2010 by mesale0077 wrapped code in tags - user should start doing that - 2 different mods have now done it Share this post Link to post Share on other sites
mesale0077 14 Posted May 31, 2010 (edited) hi this code worked 3 forum #AutoIt3Wrapper_Res_Icon_Add=D:\ee\1.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\2.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\3.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\4.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\5.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\6.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\7.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\8.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\9.ico #AutoIt3Wrapper_Res_Icon_Add=D:\ee\10.ico #include <GUIConstantsEx.au3> #include <GuiConstants.au3> #include <WindowsConstants.au3> #include <GuiConstantsEx.au3> #include <GDIPlus.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <StaticConstants.au3> #include <ProgressConstants.au3> #include <EditConstants.au3> $ico = 5 $icoo = 4 AdlibRegister("aniFunc", 150) $Form22 = GUICreate("Form2", 633, 447, 192, 124) $Button22 = GUICtrlCreateButton("Button21", 80, 232, 185, 81, $WS_GROUP) $Button23 = GUICtrlCreateButton("Button22", 296, 240, 177, 73, $WS_GROUP) $Input1 = GUICtrlCreateInput("Input1", 32, 24, 233, 21) $Input2 = GUICtrlCreateInput("Input2", 328, 24, 233, 21) GUISetState(@SW_HIDE) $Form33 = GUICreate("Form3", 633, 447, 192, 124) $Edit31 = GUICtrlCreateEdit("", 56, 24, 497, 273) GUICtrlSetData(-1, "Edit1") $Button31 = GUICtrlCreateButton("Button1", 112, 344, 385, 57, $WS_GROUP) GUISetState(@SW_HIDE) $Form11 = GUICreate("Form1", 633, 447, 192, 124) $Button11 = GUICtrlCreateButton("Button11", 120, 312, 185, 65, $WS_GROUP) $Button21 = GUICtrlCreateButton("Button21", 352, 320, 177, 57, $WS_GROUP) $Input11 = GUICtrlCreateInput("Input11", 64, 64, 329, 21) $Input21 = GUICtrlCreateInput("Input21", 64, 96, 321, 21) GUISetState(@SW_SHOW, $Form11) ; will display an empty dialog box $gui = $Form11 ; Run the GUI until the dialog is closed While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE,$Button11 DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $gui, "int", 1000, "long", 0x00050010 ) Exit Case $Button21 $rr = GUICtrlRead($Input11) $zz = GUICtrlRead($Input21) GUISetState(@SW_HIDE, $Form11) GUISetState(@SW_SHOW,$Form22) $gui = $Form22 Case $Button31 GUISetState(@SW_HIDE, $Form33) GUISetState(@SW_SHOW, $Form11) $gui = $Form11 Case $Button22 GUISetState(@SW_HIDE, $Form22) GUISetState(@SW_SHOW, $Form33) $gui = $Form33 EndSwitch Wend Func aniFunc() $icoo = $icoo + 1 $ico = $icoo * (-1) If $icoo > 14 Then $icoo = 5 $ico = 5 $ico = $icoo * (-1) EndIf uu() EndFunc func uu() GUISetIcon(@ScriptFullPath, $ico) TraySetIcon(@ScriptFullPath, $ico) EndFunc Edited May 31, 2010 by mesale0077 Share this post Link to post Share on other sites