Sign in to follow this  
Followers 0
ConsultingJoe

New Tray Menu

12 posts in this topic

#Include <Constants.au3>
#Include <GUIConstants.au3>
#NoTrayIcon
$win_width = 179
$win_height = 226
$y = @DesktopHeight
$x = @DesktopWidth
$Button1 = False
Opt("TrayMenuMode",1)
TraySetState()
Global $gui = 0
Global $winopen = False

While 1
    Switch TrayGetMsg()
        Case 0
            If $winopen = False Then
                ContinueLoop
            ElseIf $winopen = True And _MouseIsAround() Then
                $winopen = False
                For $y = _GetTaskbar(1) - $win_height To _GetTaskbar(1) Step 20
                    WinMove( "Autoit Tray", "", $x, $y )
                    Sleep(10)
                Next
                GUIDelete($gui)
                GUISetState()
            EndIf
        Case $TRAY_EVENT_PRIMARYDOWN
            gui()
        Case $TRAY_EVENT_SECONDARYDOWN
            gui()
    EndSwitch
    If $winopen = True And GUIGetMsg() = $Button1 Then
        SplashTextOn( "THANK YOU", "EXITING. . .", 150, 50)
        gui()
        Sleep(500)
        Exit
    EndIf
Sleep(10)
WEnd
Exit


Func gui()
    If $winopen = False Then
        $winopen = True
        If MouseGetPos(0) + $win_width < @DesktopWidth Then
            $x = MouseGetPos(0)
        Else
            $x = MouseGetPos(0) - $win_width
        EndIf
        $gui = GUICreate("Autoit Tray", $win_width, $win_height, $x, $y, $WS_POPUP, BitOR($WS_CLIPCHILDREN,$WS_EX_TOOLWINDOW))
        GUICtrlCreateLabel( "YOUR DATA HERE", 30, 30, $win_width )
        GUICtrlSetColor( -1, 0x000000 )
        $Button1 = GUICtrlCreateButton("EXIT", 56, 200, 65, 25, 0)
        GUISetState()
        For $y = _GetTaskbar(1) To _GetTaskbar(1) - $win_height Step -20
            WinMove( "Autoit Tray", "", $x, $y )
            Sleep(10)
        Next
        WinActivate( "Autoit Tray" )
    ElseIf $winopen = True Then
        $winopen = False
        For $y = _GetTaskbar(1) - $win_height To _GetTaskbar(1) Step 20
            WinMove( "Autoit Tray", "", $x, $y )
            Sleep(10)
        Next
        GUIDelete( $gui )
        GUISetState()
    EndIf
EndFunc

Func _GetTaskbar($dimension)
    $s_PrevOpt = Opt("WinTitleMatchMode", 4)
    $return = WinGetPos("Classname=Shell_TrayWnd")
    Opt("WinTitleMatchMode",$s_PrevOpt)
    Return $return[$dimension]
EndFunc

Func _MouseIsAround()
    $mousepos = MouseGetPos()
    $winpos = WinGetPos( "Autoit Tray" )
    Select
        Case $mousepos[0] > $winpos[0] + $winpos[2] + 30
            Return True
        Case $mousepos[1] > $winpos[1] + $winpos[3] + 30
            Return True
        Case $mousepos[0] < $winpos[0] - 30
            Return True
        Case $mousepos[1] < $winpos[1] - 30
            Return True
        Case Else
            Return False
    EndSelect
EndFunc


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites



pretty cool except i think it needs to be jazzed up a bit and expanded on more.

Share this post


Link to post
Share on other sites

I just love it


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites

:)

That's sweeet now add things in there like pause script exit debug or somehing liek that maybe even a little gui that pops up with xskin isn't a bad idea!


tolle indicium

Share this post


Link to post
Share on other sites

:)

That's sweeet now add things in there like pause script exit debug or somehing liek that maybe even a little gui that pops up with xskin isn't a bad idea!

Ok cool, I'll do that, thanks guys

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

Hey guys, I just tried the xskin, and it would not work because it doesnt show up right and you cant set the styles with it.

I'm just going to leave you guys with this.

CyberZeroCool


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

Cool!!!!!! :) :) :)

NP, BTW are you a girl, because if that is your picture. God Damn, your a hottie, lol

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

NP, BTW are you a girl, because if that is your picture. God Damn, your a hottie, lol

[edit]

I dont think a girl would have the name 'Antonio Caragliano' :)

Edited by mrRevoked

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
Share on other sites

Nice...

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