AcidCorps Posted July 3, 2007 Share Posted July 3, 2007 is there a way to create a cmd file with text entered in an edit box so if in the edit box it says Echo hi Echo how are you? the cmd file will be created with Echo hi Echo how are you? as the lines in it Link to comment Share on other sites More sharing options...
smashly Posted July 3, 2007 Share Posted July 3, 2007 (edited) Hi, do mean something like this as a crude example ? #include <GUIConstants.au3> $Gui = GuiCreate('Edit To CMD', 400, 300) $Edit = GuiCtrlCreateEdit('', 10, 10, 380, 250) $Button = GUICtrlCreateButton('Save', 175, 270, 50, 20) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button $Buffer = GuiCtrlRead($Edit) $Save = FileSaveDialog('Save to..', @ScriptDir, 'CMD File (*.cmd)', 18, 'MyCmd.cmd') If @error <> 1 Then FileClose(FileWrite(FileOpen($Save, 2), $Buffer)) EndIf EndSelect Wend Cheers Edited July 3, 2007 by smashly Link to comment Share on other sites More sharing options...
AcidCorps Posted July 3, 2007 Author Share Posted July 3, 2007 thats enough information for me to get what I want. Thank you 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