gcue Posted June 23, 2010 Share Posted June 23, 2010 (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 June 23, 2010 by gcue Link to comment Share on other sites More sharing options...
Spiff59 Posted June 23, 2010 Share Posted June 23, 2010 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)? Link to comment Share on other sites More sharing options...
gcue Posted June 23, 2010 Author Share Posted June 23, 2010 (edited) ya i was trying to avoid doing a global variable declaration =/ Edited June 23, 2010 by gcue Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now