Jump to content

[Solved] 2 GUI's and GUICtrlSetData()


Recommended Posts

So i have one script.

1.I create GUI 1. It has several buttons and one Edit control. GUICtrlSetData works great there

2.When on of the buttons is pressed i GUISetState (hide) the first GUI and create a new GUI.

it has several buttons and one Edit control.

3.When i press one of the buttons it should :

GUICtrlSetFont($edit, 25, 10)

GUICtrlSetData($edit,"Operation in progress")

Do some other things ...

But it fails on the GUICtrlSetFont and GUICtrlSetData. Any ideas why? After that it continues as expected.

Edited by Juvigy
Link to comment
Share on other sites

So i have one script.

1.I create GUI 1. It has several buttons and one Edit control. GUICtrlSetData works great there

2.When on of the buttons is pressed i GUISetState (hide) the first GUI and create a new GUI.

it has several buttons and one Edit control.

3.When i press one of the buttons it should :

GUICtrlSetFont($edit, 25, 10)

GUICtrlSetData($edit,"Operation in progress")

Do some other things ...

But it fails on the GUICtrlSetFont and GUICtrlSetData. Any ideas why? After that it continues as expected.

You really shouldn't expect us to know what you have written in your script without at least showing us an example that demonstrates the problem; you are liable to get facetious answers.

Have you perhaps given the controls on the second gui the same variable names as those on the first gui?

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

The script is too complicated to post all here - 5000 lines. I have tried to sum up the situation briefly . The controls are different. And i dont get any errors or warnings. I will try to come up with a demo script to show up here shortly...

Edit. Here is a short example :

Edit2. example removed.

I found the error:

$Labell0 and $Label10 - very difficult to spot , no error indication and warning at all - maybe a good practice would be to implement something about that?

Edited by Juvigy
Link to comment
Share on other sites

The script is too complicated to post all here - 5000 lines. I have tried to sum up the situation briefly . The controls are different. And i dont get any errors or warnings. I will try to come up with a demo script to show up here shortly...

Edit. Here is a short example :

Edit2. example removed.

I found the error:

$Labell0 and $Label10 - very difficult to spot , no error indication and warning at all - maybe a good practice would be to implement something about that?

Yes, maybe use Function AutoItSetOptionAutoItSetOption("MustDeclareVars",1).

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

10x. Should i put that in all scripts every time or i can set it in a option or an INI file and forget about it?

Put it in a script every time I think.

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...