Jump to content
Sign in to follow this  

Need help with events

Recommended Posts


Hi everyone,

I created a au3 with ~30 Buttons, ~30 Labels and ~30 Inputs.

For each button i created an Event.

So far it works fine...

If I click button1, the script starts a function which get´s the value of input1 and fills all other input fields with values, tries to connect to other pc´s, changes names of buttons depending on online or offline pc´s and so on...

This works also fine...

But if I want to click for example button2 while func button1 is running, it only starts the func button2 AFTER func button1 is done...

Is there any way to change this ?

Many thanks for your help!

Here are some parts of my script:

GUICreate('Tool v' & FileGetVersion(@ScriptName),470,705)

$Button_GetData=GUICtrlCreateButton('Get Data',10,10,100)

$Button_ExternalIP=GUICtrlCreateButton('Externe IP',10,40,100)

Func Button_GetData()
   $ip='10.' & StringLeft(GUICtrlRead($Data_GetData),2) & '.' & StringRight(GUICtrlRead($Data_GetData),2) & '.'
    GUICtrlSetData($Data_ExternalIP,$ip & '51')
    If Ping($ip & '1',1000) Then

Share this post

Link to post
Share on other sites

The Ping function takes time and since Autoit is single-threaded it gets stucked at the command

To make it Asynchronous command line(external execution) would be required

Manadar has implemented such a wrapper check it out

Something similar Trancexx has even done

Regards :)

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

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