thenewkid Posted January 2, 2007 Share Posted January 2, 2007 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 Link to comment Share on other sites More sharing options...
The Kandie Man Posted January 2, 2007 Share Posted January 2, 2007 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 Link to comment Share on other sites More sharing options...
thenewkid Posted January 2, 2007 Author Share Posted January 2, 2007 thx im not use to going my forms in auto it i all ways you C# for them but i wanted a chage 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now