ashley Posted July 7, 2007 Share Posted July 7, 2007 ok im wondring is this the right place to ask for help... Im gona make a text editor(like wordpad) ANd i might need some help... Thanks in advance I will post my first version soon... or if it comes to it i will ask for help soon Free icons for your programs Link to comment Share on other sites More sharing options...
Valuater Posted July 7, 2007 Share Posted July 7, 2007 Welcome to Autoit! Be sure to search the "Example Scripts" section, there may be a couple of scripts that cab help you get started or at least guide you in the direction you want to go 8) Link to comment Share on other sites More sharing options...
ashley Posted July 7, 2007 Author Share Posted July 7, 2007 Welcome to Autoit!Be sure to search the "Example Scripts" section, there may be a couple of scripts that cab help you get started or at least guide you in the direction you want to go8)ok thanks for the info...Im trying to find a save Func...And a Print FuncAnd an Open Funcany more helpThanks in advance Free icons for your programs Link to comment Share on other sites More sharing options...
Valuater Posted July 7, 2007 Share Posted July 7, 2007 (edited) Depending on what open, save, & print you want to do.... FileSaveDialog() _FilePrint() etc ALL IN THE HELP FILE be sure to search examples to get more info too 8) Edited July 7, 2007 by Valuater Link to comment Share on other sites More sharing options...
ashley Posted July 7, 2007 Author Share Posted July 7, 2007 (edited) Depending on what open, save, & print you want to do.... FileSaveDialog() _FilePrint() etc ALL IN THE HELP FILE be sure to search examples to get more info too 8) ok well check first post the script so far is posted there.... Ok well i cant edit is the edit bguton is missing.. so here it is... expandcollapse popup;~# includes #include <GUIConstants.au3> ;~# includes end ;~# hotkeys HotKeySet("^s", "save") HotKeySet("^o", "open") HotKeySet("^p", "print") ;~# hotkeys end #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("TypePad- By Ashley", 633, 447, 206, 117) GUISetCursor (0) GUISetFont(8, 400, 0, "Arial Black") GUISetBkColor(0x0000FF) GUICtrlCreateEdit("", 8, 8, 617, 409) GUICtrlSetColor(-1, 0xFF0000) $Label2 = GUICtrlCreateLabel("To open a file press Ctrl + O", 152, 424, 181, 19, BitOR($SS_CENTER,$WS_BORDER), $WS_EX_STATICEDGE) GUICtrlSetColor(-1, 0xFF0000) $Label3 = GUICtrlCreateLabel("To print a file press Crtl + P", 336, 424, 172, 19, $WS_BORDER, $WS_EX_STATICEDGE) GUICtrlSetColor(-1, 0xFF0000) $Label1 = GUICtrlCreateLabel("To save press Ctrl + S", 3, 425, 146, 19, BitOR($SS_CENTER,$WS_BORDER), $WS_EX_STATICEDGE) GUICtrlSetColor(-1, 0xFF0000) $Label4 = GUICtrlCreateLabel("Typepad By Ashley", 512, 424, 119, 19, BitOR($SS_SUNKEN,$WS_BORDER)) GUICtrlSetColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Save() EndFunc Func Open() EndFunc Func print() EndFunc thanks so far... Edited July 7, 2007 by ashley Free icons for your programs Link to comment Share on other sites More sharing options...
ashley Posted July 7, 2007 Author Share Posted July 7, 2007 I have came across some errors (while testing) when i save the file the save box don't come up it just saves... when i print the file it asks for a allready saved file... Cant find open func in help file And when i do save when i open the saved file all it says is 3 here is script so far... expandcollapse popup;~# includes #include <GUIConstants.au3> #include <file.au3> ;~# includes end ;~# hotkeys HotKeySet("^s", "save") HotKeySet("^o", "open") HotKeySet("^p", "print") Hotkeyset("^l", "linecount") ;~# hotkeys end #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("TypePad- By Ashley", 633, 447, 206, 117) GUISetCursor (0) GUISetFont(8, 400, 0, "Arial Black") GUISetBkColor(0x0000FF) $edit = GUICtrlCreateEdit("", 8, 8, 617, 409) GUICtrlSetColor(-1, 0xFF0000) $Label2 = GUICtrlCreateLabel("To open a file press Ctrl + O", 152, 424, 181, 19, BitOR($SS_CENTER,$WS_BORDER), $WS_EX_STATICEDGE) GUICtrlSetColor(-1, 0xFF0000) $Label3 = GUICtrlCreateLabel("To print a file press Crtl + P", 336, 424, 172, 19, $WS_BORDER, $WS_EX_STATICEDGE) GUICtrlSetColor(-1, 0xFF0000) $Label1 = GUICtrlCreateLabel("To save press Ctrl + S", 3, 425, 146, 19, BitOR($SS_CENTER,$WS_BORDER), $WS_EX_STATICEDGE) GUICtrlSetColor(-1, 0xFF0000) $Label4 = GUICtrlCreateLabel("Typepad By Ashley", 512, 424, 119, 19, BitOR($SS_SUNKEN,$WS_BORDER)) GUICtrlSetColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Save() $file = FileOpen("TypePad- text.txt", 1) FileWrite($file, $edit) FileClose($file) EndFunc Func Open() EndFunc Func print() $file = FileOpenDialog("Print File", "", "Text Documents (*.txt)", 1) If @error Then Exit $print = _FilePrint($file) If $print Then MsgBox(0, "Print", "The file was printed.") Else MsgBox(0, "Print", "Error: " & @error & @CRLF & "The file was not printed.") EndIf EndFunc Func linecount() $CountLines = _FileCountLines("TypePad.au3") MsgBox(64, "Lines in file", "There are " & $CountLines & " in this file") EndFunc Please help Free icons for your programs Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2007 Developers Share Posted July 7, 2007 to retrieve the content of a Control you need to do GuiCtrlRead() ..... SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ashley Posted July 7, 2007 Author Share Posted July 7, 2007 to retrieve the content of a Control you need to do GuiCtrlRead() ..... ok and that hel[s me how... im a NOOB... i joined TODAY Free icons for your programs Link to comment Share on other sites More sharing options...
Developers Jos Posted July 7, 2007 Developers Share Posted July 7, 2007 ok and that hel[s me how... im a NOOB... i joined TODAY$edit is the Handle of the EditControl not the content. to get its content you need to do: FileWrite($file, GUICtrlRead($edit)) does that make more sense ? SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ashley Posted July 7, 2007 Author Share Posted July 7, 2007 $edit is the Handle of the EditControl not the content. to get its content you need to do:FileWrite($file, GUICtrlRead($edit))does that make more sense ?perfect.. but do u know how to make the user to be able to save with wotever name they want..and can u help with any other func's Free icons for your programs Link to comment Share on other sites More sharing options...
ashley Posted July 7, 2007 Author Share Posted July 7, 2007 (edited) ok heres wot i have so far... Run the one called TypePad You will make to make your own pic or take it out... its to big for me to upload... Edited July 7, 2007 by ashley Free icons for your programs Link to comment Share on other sites More sharing options...
ashley Posted July 8, 2007 Author Share Posted July 8, 2007 anymore help Free icons for your programs 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