Jump to content

$TRAY_EVENT_PRIMARYDOUBLE


Recommended Posts

Hey, You might've noticed I've posted this question in a couple of forums, so it is sort of a double post. I was just messing around with the GUI functions, and made a simple GUI, but when I tried to the following code it gave me an Unknown Variable error:

#Include<GUIConstants.au3>

GUICreate("Dan's GUI", 300, 300)

$tray = TrayGetMsg()
If $tray = $TRAY_EVENT_PRIMARYDOUBLE Then
Msgbox(0, "GUI Tests", "It Worked!!!")
oÝ÷ Ø'£¢é]ºÇºÚ"µÍ^TÙ]ÛXÚÊ
BoÝ÷ Ù»­!©·w+¬xºÚ"µÍ^TÙ]ÛXÚÊMB

for a different function. I have searched through all of the include files, and found no functions for Tray Events, but in the helpfile under TraySetOnEvent, it is one of the choices. If I am missing an Include file, or if something has happened that I don't know about, PLEASE let me know. Thank you so much for taking the time to reply.

EDIT: Typo

Edited by dandymcgee

- Dan [Website]

Link to comment
Share on other sites

Valik, you would be my idol if i hadn't just found that out about 5 seconds before I read your post. Thank very much for replying, but I was smart enough to do a windows search for tray event and low and behold the first file to popup was the constants.au3 file :P There is a very simple fix for this annoying little error. Right-click on GUIConstants.au3, uncheck the read-only box, and apply. Open GUIConstants.au3 add the line:

#include<Constants.au3>
oÝ÷ Øíz»aÇØî²Öu«­¢+Ø(¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì(

at the beginning of you scripts as usual, and the tray functions will work just fine.

Edited by dandymcgee

- Dan [Website]

Link to comment
Share on other sites

There is a very simple fix for this annoying little error. Right-click on GUIConstants.au3, uncheck the read-only box, and apply. Open GUIConstants.au3 add the line:

You have no excuse for double posting so please do not do it.

Why did you not consider applying the Const to your own script, rather then editing a stardard include file?

Adding to your own script for 1, stays with your script and 2, it can be removed if the standard constants file is updated in the future e.g. in the next beta version.

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