James Posted May 15, 2007 Share Posted May 15, 2007 I know. Tobi. Use the help file and look at FileSaveDialog. You should see what is wrong with it. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
tobi2006 Posted May 16, 2007 Author Share Posted May 16, 2007 I know.Tobi. Use the help file and look at FileSaveDialog. You should see what is wrong with it.I've got it!The FileSaveDialog works! Link to comment Share on other sites More sharing options...
tobi2006 Posted May 16, 2007 Author Share Posted May 16, 2007 I've got it!The FileSaveDialog works!Which GUICtrl must I use for loading a txt file into a editbox? Link to comment Share on other sites More sharing options...
James Posted May 16, 2007 Share Posted May 16, 2007 (edited) GuiCtrlSetData($file, $edit) Edited May 16, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
tobi2006 Posted May 16, 2007 Author Share Posted May 16, 2007 GuiCtrlSetData($file, $edit)It doesn't work!It loads the txt file and then there is no text in editbox! Link to comment Share on other sites More sharing options...
November Posted May 16, 2007 Share Posted May 16, 2007 It doesn't work!It loads the txt file and then there is no text in editbox!Hi again,try to read the file first and the send it to the controlHints :FileReadGuiCtrlSetDataCheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
James Posted May 16, 2007 Share Posted May 16, 2007 Re-read the GuiCtrlSetData helpfile. That should give you a clue. Look at its parameters. Which control are you setting, and what are you setting that control to? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
tobi2006 Posted May 16, 2007 Author Share Posted May 16, 2007 Hi again,try to read the file first and the send it to the controlHints :FileReadGuiCtrlSetDataCheersCan post here a example? Link to comment Share on other sites More sharing options...
November Posted May 16, 2007 Share Posted May 16, 2007 Can post here a example? #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUICtrlCreateCombo ("", 10,10) GUICtrlSetData(-1,"item1|item2|item3", "item3") GUISetState () ; will display an empty dialog box with a combo control with focus on ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
tobi2006 Posted May 16, 2007 Author Share Posted May 16, 2007 #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUICtrlCreateCombo ("", 10,10) GUICtrlSetData(-1,"item1|item2|item3", "item3") GUISetState () ; will display an empty dialog box with a combo control with focus on ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WendoÝ÷ Ûú®¢×ºÚ"µÍÕRPÝÙ]]H ÌÍÑY]ÌK ÌÍÙ[LJ What's wrong? It loads a 1 into the edit box! Link to comment Share on other sites More sharing options...
James Posted May 16, 2007 Share Posted May 16, 2007 #include <GUIConstants.au3> $sGui = GUICreate("FileWrite Text", 634, 450, -1, -1) $Edit = GUICtrlCreateEdit("", 0, 0, 633, 401, BitOR($ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL)) GUICtrlSetData(-1, "TYPE IN HERE THEN PRESS SAVE. I WILL SAVE TO C:\test.txt!") $Save = GUICtrlCreateButton("Save", 208, 408, 177, 41, 0) $Open = GUICtrlCreateButton("Open", 25, 408, 177, 41, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Save $FileSave = FileSaveDialog("Save me!", "C:\", "Text files (*.ini;*.txt)", 2) $Txt = GuiCtrlRead($Edit) FileWrite($FileSave, $Txt) Case $Open $FileOpen = FileOpenDialog("Open", "C:\", "Text Files (*.ini;*.txt)") GUICtrlSetData($Edit, $FileOpen) EndSwitch WEnd Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
November Posted May 16, 2007 Share Posted May 16, 2007 GUICtrlSetData ($Edit_1, $file0,1) What's wrong? It loads a 1 into the edit box! Try to find in the script $edit_1 and $file Just a hint... try to modify some help examples... i think you have to learn more about AutoIT! Cheers m8 Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
James Posted May 16, 2007 Share Posted May 16, 2007 I posted a working version added to your script. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
tobi2006 Posted May 16, 2007 Author Share Posted May 16, 2007 Okay! I got it! $line = FileRead($file0) GUICtrlSetData ( $Edit_1, $line ) Link to comment Share on other sites More sharing options...
James Posted May 16, 2007 Share Posted May 16, 2007 Thats just going a long way. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
November Posted May 16, 2007 Share Posted May 16, 2007 Thats just going a long way.True :SI'm almost writing the code...Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
tobi2006 Posted May 16, 2007 Author Share Posted May 16, 2007 (edited) And now I want to print that, what I typed in the editbox! Edited May 16, 2007 by tobi2006 Link to comment Share on other sites More sharing options...
James Posted May 16, 2007 Share Posted May 16, 2007 Look at the helpfile. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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