Sign in to follow this  
Followers 0
stuartc1

noobie - help with GUICtrlSetOnEvent()

2 posts in this topic

Hi all,

just found out about autoit a couple of days ago and think it's great :(

I've been writing a script and ran into a problem... here is my scenario ->

I have a GUI form created with Opt("GUIOnEventMode", 1) as I need to pass variables from text box form fields...

I have several text boxes each with their own submit button (each field does a different action).

All fine and working.... I've been using:

GUICtrlSetOnEvent($submitF, "SubmitFunc")

so that when a button is clicked the function SubmitFunc() will run.... works fine.

But I dont want to create a new function for every text/submit I have as there will be lots of duplicate code. So what I need to do is pass the value of the text field to the function when the related button is clicked. After looking at the docs for GUICtrlSetOnEvent() I see no way of passing values/variables.

Is this possible or is there some other way to do this? hope this make sense

many thanks

stuartc1

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