Sign in to follow this  
Followers 0
dandymcgee

$TRAY_EVENT_PRIMARYDOUBLE

4 posts in this topic

#1 ·  Posted (edited)

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]

Share this post


Link to post
Share on other sites



Unintuitively enough, the tray constants were placed into "Constants.au3".

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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]

Share this post


Link to post
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.

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