JoeCool Posted April 20, 2005 Share Posted April 20, 2005 expandcollapse popup#include <guiconstants.au3> #include <constants.au3> ;--------------------------------------------------------------------------- Global Const $W_EXIST = 0x01 Global Const $W_VISIBLE = 0x02 Global Const $W_ENABLE = 0x04 Global Const $W_ACTIVE = 0x08 Global Const $W_MINIMIZE = 0x10 Global Const $W_MAXIMIZE = 0x20 ;--------------------------------------------------------------------------- func wndClose() exit endfunc func wndMinimize() guiSetState( @SW_HIDE, $gui ) endfunc func wndRestore() guiSetState( @SW_RESTORE, $wnd ) endfunc func wndMaximize() guiSetState( @SW_MAXIMIZE, $wnd ) endfunc func trayLClick() dim $state $state = winGetState( $gui ) if bitAnd( $state, $W_VISIBLE) = $W_VISIBLE then guiSetState( @SW_HIDE, $gui) else guiSetState( @SW_SHOW, $gui) endif endfunc func btn() trayTip("I'm a title ", "I'm the message", 4, 1) traySetState( @SW_TRAYFLASH ) sleep(5000) trayTip("", "", 0) sleep( 1000 ) trayTip("I'm a title", "I'm the message", 5, 2) sleep( 1000 ) trayTip("I'm a title", "I'm the message", 5, 3) sleep (1000) trayTip("", "", 0) traySetState( @SW_TRAYNOFLASH ) endfunc opt( "GUIOnEventMode", 1) opt( "GUIEventCompatibilityMode", 1 ) opt( "TrayAutoPause", 0) opt( "TrayOnEventMode", 1) $flag = bitOr( $WS_SYSMENU, $WS_MINIMIZEBOX, $WS_SIZEBOX, $WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS) $gui = guiCreate( "Hello World", 200, 200, 20, 20, $flag ) $btn = guiCtrlCreateButton( "bouton", 20, 20, 90, 30 ) guiCtrlSetOnEvent( -1, "btn" ) guiSetOnEvent( $GUI_EVENT_CLOSE, "wndClose" ) guiSetOnEvent( $GUI_EVENT_MINIMIZE, "wndMinimize" ) guiSetOnEvent( $GUI_EVENT_RESTORE, "wndRestore" ) guiSetOnEvent( $GUI_EVENT_MAXIMIZE, "wndMaximize" ) traySetClick( 16 ) traySetOnEvent( $TRAY_EVENT_PRIMARYUP, "trayLClick" ) ;traySetOnEvent( $TRAY_EVENT_PRIMARYDOUBLE, "trayLClick" ) traySetToolTip( "Click Me !" ) guiSetState( @SW_HIDE ) while 1 sleep( 5000 ) wend Just for the fun of doing it Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 21, 2005 Share Posted April 21, 2005 Good example. [stupid kids cartoon voice]Theres a bug, can you find it?[/stupid kids cartoon voice] [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
JoeCool Posted April 21, 2005 Author Share Posted April 21, 2005 Good example. [stupid kids cartoon voice]Theres a bug, can you find it?[/stupid kids cartoon voice]<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
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