Jump to content

noobie - help with GUICtrlSetOnEvent()

Recommended Posts

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


Link to comment
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...