Sign in to follow this  
Followers 0
cramaboule

GUI and variable. How to test ?

4 posts in this topic

Hi,

As I am not so good in GUI, I need help with this folloing code:

#include <GuiConstants.au3>
#include <Constants.au3>
#Include <Misc.au3>

Global $myvar[6][10] , $Input[6]

GUICreate ("test", 200,200,-1,-1)
$myvar[0][0]=2
For $i = 1 To $myvar[0][0]
    GuiCtrlCreateLabel("test", 20+(($i-1)*70), 40, 40, 20)
    $Input[$i]=GUICtrlCreateInput("input", 20+(($i-1)*70), 70,40,20)
Next
 GUISetState()
 
 While 1
    $msg = GuiGetMsg()
     Select
        Case $msg = $GUI_EVENT_CLOSE Or _IsPressed("1B") ;exit
            Exit
        Case Else
            ;;;
    EndSelect
WEnd

How can I test $input[$i] ???

Obviously $myvar[0][0] can be any number !!!! (between 1 and 5)

Thanks for your help !

Share this post


Link to post
Share on other sites



Hi,

As I am not so good in GUI, I need help with this folloing code:

#include <GuiConstants.au3>
#include <Constants.au3>
#Include <Misc.au3>

Global $myvar[6][10] , $Input[6]

GUICreate ("test", 200,200,-1,-1)
$myvar[0][0]=2
For $i = 1 To $myvar[0][0]
    GuiCtrlCreateLabel("test", 20+(($i-1)*70), 40, 40, 20)
    $Input[$i]=GUICtrlCreateInput("input", 20+(($i-1)*70), 70,40,20)
Next
 GUISetState()
 

 While 1
    $msg = GuiGetMsg()
     Select
        Case $msg = $GUI_EVENT_CLOSE Or _IsPressed("1B") ;exit
            Exit
        Case Else
            ;;;
    EndSelect
WEnd

How can I test $input[$i] ???

Obviously $myvar[0][0] can be any number !!!! (between 1 and 5)

Thanks for your help !

Test $input[$i] ??? If you mean how can you tell when the contents change then you could register a message for $EN_CHANGE (I think it's $EN_CHANGE).


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.

Share this post


Link to post
Share on other sites

Woops sorry for my bad translation: :

I meant how can I read (GUICtrlRead()) the 2 Inputs ? :)

Do I have to do that in a For Next loop ???

Thanks !

Share this post


Link to post
Share on other sites

Woops sorry for my bad translation: :

I meant how can I read (GUICtrlRead()) the 2 Inputs ? :)

Do I have to do that in a For Next loop ???

Thanks !

just use

$quelquechose1 = GuiCtrlRead($input[1]) etc or ,yes, do it in a for/next loop.


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.

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