Jump to content

Tray menu mode


Recommended Posts

I don't want ticks on any of my tray system menus, but when ever I set the opt to 8 the script pauses when selected - where am I going wrong ?

The code is set to one at the moment as this is the only way it will work without pausing.

The code is only a snipped too.

Opt("TrayMenuMode", 1)
HotKeySet("+!h", "ShowMessage") ;Shift-Alt-h

If FileExists(@MyDocumentsDir & "\helpdesk_screenshots") Then
    FileDelete(@MyDocumentsDir & "\helpdesk_screenshots\*.jpg")
Else
    DirCreate(@MyDocumentsDir & "\helpdesk_screenshots")
EndIf

Func ShowMessage()

    $Form1 = GUICreate("Portal Launcher", 330, 110, 348, 309)
    $helpmenu = GUICtrlCreateMenu("Help")
    $infoitem = GUICtrlCreateMenuItem("About", $helpmenu)
    GUISetBkColor(0x0066FF)
    $Button1 = GUICtrlCreateButton("Screen Shot", 10, 20, 89, 49)
    $Button2 = GUICtrlCreateButton("By Web Portal", 120, 20, 89, 49)
    $Button3 = GUICtrlCreateButton("By E-Mail", 230, 20, 89, 49)
    GUISetState(@SW_SHOW)

    While 1
        $nMsg = GUIGetMsg()
        Select
            Case $nMsg = $Button1
                _ScreenCapture_Capture($helpdesk_screenshots & "\helpdesk_Image1.jpg")
                SplashTextOn("Screen Shot","Taking screen shot and storing it in your " & @CRLF & "My Documents\helpdesk_screenshots" & @CRLF & "directory.  Helpdesk Portal page will open when finished. Please wait...","350","100","-1","-1",0,"","","")
                Sleep(8000)
                SplashOff()
                GUIDelete($Form1)
                _IECreate($portalsite)

            Case $nMsg = $Button2
                _IECreate($portalsite)

            Case $nMsg = $Button3
                call("Outlook")

            Case $nMsg = $infoitem
                MsgBox(0, "Portal v1.6B", "Written By Matt ." & @CRLF & "Comments & Suggestions to:" & @CRLF & "matt@company.com")
            Case $nMsg = $GUI_EVENT_CLOSE
                GUIDelete($Form1)
                Return
        EndSelect
    WEnd

EndFunc   ;==>ShowMessage

$settingsitem = TrayCreateMenu("Problem Report")
$portal = TrayCreateItem("By Web Portal", $settingsitem)
$Email_Dat = TrayCreateItem("By E-mail", $settingsitem)
$displayitem = TrayCreateItem("Take A Screen Shot", $settingsitem)
TrayCreateItem("")

$handysites = TrayCreateMenu("Handy Web Sites")
$home = TrayCreateItem("Web Site", $handysites)
$Intra = TrayCreateItem("Intranet", $handysites)
$online = TrayCreateItem("Online", $handysites)
$owa = TrayCreateItem("OWA", $handysites)
$help = TrayCreateItem("Helpdesk", $handysites)

$utils = TrayCreateMenu("Utilities")
$password = TrayCreateItem("Generate Password",$utils)
$sysinfo = TrayCreateItem("Sysinfo",$utils)

$aboutitem = TrayCreateItem("About")
TrayCreateItem("")

TrayCreateItem("")
$exititem = TrayCreateItem("Exit")

TraySetState()
Edited by MattX
Link to comment
Share on other sites

That fixes the pause but not the ticks - they are still appearing. Christ this is really pi55ing me off now !!

Not really my thing but try

Opt("TrayAutoPause", 0)
Opt("TrayMenuMode", 9)

Assuming you are using the most up to date revision of Au3

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...