Sign in to follow this  
Followers 0
Ontosy

Controls array in TrayGetMsg()

4 posts in this topic

i have:

For $n = 1 To 4

$ahExtList[$n-1] = TrayCreateItem("&" & ($n + 1), $hMenuExt, $n + 1, 1)

Next

and then:

$msg=TrayGetMsg()

Switch $msg

Case $ahExtList[0]

....

Case $ahExtList[1]

....

Case $ahExtList[2]

....

Case $ahExtList[3]

....

do it is possibile to use only

Case $ahExtList

msgbox(0,0, $ahExtList number)

?

excuse my english.

Share this post


Link to post
Share on other sites



Take a look at the example for TrayGetMsg in the AutoIt Help File. What you are asking for here is shown in that example.

Share this post


Link to post
Share on other sites

What you are asking for here is shown in that example.

I do not seem right

Share this post


Link to post
Share on other sites

I read your question again. I hadn't finished my coffee yet!

One option would be to catch $msg > 0. This will give you the control id and that is what is stored in each element of your array. Another option would be to use OnEvent code.

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