Jump to content

AuPad - Notepad in AutoIt ; Updated - Oct 26th, 2015


MikahS
 Share

Recommended Posts

 

AuPad

 

This is a notepad program written entirely in AutoIt. It has all the basics of notepad that you would expect. This is NOT feature complete, yet.

I have included the source code for your pleasure, and feel free to give me pointers if you'd like to help out development (This is all done

with AutoIt version 3.3.14.0) If you use any code from this, please leave a comment or something linking to this post, thank you.

 

run the install to put the AuPad.exe and AuPad.ico in the program files directory under AuPad.

Also, the install puts the RESH.au3 (all thanks to Beege) UDFs into your include folder for you.

 

Included in the .zip: Install.exe, Install.au3, AuPad.au3, AuPad.exe,

aupad.ico, uninstall.au3, Uninstall.exe, and RESH.au3

 

Current Version: 1.9.5

AuPad V1.9.5.zip

 

## Latest Update ##

---==== 1.9.5 ====---

- Fixed crash when selecting AutoIt Help

- Set version number as 1.9.5

- Updated version history

 
Current Features:

File - New, Open, Save, Save As, Exit, Print

Edit - Undo, Cut, Copy, Paste, Del, Find, Replace, Select All, Tab, Time/Date, Word Count, Line Count, Uppercase Text, Lowercase Text

Format - Word Wrap, Font, Font Color, Background Color

Help - About

---Rich Edit (picture support), Au3 Syntax Highlighting, Drag & Drop support, open any file type, Grey certain menu items if there is txt or sel, print by line support---

Compile scripts, Forum Tags, version history, web search, au3 helpfile search, text to speech, recent files, Syntax highlighting for au3 when opened

Custom Context Menu for Rich Edit and Status Bar

 

Version History:

---==== 1.0.0 ====---

- Basic file features (open, new, save, save as, print, exit, )

- Basic edit features (undo, cut, copy, paste, find, replace, delete, select all, time/date)

- Basic format features (word wrap, font)

- Basic help features (help, about)

 

---==== 1.5.0 ====---

- Took out extra save dialog in the Save() function.

- Drag and drop functionality added (thanks to AZJIO)

- Took out check for txt file when opening

- Fixed open function to delete text already in control and ask to save

- Added $ws_ex_composite to stop flicker on xp machines.

- Added default font

- Set the font in the setWW() function

- added word count functionality with a accelerator key

 

---==== 1.5.1 ====---

- Fixed word count function

- Added line count thanks to DreamVB

- Added uppercase and lowercase thanks to DreamVB

 

---==== 1.6.0 ====---

- Added better text limit

- Fixed the edit control to show the horizontal scrollbar

- Made resizing of the edit control AUTO; making the menu AUTO, instead of just 5 pixel height

- Changed any file over 100 MB to read in as binary

- Changed any file dragged and dropped to read in as binary if over 100 MB in size

- Added accelerator keys for uppercase, lowercase and save as

- Took out unnecarry MsgBox in save function

- Added print by line support

- Added ini file for settings saved

- Added setting in ini for word wrap

 

---==== 1.7.0 ====---

- Added cancel button when quitting

- Took out extra include

- Set default font into font variables

- Set default font when word wrap has been selected

- Set default font when taking off word wrap

- Added RTF files and All files to save dialog

- Added redo functionality

- added character attribute functionality for rich edit

- added rtf files to the open file dialog

- Added color support

- Added picture support

- Added background color support

- Added stream rtf from file support

- Added stream rtf to file support

- Added recent files to menu item

- Added AutoIt syntax highlighting; thanks goes to Beege for RESH UDF

- Took out word wrap function and menu item as RichEdit is word wrapped already

- Took out ini for the word wrap, but want to be very portable anyway

- Added check for character attributes change

- Added au3 file type for open and save dialog boxes

 

---==== 1.8.0 ====---

- Fixed upper, lower, tab

- Fixed resizing of window and rich edit control

- Fixed recent files

- Fixed time/date at cursor position

- Fixed RESH.au3 comment block functionality (added check in Do..While loop & added -1 to Ubound call)

 

---==== 1.8.2 ====---

- Took out HotkeySets and made GUI accelerator keys (F2 (about), F5 (time/date))

- Fixed Au3 syntax highlighting setting caret position

- Added cancel to New file dialog

- Switched to ASM RESH UDF by Beege (thanks!)

- Added check when Syntax Highlighting to not highlight if there has not been any more user interaction. Cutting down a ton of processing.

- Added check for quotes, due to problem with RESH - It will crash the entire program when trying to syntax highlight an unterminated quote.

- Commented out Addrecent as problems with messageloop and GUI dummy

- F2 was fixed to bring up help instead of about AuPad.

 

---==== 1.8.4 ====---

- added version developed in the about child window

- added tags quote, link, autoit (code). (all thanks for the Idea from The Saint's webpad -

- added GUI Accelerator keys for tags.

- added compiler GUI.

- added ability to compile au3 scripts.

- ability to open aut2exe for more options.

 

---==== 1.8.6 ====---

- fixed tag labels to show gui accelerator keys.

- fixed add recent function.

- ability to open recent files in recent files menu.

- Added text to speech ability (idea from betapad - http://www.autoitscript.com/forum/topic/38353-betapad/

- added menu item for text to speech

- accel key added for text to speech and web search

- added child gui for web search

- fixed tag accelerator keys to ctrl + shft combo.

- added ability to search web using 4 search providers in seperate gui.

- added accelerator keys for web search GUI.

- fixed version number in directives.

- added version history gui.

 

---==== 1.8.8 ====---

- took off $ES_READONLY style on version history edit control.

- fixed view about aupad event. When opening it would call folderpath() in a loop, making it unable to close.

 

---==== 1.9.0 ====---

- added ability to highlight, then websearch the selected text.

- Took out printing UDF by martin

- Took out x86 force directive. Can now be used as x64.

- ability to open AutoIt helpfile.

- ability to highlight and search the AutoIt helpfile with keyword.

- changed _guictrlrichedit_setsel() hide sel to false, instead of true, as it would hide the selection after changing the highlighting.

- printing will print to default printer only. Trying to make more portable, which will exclude print dll and library now. Changing of printer is in the works.

- took out debugging code from last version to fix folderpath() loop.

 

---==== 1.9.1 ====---

- added default style to web search button. - idea by mLipok.

- deleted the child window for web search on successfully opening IE.

- added abillity to open au3 file and have syntax highlighting start automatically. - idea by mLipok.

- added tooltip to show when syntax highlighting for AutoIt has started or ended.

 

---==== 1.9.2 ====---
- added default style to version history "okay" button (un-highlights edit text).
- added dpi awareness to about AuPad GUI. Thanks to mLipok -http://www.autoitscript.com/forum/topic/166479-writing-dpi-awareness-app-workaround/
- added context menu with much thanks to Mat -
- state changing for context menu, just like regular menu items.
- events with context menu use GUI accelerators.
 

---==== 1.9.3 ====---

- Fixed version number in directives
- Used Jefrey's code to cut back aChild function and event loop -
https://www.autoitscript.com/forum/topic/164383-aupad-notepad-in-autoit-updated-march-31th-2015/?do=findComment&comment=1255986
- Added status bar feature to add box at bottom of AuPad window.
- Added checked state to menu item for status bar to show if it is working.
- Added line and column number to status bar.
- Fixed problem with RESH adding lines unintentially during syntax highlighting.
- Added V1.9.3 version history.

 

---==== 1.9.4 ====---

- Fixed text to speech w/ new AutoIt 3.3.14.0 update.
- Fixed version history text.
- Added V1.9.4 version history.

Working on:

find next, page setup, log support, PDFCreator (depending on ease of use)

---==== 1.9.5 ====---

- Fixed crash when selecting AutoIt Help
- Set version number as 1.9.5
- Updated version history

 

If you would like to see any older versions feel free to ask and I will be happy to release them to whomever.

Edited by MikahS
New Version

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Thank you DreamVB!

Glad it will help you out :D

No problem, this was fun ;)

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Good script.

mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Good script.

Thanks mLipok! :D

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

If the string is longer, then you need to do horizontal scrolling

Hmm. Do you mean this for word wrap? I'm sorry I did not quite understand what you meant :sweating:

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

MikahS

Maybe for you it will be interesting to

'?do=embed' frameborder='0' data-embedContent>>

Thank you for sharing this with me, I will say very nice AZJIO! :)

I think the only thing that you haven't done was the word wrap, which you can easily take from mine. ;)

EDIT: And the printing support

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Update! Big thanks to AZJIO for many ideas and concepts

---==== 1.5.0 ====---
- Took out extra save dialog in the Save() function.
- Drag and drop functionality added (thanks to AZJIO)
- Took out check for txt file when opening
- Fixed open function to delete text already in control and ask to save
- Added $ws_ex_composite to stop flicker on xp machines.
- Added default font
- Set the font in the setWW() function
- added word count functionality with a accelerator key

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Thanks for the cool update I really like this editor and I started to use it instead of Notepad Keep up the good work.

Also seems everyone else has give you ideas If you do not mind I like to also add some.

1. Auto Indent text

2. Inset file this be cool in the edit menu

3. You got word count how about Line Count.

4. Goto options.

5. Options in edit menu to uppercase lowercase, invert case.

6. How about a tools menu, that can use something like INI files to be able to allow uses to add compilers to compile there code.

Here an example of the INI  say for a plug in like C#

[Plugin]

Caption=C# Compiler

CommandLine=<Path To Compiler>

ShowStdResults=1

 

 
 
anyway I hope I give you some ideas.

On Error Resume Pulling Hair Out.

Link to comment
Share on other sites

---==== 1.5.1 ====---
- Fixed word count function
- Added line count thanks to DreamVB
- Added uppercase and lowercase thanks to DreamVB

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

MikahS

word wrap? not "word wrap" = +$WS_HSCROLL

I've been trying to figure out how to do it without restarting

 

Using the "Tab" I add indent. Select multiple rows and check the operation of these items

DreamVB

uppercase lowercase

For these operations, I use an external application that works with any object (TextCorrection). Edited by AZJIO
Link to comment
Share on other sites

MikahS

word wrap? not "word wrap" = +$WS_HSCROLL

I've been trying to figure out how to do it without restarting

 

Not sure what you mean.  :geek:  I do have Word Wrap in my script, and it does work correctly with horizontal scrolling.

You'll have to actually remake the Edit Control with hscroll style and when you turn it off you'll need to remake it again.

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

MikahS

where? (I few times switched)

WinXP.

 

I will look at this on an XP machine when I get to the office, thank you for letting me know. ^_^

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

I have not tested it with any file of that magnitude, so I cannot give a definitive answer. :(

I will try to look around for a file of a large size and test it, but if you would like to do the same I would appreciate it greatly. :D

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

MikahS

where? (I few times switched)

99420f3cad91t.jpg

WinXP.

 

I will look at this on an XP machine when I get to the office, thank you for letting me know. ^_^

 

Okay, I tested this on a WinXP with SP 3 and it works perfectly, so I'm not sure how you are having trouble switching. Are you sure you are going into Format -> Word Wrap?

Here is a screenshot of the test that worked:

post-86910-0-15106700-1411398601_thumb.p

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

how good can it handle large files of > 100 gigabyte?

 

I just tested the time it took for the windows notepad to open a 159mb file and my AuPad as well.

Notepad took 5 minutes and 58 seconds to open it, and it came up with this:

Had word wrap on. Notepad took 47 seconds to open it, but still came up with the incorrect characters as seen in the screenshot below:

post-86910-0-70302200-1411401179_thumb.p

AuPad tried to open the same file and took 32 seconds and came up with the text in its entirety:

post-86910-0-84111500-1411401361_thumb.p

I'm pretty sure it is safe to say AuPad handled this task better. :)

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...