Jump to content

GUI Window and Func Statements


Recommended Posts

So I've finally moved on to creating a GUI for a script of mine, but I've run into an issue....

The GUI has two input fields which display data variables (eg. $Data2) which I want to change as the program continues. As the functions shown below continue, the variables will change after each func statement. But they do not change.

I also have two set buttons in the GUI window, which when pressed, I have set so that an Input box appears, which sets the value for a variable which is used for the Func statements. The buttons, when pressed, do nothing.

When only the GUI code is run, it works perfectly, but when I add the func statements for the program, the buttons and inputs have no effect.

I know that this is because as the func statements run, everything else is ignored, but I dont know how to fix this.

Any help?

This is what I have so far:

(just the layout, no specifics)

GUI window info

Do
$msg= GuiGetMsg()
If $Buttonclicked
Inputbox
Endif
Until $msg = $GUI_EVENT_CLOSE

Func One()
Two()
Endfunc

Func Two()
Three()
Endfunc

Func Three()
One()
Endfunc
Link to comment
Share on other sites

Also, if I put the func statements directly into the Do...Until, then I get the error "Do statement has no corresponding Until statement"

Your scipt, or the bit you've posted, does not make much sense to me.

InputBox is incomplete and something should be set to receive the return value; such as

$value1 = Inputbox('title','prompt') - look in the help file.

Your functions One(), Two() and Three(0 are never called, but if one of them was called you would have an endless loop and probably get a stack overflow.

Maybe you could post your entire scirpt.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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
 Share

  • Recently Browsing   0 members

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