Jump to content

how about flash trayicon AND tray menu?


Recommended Posts

HotKeySet ( "{ESC}" , "ExitProg")
AutoItSetOption ( "MouseCoordMode" , 2 )

Func ExitProg()
    Exit
EndFunc

Opt("TrayMenuMode",1)


$aboutitem = TrayCreateItem ( "about", -1)
$exititem  = TrayCreateItem ( "about2", -1)

TraySetState()


While 1
    
    ;TraySetIcon ( "a.ico" )
    ;Sleep (1000)
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $aboutitem
            Msgbox( 0,"about:","I wrote this. :)")
        Case $msg = $exititem
            Exit
    EndSelect
    
    ;TraySetIcon ( "b.ico" )
    ;Sleep (1000)
WEnd

a.ico

b.ico

sample_to_post.au3

Link to comment
Share on other sites

Here's to your first problem:

HotKeySet ( "{ESC}" , "ExitProg")
AutoItSetOption ( "MouseCoordMode" , 2 )

Func ExitProg()
    Exit
EndFunc

Opt("TrayMenuMode",1)


$aboutitem = TrayCreateItem ( "about", -1)
$exititem  = TrayCreateItem ( "about2", -1)

TraySetState()

$a = True
AdLibEnable('_SwitchTrayIcon', 1000)

While 1
   
    $msg = TrayGetMsg()
    Select
        Case $msg = 0
            ContinueLoop
        Case $msg = $aboutitem
            Msgbox( 0,"about:","I wrote this. smile.gif")
        Case $msg = $exititem
            Exit
    EndSelect
   
WEnd
 
Func _SwitchTrayIcon() 
    If $a = True then 
        TraySetIcon ( "b.ico" ) 
    Else 
        TraySetIcon ( "a.ico" )
    EndIf 
    $a = Not $a 
EndFunc
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
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...