Jump to content

Flickering GUI...


i386
 Share

Recommended Posts

Hello AutoIt Users,

I was wondering if any of you could help me with a slight problem. :D

I am running WinXP and everytime I run the script that is posted below, it flickers like crazy and I can't press any of the GUI's buttons. What am I doing wrong or missing? Any help or suggestions?

#cs ----------------------------------------------------------------------------
    
    AutoIt Version: 3.1.0
    Author(s): Paul Lemay <tech.guru@bex.net>
    
    Command Line Options: (Not implemented yet)
    - winact.au3 [/help |/about]
    - /help:     Displays a help file for the install.
    - /about:    Displays a dialog about the script.
    
    History:
    - 1.00 - Initial "Release" / given a version number
    
    Forum Threadz:
    - Not available
    
#ce ----------------------------------------------------------------------------

; Include Files
; =============
#include <GUIConstants.au3>

; Creates the GUI
; ===============
$WinAct = GUICreate("WinAct v0.1", 295, 95, -1, -1, $WS_DLGFRAME, BitOR($WS_EX_RIGHT, $WS_EX_TOOLWINDOW))
GUISetIcon("C:\Documents and Settings\lemay\My Documents\Scripts\WinHacker\registry_large.ico")
$Label1 = GUICtrlCreateLabel("Click 'Change Key' to fix WinXP.", 32, 8, 229, 24)
GUICtrlSetFont(-1, 11, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x000080)
GUICtrlSetCursor($Label1, 7)
$Key = GUICtrlCreateButton("Change &Key", 32, 48, 75, 25, $BS_FLAT)
GUICtrlSetFont(-1, 8, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x008000)
GUICtrlSetTip(-1, "Change Product Activation Key")
GUICtrlSetCursor($Key, 0)
$close = GUICtrlCreateButton("&Close", 168, 48, 75, 25, $BS_FLAT)
GUICtrlSetFont(-1, 8, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetCursor($close, 3)
WinSetTrans( 'WinAct', '', 0)
GUISetState(@SW_SHOW)

; Slowly show the GUI with the transparent func
; =============================================
$trans = 1
Do
    Sleep(5)
    WinSetTrans( 'WinAct', '', $trans)
    $trans = $trans + 5
Until $trans = 255

; Continues to display GUI until a function is called
; ===================================================
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $msg = $GUI_EVENT_CLOSE 
            _close()
        Case $msg = $close
            _close()
        Case Else
            ;;;;;;;
    EndSwitch
WEnd
Exit

; function to terminate script
; ============================
Func _close()
    Do
        Sleep(5)
        WinSetTrans( 'WinAct', '', $trans)
        $trans = $trans - 1
    Until $trans = 0
    Exit
EndFunc   ;==>_close

I would appreciate all the help I can get thanks. :D

Edited by terrabyte
Spoiler

 

"...Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like.My crime is that of outsmarting you, something that you will never forgive me for." --The Mentor

"Mess with the best, die like the rest!!" -Hackers

"This above all to thine own self be true." -William Shakespeare

"Corruption is only as corrupted as the individual makes it out to be." -i386

 

style7,AutoIt.png

 

 

Link to comment
Share on other sites

#cs ----------------------------------------------------------------------------
    
    AutoIt Version: 3.1.0
    Author(s): Paul Lemay <tech.guru@bex.net>
    
    Command Line Options: (Not implemented yet)
    - winact.au3 [/help |/about]
    - /help:     Displays a help file for the install.
    - /about:   Displays a dialog about the script.
    
    History:
    - 1.00 - Initial "Release" / given a version number
    
    Forum Threadz:
    - Not available
    
#ce ----------------------------------------------------------------------------

; Include Files
; =============
#include <GUIConstants.au3>

; Creates the GUI
; ===============
$WinAct = GUICreate("WinAct v0.1", 295, 95, -1, -1, $WS_DLGFRAME, BitOR($WS_EX_RIGHT, $WS_EX_TOOLWINDOW))
GUISetIcon("C:\Documents and Settings\lemay\My Documents\Scripts\WinHacker\registry_large.ico")
$Label1 = GUICtrlCreateLabel("Click 'Change Key' to fix WinXP.", 32, 8, 229, 24)
GUICtrlSetFont(-1, 11, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x000080)
GUICtrlSetCursor($Label1, 7)
$Key = GUICtrlCreateButton("Change &Key", 32, 48, 75, 25, $BS_FLAT)
GUICtrlSetFont(-1, 8, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x008000)
GUICtrlSetTip(-1, "Change Product Activation Key")
GUICtrlSetCursor($Key, 0)
$close = GUICtrlCreateButton("&Close", 168, 48, 75, 25, $BS_FLAT)
GUICtrlSetFont(-1, 8, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetCursor($close, 3)
WinSetTrans( 'WinAct', '', 0)
GUISetState()

; Slowly show the GUI with the transparent func
; =============================================
$trans = 1
Do
    Sleep(5)
    WinSetTrans( 'WinAct', '', $trans)
    $trans = $trans + 5
Until $trans >= 255

; Continues to display GUI until a function is called
; ===================================================
While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE 
            _close()
        Case $close
            _close()
        Case Else
        ;;;;;;;
    EndSwitch
WEnd
Exit

; function to terminate script
; ============================
Func _close()
    Do
        Sleep(5)
        WinSetTrans( 'WinAct', '', $trans)
        $trans = $trans - 1
    Until $trans = 0
    Exit
EndFunc  ;==>_close

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...