Sign in to follow this  
Followers 0
gcue

menu option clicked or not

3 posts in this topic

#1 ·  Posted (edited)

i have a function that runs on startup but i also have that same function run on menu click. i tried running this to identify if it was initiated by a click or not

If @GUI_CtrlHandle = @error Then MsgBox(0, "", "not clicked")
    If @GUI_CtrlHandle <> @error Then MsgBox(0, "", "clicked")

ive also tried @gui_ctrlid, @GUI_WinHandle

but get this error in both cases when the function runs on startup:

uknown macro

Edited by gcue

Share this post


Link to post
Share on other sites



i have a function that runs on startup but i also have that same function run on menu click. i tried running this to identify if it was initiated by a click or not

If @GUI_CtrlHandle = @error Then MsgBox(0, "", "not clicked")
    If @GUI_CtrlHandle <> @error Then MsgBox(0, "", "clicked")

ive also tried @gui_ctrlid, @GUI_WinHandle

but get this error in both cases when the function runs on startup:

Set a flag in the script, or add a parm to the function, indicating what method was used to invoke the function? 0 = Initialization, 1 = User Requested (menu click)?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

ya i was trying to avoid doing a global variable declaration =/

Edited by gcue

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