Sign in to follow this  
Followers 0
thenewkid

input

3 posts in this topic

Hi im not to shore how to make my gui input boxs 2-4 to copy the text from input1 here my code on what i fort it would be but it does not work can any one help

thank you for your time

#include <GuiConstants.au3>

GuiCreate("MyGUI", 235, 190,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GuiCtrlCreateInput("", 20, 30, 200, 20)
$Input_2 = GuiCtrlCreateInput("", 20, 60, 200, 20)
$Input_3 = GuiCtrlCreateInput("", 20, 90, 200, 20)
$Input_4 = GuiCtrlCreateInput("", 20, 120, 200, 20)
$Button_copy = GuiCtrlCreateButton("Copy", 20, 150, 60, 30)
$Button_exit = GuiCtrlCreateButton("Exit", 160, 150, 60, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $Button_exit
            Exit
        Case $msg = $Button_copy
            $Input_2 = $Input_1
            $Input_3 = $Input_1
            $Input_4 = $Input_1
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    EndSelect
WEnd
Exit

some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Share this post


Link to post
Share on other sites



Hi im not to shore how to make my gui input boxs 2-4 to copy the text from input1 here my code on what i fort it would be but it does not work can any one help

thank you for your time

#include <GuiConstants.au3>

GuiCreate("MyGUI", 235, 190,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GuiCtrlCreateInput("", 20, 30, 200, 20)
$Input_2 = GuiCtrlCreateInput("", 20, 60, 200, 20)
$Input_3 = GuiCtrlCreateInput("", 20, 90, 200, 20)
$Input_4 = GuiCtrlCreateInput("", 20, 120, 200, 20)
$Button_copy = GuiCtrlCreateButton("Copy", 20, 150, 60, 30)
$Button_exit = GuiCtrlCreateButton("Exit", 160, 150, 60, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $Button_exit
            Exit
        Case $msg = $Button_copy
            $Input_2 = $Input_1
            $Input_3 = $Input_1
            $Input_4 = $Input_1
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;
    EndSelect
WEnd
Exit

You need to use GUICtrlRead() to read data from a control. You need to then take the read data and set the other controls equal to that read data by using GUICtrlSetData(). What you did was mess with the return values of the GUICtrlCreateInput() function. These are control handles which are nothing but numbers that the GUI and operating system for that matter use to distinguish each control from one another.

#include <GuiConstants.au3>

GuiCreate("MyGUI", 235, 190,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GuiCtrlCreateInput("", 20, 30, 200, 20)
$Input_2 = GuiCtrlCreateInput("", 20, 60, 200, 20)
$Input_3 = GuiCtrlCreateInput("", 20, 90, 200, 20)
$Input_4 = GuiCtrlCreateInput("", 20, 120, 200, 20)
$Button_copy = GuiCtrlCreateButton("Copy", 20, 150, 60, 30)
$Button_exit = GuiCtrlCreateButton("Exit", 160, 150, 60, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $Button_exit
            Exit
        Case $msg = $Button_copy
            $s_Input1 = GUICtrlRead($Input_1)
            GUICtrlSetData($Input_2, $s_Input1)
            GUICtrlSetData($Input_3,$s_Input1)
            GUICtrlSetData($Input_4,$s_Input1)
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    EndSelect
WEnd
Exit

"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

thx im not use to going my forms in auto it i all ways you C# for them but i wanted a chage :P


some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

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