Valnurat

Exit GUICtrlCreateInput with a TAB

15 posts in this topic

#1 ·  Posted (edited)

I want to lookup in our AD when I exit a GUICtrlCreateInput don't have focus anymore. I know how to do the lookup in AD, but how to activate something when you exit the GUICtrlCreateInput with a TAB or a mouseclick, so the GUICtrlCreateInput don't have focus anymore, I do not know.

It is the $idInput2 that I need to check if there is a focus or not.

Can someone please help.

Func Main()
    Local $sOU, $sDescription, $dDate
    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $idOKay
                For $id = $idInput1 to $idInput11
                    if GUICtrlRead($id) = '' Then
                        MsgBox(64, "Info", "At least one input is empty.",0,$hGUI)
                        ContinueLoop 2
                    EndIf
                Next
                $sFirst = GUICtrlRead($idInput1)
                $sShort = GUICtrlRead($idInput2)
                $sCountrySite = Stringleft($sShort,4)
                $sOU = Stringleft($sShort,4)
                $sOU = "OU=Consultants,OU=" & StringRight($sOU,2) & ",OU=" & StringLeft($sOU,2) & ",OU=company,DC=AD,DC=company,DC=ORG"
                $sLast = GUICtrlRead($idInput3)
                $sDisp = GUICtrlRead($idInput4)
                For $id = $idRadio1 To $idRadio2
                    If GUICtrlRead($id) = $GUI_CHECKED Then
                        $sDescription = GUICtrlRead($id, $GUI_READ_EXTENDED)
                    EndIf
                Next
                $sEmail = GUICtrlRead($idInput5)
                $sDepart = GUICtrlRead($idInput6)
                $sOffice = GUICtrlRead($idInput7)
                $sManager = GUICtrlRead($idInput8)
                $sMisalCode = GUICtrlRead($idInput9)
                $sTicketNo = GUICtrlRead($idInput10)
                $sCostNo = GUICtrlRead($idInput11)
                $sExtCompe = GUICtrlRead($idInput12)
                $sExtEmail = GUICtrlRead($idInput13)
                If GUICtrlRead($idCheckBox) = $GUI_CHECKED Then
                    $dDate = GUICtrlRead($idDate)
                Else
                    $dDate = _DateAdd('Y',1,_NowCalcDate())
                EndIf
            Case $idCheckBox
                If _IsChecked($idCheckbox) Then
                    GUICtrlSetState($idDate,$gui_enable)
                Else
                    GUICtrlSetState($idDate,$gui_disable)
                EndIf
        EndSwitch
    WEnd
EndFunc

 

Edited by Valnurat

Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Should I understand that the link you sent is for detecting of focus? I would like to find out when a input do not have focus anymore. I would like to do at lookup in out Active Directory.

Edited by Valnurat

Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

But the links in that link shows when a control get the focus, as I understand it.

The Link JohnOne is pointing to is to google.

 

JohnOne.JPG

 

InunoTaishou  - might point to the correct solution, but I don't know if that exists in AutoIT.

Edited by Valnurat

Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

when a other control gets focus the old control has lost focus, correct me if i am wrong!

Share this post


Link to post
Share on other sites

True.

I'm not saying that the link is not true. I can't not see the light and maybe it is bad experience of coding.

 


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Make a small runable reproducer without AD.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I don't know how to make non focus thing, but this should work.

Hopefully.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=test Focus.Exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>

Global $hGUI, $idInput1, $idInput2

FormCreate()
Main()

Func Main()
    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd
EndFunc


Func FormCreate()
; Create a GUI with various controls.
    $hGUI = GUICreate("Create Consultant")
    GUICtrlCreateLabel("First name:", 10, 13)
    GUICtrlCreateLabel("Shortname:", 245, 13)
    $idInput1 = GUICtrlCreateInput("", 90, 10, 150, 20)     ; First
    $idInput2 = GUICtrlCreateInput("", 300, 10, 90, 20)     ; Shortname
    GUISetState(@SW_SHOW, $hGUI)
EndFunc

 

Edited by Valnurat

Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Valnurat,

This may help...

; *** Start added by AutoIt3Wrapper ***
#include <EditConstants.au3>
#include <WindowsConstants.au3>
; *** End added by AutoIt3Wrapper ***

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=test Focus.Exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>

#AutoIt3Wrapper_Add_Constants=n


Global $hGUI, $idInput1, $idInput2
GUIRegisterMsg($WM_COMMAND, 'WM_COMMAND')   ; <--- Monitor "command" type messages

FormCreate()
Main()

Func Main()
    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd
EndFunc   ;==>Main


Func FormCreate()
    ; Create a GUI with various controls.
    $hGUI = GUICreate("Create Consultant")
    GUICtrlCreateLabel("First name:", 10, 13)
    GUICtrlCreateLabel("Shortname:", 245, 13)
    $idInput1 = GUICtrlCreateInput("", 90, 10, 150, 20) ; First
    $idInput2 = GUICtrlCreateInput("", 300, 10, 90, 20) ; Shortname
    GUISetState(@SW_SHOW, $hGUI)

EndFunc   ;==>FormCreate

; this routine will monitor edit notifications.  EN_KILLFOCUS is sent to the parent window every time
; an edit control loses focus.

Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam)

    Local $iCtl = BitAND($wParam, 0xFFFF)
    Local $iCode = BitShift($wParam, 16)

    Switch $iCtl
        Case $idInput2
            Switch $iCode
                Case $EN_killfocus
                    ConsoleWrite('$idinput2 just lost focus and it''s value is ' & GUICtrlRead($iCtl) & @CRLF)
            EndSwitch
    EndSwitch

    Return $GUI_RUNDEFMSG

EndFunc   ;==>WM_COMMAND

MSDN - https://msdn.microsoft.com/en-us/library/windows/desktop/bb761682(v=vs.85).aspx

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

I get some warnings on this.

I tried to declear it and I could compile it, but I don't get any messages in the console.

Capture.JPG


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Original script from @kylomas is working. The error sounds like you have forgotten a include file.

Share this post


Link to post
Share on other sites

I did a little search and I found a solution.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=test Focus.Exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <GUIConstants.au3>

Global Const $DebugIt = 1
Global $hGUI, $idInput1, $idInput2, $idInput3

GUIRegisterMsg($WM_COMMAND, 'MY_WM_COMMAND')   ; <--- Monitor "command" type messages


FormCreate()
Main()

Func Main()
    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd
EndFunc


Func FormCreate()
; Create a GUI with various controls.
    $hGUI = GUICreate("Create Consultant")
    GUICtrlCreateLabel("First name:", 10, 13)
    GUICtrlCreateLabel("Last name:", 245, 13)
    GUICtrlCreateLabel("Display name:", 10, 53)
    $idInput1 = GUICtrlCreateInput("", 90, 10, 150, 20)
    $idInput2 = GUICtrlCreateInput("", 300, 10, 90, 20)
    $idInput3 = GUICtrlCreateInput("", 90, 50, 200, 20)
    GUISetState(@SW_SHOW, $hGUI)
EndFunc

Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam)
   ; gaFrost for monitoring inputfield change
    Local $nNotifyCode = BitShift($wParam, 16)
    Local $nID = BitAND($wParam, 0xFFFF)
    Local $hCtrl = $lParam

    Switch $nID
        Case $idInput1
            Switch $nNotifyCode
                Case $EN_CHANGE
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input1 Changed"))
                    GUICtrlSetData($idInput3,GUICtrlRead($idInput1))
                Case $EN_SETFOCUS
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input1 Setfocus"))
                Case $EN_KILLFOCUS
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input1 Killfocus"))
            EndSwitch
        Case $idInput2
            Switch $nNotifyCode
                Case $EN_CHANGE
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input2 Changed"))
                    GUICtrlSetData($idInput3,GUICtrlRead($idInput2))
                Case $EN_SETFOCUS
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input2 Setfocus"))
                Case $EN_KILLFOCUS
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input2 Killfocus"))
            EndSwitch
        Case $idInput3
            Switch $nNotifyCode
                Case $EN_CHANGE
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input1 Changed"))
                Case $EN_SETFOCUS
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input1 Setfocus"))
                Case $EN_KILLFOCUS
                    If $DebugIt Then ConsoleWrite(_DebugHeader("Input1 Killfocus"))
            EndSwitch
    EndSwitch
   ; Proceed the default Autoit3 internal message commands.
   ; You also can complete let the line out.
   ; !!! But only 'Return' (without any value) will not proceed
   ; the default Autoit3-message in the future !!!
    Return $GUI_RUNDEFMSG
EndFunc  ;==>MY_WM_COMMAND

;===============================================================================
; Function Name:    _DebugHeader
; Description:        Gary's console debug header.
; Parameter(s):            $s_text         - IN -
;
; Requirement(s):
; Return Value(s):
; User CallTip:
; Author(s):
; Note(s):
;===============================================================================
Func _DebugHeader($s_text)
    Return _
            "!===========================================================" & @LF & _
            "+===========================================================" & @LF & _
            "-->" & $s_text & @LF & _
            "+===========================================================" & @LF
EndFunc  ;==>_DebugHeader

Func _GUIEvents()
    Select
        Case @GUI_CtrlId = $GUI_EVENT_CLOSE
            Terminate()
    EndSelect
EndFunc  ;==>_GUIEvents

Func OnAutoItExit()
    ConsoleWrite('CLOSED via Exit'&@CRLF)
EndFunc

Func Terminate()
    ConsoleWrite('CLOSED via Terminate'&@CRLF)
    Exit
EndFunc

 

I do now have another small request.

In this exampel I have 3 Inputs. I would like to have input 3 fill out what I type in Input 1 and input 2. Input1 is Firstname and Input3 is Lastname.

I tried to GUICtrlSetData($idInput3,GUICtrlRead($idInput1)) for "Firstname" and that seems to ok. I have the same GUICtrlSetData($idInput3,GUICtrlRead($idInput2)) for "Lastname", but then it will just overwrite what that is already in Input3.

 

I can't see the light in this one, please help.


Yours sincerely

Kenneth.

Share this post


Link to post
Share on other sites

Something like this:

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=test Focus.Exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <GUIConstants.au3>

FormCreate()


Func FormCreate()
    ; Create a GUI with various controls.
    Local $hGUI = GUICreate("Create Consultant")
    GUICtrlCreateLabel("First name:", 10, 13)
    GUICtrlCreateLabel("Last name:", 245, 13)
    GUICtrlCreateLabel("Display name:", 10, 53)
    Local $idInput1 = GUICtrlCreateInput("", 90, 10, 150, 20)
    Local $idInput2 = GUICtrlCreateInput("", 300, 10, 90, 20)
    Local $idInput3 = GUICtrlCreateInput("", 90, 50, 200, 20)
    GUISetState(@SW_SHOW, $hGUI)
    Local $Old3
    ; Loop until the user exits.
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                ExitLoop
            Case $idInput1, $idInput2
                $Old3 = GUICtrlRead($idInput1) & ' ' & GUICtrlRead($idInput2)
                If $Old3 <> GUICtrlRead($idInput3) Then GUICtrlSetData($idInput3, $Old3)
        EndSwitch
    WEnd
EndFunc   ;==>FormCreate

 

Share this post


Link to post
Share on other sites

Yes, like that, but can it be done on the fly in the $EN_CHANGE?


Yours sincerely

Kenneth.

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

  • Similar Content

    • Viki
      By Viki
      This is my first time here so please dont bombard me that what a silly question I am asking!!
      I have 500 rows (A1:A500) in a spreadsheet and I just want to copy one by one row and then paste into another application and then press enter, loop should repeat this until finishes all 500 rows.
      I have looked at clipget(), clip(put() but dont know how to select next row in next turn. I also looked at Array to store but again no luck. Can some guide me please..
    • DineshPawar
      By DineshPawar
      0down votefavorite   In my current project, Excel macro open AutoIt script using a function Call Shell("location of autoit script").
      For proper functioning of AutoIt script it's need to be close parent Excel workbook, so this closing Excel action is written in AutoIt script itself.
      But as soon as AutoIt script close parent Excel workbook then script get pause and it do nothing.
      How open the AutoIt script from Excel workbook and after that parent Workbook get close?
    • AndroidZero
      By AndroidZero
      I want to animate transparent GIFs on my gui.
      I searched, read and tested a lot UDFs
      At the end none fits to me
      I wrote my own animated function, but its flickering sometimes just for a miliseconds but still doesnt looks good.

       
      Below is my code for Testing and also the GIF images you need for it.
      GUIChangeImage() is the Animation Function.
      CODE:
      ;************FOR GATHER HTML SOURCE CODE********************** #include <IE.au3> #include <InetConstants.au3> ;************FOR GUI*********** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIFiles.au3> ;**********FOR BUTTON ********** #include <ButtonConstants.au3> #include <StaticConstants.au3> ;**********FOR STRINGS ********** #include <StringConstants.au3> #include <String.au3> ;**********FOR COMBOBOX ********** #include <StringConstants.au3> #include <EditConstants.au3> #include <GuiEdit.au3> #include <GuiComboBox.au3> ;**********FOR FONTS ********** #include <FontConstants.au3> ;**********FOR GIF ANIMATION ********** #include <GIFAnimation.au3> ;**********FOR PROCESS ********** #include <Process.au3> #include <SendMessage.au3> #include <GDIPlus.au3> #include <WinAPIDiag.au3> Opt("GUIOnEventMode",1) Global Const $SC_DRAGMOVE = 0xF012 Global $hGUIAccountCreator Global $graphics_path = @ScriptDir & "\graphics" Global $fontSize_TextBody = 8.5, $fontName_TextBody = "", $fontWeight_TextBody = $FW_BOLD, $fontColor_TextBody = 0x5A2800 GUI_open_AccountCreator() Func GUI_open_AccountCreator() Global $hGUIAccountCreator = GUICreate("Tibia Account Creator - SubZero", 350, 400, -1, -1, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST)) GUISetOnEvent($GUI_EVENT_CLOSE, "GUI_Close_AccountCreator") GUICtrlCreatePic($graphics_path & "\WindowAccountCreator.gif", 0, 0, 350, 400) GUICtrlSetState(-1, $GUI_DISABLE) ;********* GUI CONTROLS (LABELS,INPUTS,COMBOBOXES) ********************************************************************** GUICtrlCreateLabel(" Create New Account", 25,47,103,14,$SS_CENTERIMAGE) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetColor(-1,0xFFFFFF) GUICtrlCreateLabel("Account Name:",30,75,75,14) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetColor(-1,0x5A2800) Global $inptBox_Acc = GUICtrlCreateInput("",130,75,150,20) GUICtrlCreateLabel("Email Adress:",30,100,70,14) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetColor(-1,0x5A2800) Global $inptBox_Email = GUICtrlCreateInput("",130,100,150,20) GUICtrlCreateLabel("Password:",30,125,55,14) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetColor(-1,0x5A2800) Global $inptBox_Passwd = GUICtrlCreateInput("",130,125,150,20,$ES_PASSWORD) GUICtrlSetData($inptBox_Passwd, "") GUICtrlCreateLabel("Character Name:",30,170,83,14) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetColor(-1,0x5A2800) Global $inptBox_CharName = GUICtrlCreateInput("",130,170,150,20) GUICtrlCreateLabel("Sex:",30,195,23,14) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1,$fontSize_TextBody,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetColor(-1,$fontColor_TextBody) Global $comboBox_sex = GUICtrlCreateCombo("",130,195,150,20,$CBS_DROPDOWNLIST) ;LoadSexIntoComboBox() GUICtrlCreateLabel("World Location:",30,240,77) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1,$fontSize_TextBody,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetFont(-1,8,$fontWeight_TextBody,0,$fontName_TextBody,1) GUICtrlSetColor(-1,$fontColor_TextBody) Global $comboBox_world = GUICtrlCreateCombo("",130,240,150,20,BitOr($CBS_DROPDOWNLIST, $WS_VSCROLL)) ;LoadWorldsIntoComboBox() Global $label_status = GUICtrlCreateLabel("",20,360,200,30) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) ;********* GUI CONTROLS (LABELS,INPUTS,COMBOBOXES) ********************************************************************** ;********* CONTROL PICS ********************************************************************** Global $btn_randAccName = GUICtrlCreatePic($graphics_path & "\Die_Static.gif", 280, 75, 26, 26) GUICtrlSetTip($btn_randAccName, "Generate a random account name") GUICtrlSetCursor($btn_randAccName,0) ;GUICtrlSetOnEvent($btn_randAccName,"GenerateRandomAccName") GUICtrlSetOnEvent($btn_randAccName,"GUIChangeImage") Global $btn_x = GUICtrlCreatePic("", 315, 5, 40, 36) GUICtrlSetTip($btn_x, "Close") GUICtrlSetCursor($btn_x,0) GUICtrlSetOnEvent($btn_x,"GUI_Close_AccountCreator") Global $btn_donate = GUICtrlCreatePic("", 112, 313, 126, 47) GUICtrlSetTip($btn_donate, "Donate") GUICtrlSetCursor($btn_donate,0) ;GUICtrlSetOnEvent($btn_donate,"Donate") ;********* CONTROL PICS ********************************************************************** ;********* GDI+ DRAW ********************************************************************** _GDIPlus_Startup() Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\X_Tic-Tac-Toe_Token.gif") Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg) _WinAPI_DeleteObject(GUICtrlSendMsg($btn_x, 0x0172, $IMAGE_BITMAP, $hHBMP)) _GDIPlus_ImageDispose($hImg) Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Static.gif") Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg) _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP)) _GDIPlus_ImageDispose($hImg) Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\btn_donateCC_LG.gif") Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg) _WinAPI_DeleteObject(GUICtrlSendMsg($btn_donate, 0x0172, $IMAGE_BITMAP, $hHBMP)) _GDIPlus_ImageDispose($hImg) _GDIPlus_Shutdown() ;********* GDI+ DRAW ********************************************************************** _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b) GUISetIcon(@ScriptDir & "\TibiaInfo.ico") GUISetState(@SW_SHOW, $hGUIAccountCreator) WinSetOnTop($hGUIAccountCreator,"",1) GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_LBUTTONDOWN") EndFunc Func GUIChangeImage() _GDIPlus_Startup() GUICtrlDelete($btn_randAccName) Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26) Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame2.gif") Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg) _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP)) _GDIPlus_ImageDispose($hImg) _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b) Sleep(100) GUICtrlDelete($btn_randAccName) Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26) Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame3.gif") Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg) _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP)) _GDIPlus_ImageDispose($hImg) _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b) Sleep(100) GUICtrlDelete($btn_randAccName) Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26) Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame4.gif") Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg) _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP)) _GDIPlus_ImageDispose($hImg) _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b) Sleep(100) GUICtrlDelete($btn_randAccName) Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26) Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Frame5.gif") Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg) _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP)) _GDIPlus_ImageDispose($hImg) _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b) Sleep(100) GUICtrlDelete($btn_randAccName) Local $btn_randAccName = GUICtrlCreatePic("", 280, 75, 26, 26) GUICtrlSetCursor($btn_randAccName,0) GUICtrlSetOnEvent($btn_randAccName,"GUIChangeImage") Local $hImg = _GDIPlus_ImageLoadFromFile($graphics_path & "\Die_Static.gif") Local $hHBMP = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImg) _WinAPI_DeleteObject(GUICtrlSendMsg($btn_randAccName, 0x0172, $IMAGE_BITMAP, $hHBMP)) _GDIPlus_ImageDispose($hImg) _WinAPI_SetLayeredWindowAttributes($hGUIAccountCreator, 0x26f50b) _GDIPlus_Shutdown() EndFunc Func GUI_Close_AccountCreator() Exit EndFunc Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam) _SendMessage($hGUIAccountCreator, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0) EndFunc While 1 Sleep(10) WEnd  
      IMAGES:
       
       








    • ur
      By ur
      I am maintaining all the reusable code in a separate file as library.au3.
      In that file I have referenced some dependent files using fileinstall, so that they will be extracted when necessary.
       
      Problem is, if I use a function in the library.au3 in another script which doesn't require this dependent file, as I am including the whole file using include tag, it is embedding that file also.
      Is there any way to exclude that.
       
    • GAM
      By GAM
      Am trying to execute perl script from autoit script but its not running. Th command that I have given is...
      $rootDir = automation Run("cmd.exe /" & "C:\" & $rootDir & "\updatesource.pl") Can someone help please!