Jump to content

Recommended Posts

Posted

GUICtrlSetOnEvent ( controlID, "function" )

Parameters

controlID The control identifier (controlID) as returned by a GUICtrlCreate... function.

function The name of the user function to call.

The following is from the manual, is there a way to send user define variable when calling the user function. example:

GUICtrlSetOnEvent(-1, "CancelPressed")

will call the function CancelPressed

Can we do something like:

GUICtrlSetOnEvent(-1, "CancelPressed(variable)")

????

Posted

The following is from the manual, is there a way to send user define variable when calling the user function. example:

GUICtrlSetOnEvent(-1, "CancelPressed")

will call the function CancelPressed

Can we do something like:

GUICtrlSetOnEvent(-1, "CancelPressed(variable)")

????

<{POST_SNAPBACK}>

Could I have a more detailed description of what your trying to do?

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Posted

Could I have a more detailed description of what your trying to do?

<{POST_SNAPBACK}>

the manual states that i can give the system function GUICtrlSetOnEvent the control ID and then send it to a custom function. This function is usually just a name it doesn't seem to take any define variables.

I am using GUICtrlSetOnEvent within in my a functionA which is going to call my prdefine functionB which is going to close the child window. my issue is, I intend to use this functionA over and over but don't want to have to only change a single variable.

If i can dynamically change the variable in FunctionA allowing functionB to take this variable, I will only have to use 2 functions and not have to copy and paste the function over when I want to use it. EX:

Func FunctionA()

GUICtrlSetOnEvent($exit,"GUIAct_SwitchToParent");send some varible when $exit control id presentEndFunc

Func GUIAct_SwitchToParent(allow variable);[COLOR=red]FunctionB[/color]

GUISwitch($child_win)

GUIDelete()

ControlEnable($parent_title, "", "")

GUISwitch($ParentWin)

EndFunc

  • 4 months later...

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
×
×
  • Create New...