Jump to content

Recommended Posts

Posted

Hi All,

Just curious if there is a technique to center a line written with filewriteline() in text pad?

Do anyone know? I just want it written in the center of the notepad page.

filewriteline($exampleline)

Posted

Hi All,

Just curious if there is a technique to center a line written with filewriteline() in text pad?

Do anyone know? I just want it written in the center of the notepad page.

filewriteline($exampleline)

Since notepad views text as raw data you cannot do any layout on the text, except tabs and newlines (because they are chars).

Test for example writing hello in wordpad and center it, save it and then open it in notepad.

Broken link? PM me and I'll send you the file!

Posted (edited)

Just curious if there is a technique to center a line written with filewriteline() in text pad?

You can make your edit control to be the Rich edit variety using the last example at the bottom of the page in the help file under

AutoIt > Function Reference > GUI Reference > GUI Control Creation > GUICtrlCreateEdit

There is likely a way to save to .rtf format as well, using AutoIt, but it might require considerable coding. You could start out like I did - open WordPad, write a line of text, center it, save the file as .rtf, then open the file with SciTe and study the code of it.

They don't comply with the latest versions of AutoIt, but Yoan Roblet (Arcker) wrote Auto3Lib which has an include file called A3RichEdit.au3, but I didn't center a way to center text using that.

Edited by Squirrely1

Das Häschen benutzt Radar

Posted

You can make your edit control to be the Rich edit variety using the last example at the bottom of the page in the help file under

AutoIt > Function Reference > GUI Reference > GUI Control Creation > GUICtrlCreateEdit

There is likely a way to save to .rtf format as well, using AutoIt, but it might require considerable coding. You could start out like I did - open WordPad, write a line of text, center it, save the file as .rtf, then open the file with SciTe and study the code of it.

They don't comply with the latest versions of AutoIt, but Yoan Roblet (Arcker) wrote Auto3Lib which has an include file called A3RichEdit.au3, but I didn't center a way to center text using that.

Just for clarity,

PaulIA wrote the Auto3Lib library, and it was a great contribution to AutoIt. Most of that library is now included in the distribution after having been rewritten/updated by GaryFrost to make it consistent with current AutoIt conventions for naming, variable types, etc.

What arcker posted was AutoItPad. Which depends on PaulIA's Auto3Lib.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...