Sign in to follow this  
Followers 0
mesale0077

AdlibEnable func dont work

5 posts in this topic

#1 ·  Posted (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 by mesale0077

Share this post


Link to post
Share on other sites



  • What AutoIt version do you use? As of 3.3.4.0 AdlibEnable/AdlibDisable were replaced with AdlibRegister/AdlibUnRegister
  • What error do you get exactly? Please post the error message
  • Did you post the full code? Because the posted code snippet has less then 80 lines
BTW: Could you please post your code with [autoit] code tags? Makes reading much easier.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

thank you ,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>

$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 by Jos
added CODE tags... please use those when posting code.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ok but ;GUISetIcon(@ScriptFullPath, $ico) $forum11 change or all forum change icon how is ?

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 <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 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

#5 ·  Posted (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 by mesale0077

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0