Jump to content

Sending formatted text from script to clipboard


Recommended Posts

Hello,

I'm trying to create a simple GUI that helps me in properly formatting text according to the Chicago manual of style.

It gives a screen with input fields, like author, title of the book, publisher and so on. The goal is to fill in the required fields, select the output type (like a book for footnote, or an article from a magazine from a website) and then run some code to generate a ready-to-paste-in-my-thesis-string.

If you take the example of a book for a footnote, the title of the book has to be written in italic. So, my script, after pressing the process-button, creates the entire string and then has to use some way of setting the book title to italic before sending it to the clipboard.

Can that be done? Can I format text in the clipboard or do something else that's both smart and working? I've been searching on the forum, but couldn't find a conclusive answer.

Link to comment
Share on other sites

The method of marking up fonts and attributes for text differs wildly depending on what application is displaying the text. One way might be to create RichTextEdit control and format the text there before copy/paste. The RTF format produced is recognized by most other apps for import.

:blink:

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
Link to comment
Share on other sites

The method of marking up fonts and attributes for text differs wildly depending on what application is displaying the text. One way might be to create RichTextEdit control and format the text there before copy/paste. The RTF format produced is recognized by most other apps for import.

:blink:

Sounds good. I'm going to check it out, and I'll post the results. Thanks!

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

  • Recently Browsing   0 members

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