Jump to content

HELP IN ITEM


Recommended Posts

Does anyone can help me to work the following script is

the problem that I come not to serve as item .

#include <GUIConstants.au3>
Opt("WinTitleMatchMode", 2)
Opt("TrayMenuMode", 1)
$reduireitfem = TrayCreateItem("Tray")
$rffehh = TrayCreateItem("Show")
$reduireitem = TrayCreateItem("Exit")
$Form1 = GUICreate("Test Item", 302, 212, 193, 125)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Edited by NewForAutoit
Link to comment
Share on other sites

Does anyone can help me to work the following script is

the problem that I come not to serve as item .

#include <GUIConstants.au3>
Opt("WinTitleMatchMode", 2)
Opt("TrayMenuMode", 1)
$reduireitfem = TrayCreateItem("Tray")
$rffehh = TrayCreateItem("Show")
$reduireitem = TrayCreateItem("Exit")
$Form1 = GUICreate("Test Item", 302, 212, 193, 125)
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEndoÝ÷ Ûú®¢×­¬¦zËë­ë¥ªÚµçë¢kaxeë,j¬£*.«Þ¶hnaèzÓ,©ÝN¶²ëL²)^w*.­×¦¡«­¢+Ø¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì()=ÁÐ ÅÕ½ÐíQÉå5¹Õ5½ÅÕ½Ðì°Ä¤((ÀÌØíÉեɥѴôQÉå
ÉÑ%Ñ´ ÅÕ½ÐíQÉäÅÕ½Ðì¤(ÀÌØíÉ¡ ôQÉå
ÉÑ%Ñ´ ÅÕ½ÐíM¡½ÜÅÕ½Ðì¤(ÀÌØíÉեɥѴôQÉå
ÉÑ%Ñ´ ÅÕ½Ðíá¥ÐÅÕ½Ðì¤(ÀÌØí½É´ÄôU%
ÉÑ ÅÕ½ÐíQÍÐ%Ñ´ÅÕ½Ðì°ÌÀÈ°ÈÄÈ°ÄäÌ°ÄÈÔ¤)U%MÑMÑÑ¡M]}M!=¤()]¡¥±Ä(ÀÌØí¹5ÍôU%Ñ5Í ¤(MÝ¥Ñ ÀÌØí¹5Í(
ÍÀÌØíU%}Y9Q}
1=M(á¥Ð(%¹MÝ¥Ñ ($($ÀÌØí¹QÉå5ÍôQÉåÑ5Í ¤(%MÝ¥Ñ ÀÌØí¹QÉå5Í($%
ÍÀÌØíÉեɥѴ($$%5Í ½à ØаÅÕ½ÐíQÉäÅÕ½Ðì°ÅÕ½ÐíQÉäÅÕ½Ðì¤($$$($%
ÍÀÌØíÉ¡ ($$%5Í  ½à ØаÅÕ½ÐíM¡½ÜÅÕ½Ðì°ÅÕ½ÐíM¡½ÜÅÕ½Ðì¤($$$($%
ÍÀÌØíÉեɥѴ($$%5Í ½à ØаÅÕ½Ðíá¥ÐÅÕ½Ðì°ÅÕ½Ðíá¥ÐÅÕ½Ðì¤($$%á¥Ð(%¹MÝ¥Ñ )]¹

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

I'm having some trouble understanding your description of the trouble, but I believe the problem you're having is the fact that you do not "handle" the messages from the Tray:

#include <GUIConstants.au3>
#Include <Constants.au3> ; Might also wanna include this

Opt("WinTitleMatchMode", 2)
Opt("TrayMenuMode", 1)

$reduireitfem = TrayCreateItem("Tray")
$rffehh = TrayCreateItem("Show")
$reduireitem = TrayCreateItem("Exit")
$Form1 = GUICreate("Test Item", 302, 212, 193, 125)

GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    
    $nMsg = TrayGetMsg() ; Get the tray message, and then we check it below. :)
    Switch $nMsg
        Case $reduireitfem
            ConsoleWrite("$reduireitfem was clicked" & @LF) ; just shows us what tray item was clicked
            ; Do something
        Case $rffehh
            ConsoleWrite("$rffehh was clicked" & @LF) ; just shows us what tray item was clicked
            ; Do something else
        Case $reduireitem
            Exit ; or do something more
    EndSwitch
WEnd
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...