SmokNiszczyciel Posted July 6, 2010 Share Posted July 6, 2010 I have problem - I don't know how to do this but I know it's possible - how to make a GUI with textbox and some buttons - u press one button then new GUI window pops up and u can edit some things like check this box, then add text there and choose it from combobox, after u finisht u press button "ADD" and in main GUI window in the text window will be text u have added So how to do this? Link to comment Share on other sites More sharing options...
sleepydvdr Posted July 6, 2010 Share Posted July 6, 2010 (edited) is this what you are asking for? #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 443, 161, -1, -1) $Button1 = GUICtrlCreateButton("Button1", 344, 16, 75, 25, 0) $Button2 = GUICtrlCreateButton("Button2", 344, 56, 75, 25, 0) $Button3 = GUICtrlCreateButton("Add", 312, 112, 75, 25, 0) $Input1 = GUICtrlCreateInput("Type something here", 40, 112, 249, 21) $Label1 = GUICtrlCreateLabel("Label1", 40, 48, 212, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $a = GUICreate("Form2", 443, 161, 100, 100) GUISetState(@SW_SHOW) $Label1 = GUICtrlCreateLabel("Popup box #1", 40, 48, -1, -1) sleep (2000) GUIDelete($a) Case $Button2 $b = GUICreate("Form3", 443, 161, 200, 200) GUISetState(@SW_SHOW) $Label1 = GUICtrlCreateLabel("Popup box #2", 40, 48, -1, -1) sleep (2000) GUIDelete($b) Case $Button3 $read = GUICtrlRead ($Input1) $Label1 = GUICtrlCreateLabel($read, 40, 48, 212, 17) EndSwitch WEnd Edited July 6, 2010 by sleepydvdr #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
SmokNiszczyciel Posted July 6, 2010 Author Share Posted July 6, 2010 "u press button "ADD" and in main GUI window in the text window will be text u have added" - i need to know how to make such thing - u click button1 and in text window will appear some editable text and after u click button "SAVE SCRIPT" then it will make a .xml file with text from text window Link to comment Share on other sites More sharing options...
sleepydvdr Posted July 6, 2010 Share Posted July 6, 2010 I'm not exactly sure what it is you need, but I will try to help with individual parts. Here's a script where you have an input box and when you click the button, it creates an XML file on your desktop and writes what you typed to the file. #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 443, 161, -1, -1) $Button1 = GUICtrlCreateButton("Button1", 344, 128, 75, 25, 0) $Edit1 = GUICtrlCreateEdit("", 16, 8, 409, 113) GUICtrlSetData(-1, '<?xml version="1.0"?>' & @CRLF & '<!DOCTYPE TEST "test.dtd">' & @CRLF & '<?xml-stylesheet type="text/css" href="xmlteststyle.css"?>') GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 FileCopy ("", @DesktopDir & "\XML File.xml", 8) $read = GUICtrlRead ($Edit1) FileWrite(@DesktopDir & "\XML File.xml", $read) EndSwitch WEnd #include <ByteMe.au3> Link to comment Share on other sites More sharing options...
SmokNiszczyciel Posted July 6, 2010 Author Share Posted July 6, 2010 but i want script write text to input box, example: i have few buttons in GUI, few checkboxes, and few inputs - i check this box write this text and press button "ADD" and script adds text to inputbox Link to comment Share on other sites More sharing options...
SmokNiszczyciel Posted July 6, 2010 Author Share Posted July 6, 2010 but i want script write text to input box, example: i have few buttons in GUI, few checkboxes, and few inputs - i check this box write this text and press button "ADD" and script adds text to inputbox 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