topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday April 18, 2024, 10:15 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Headed List Builder  (Read 7455 times)

thancock20

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
IDEA: Headed List Builder
« on: January 16, 2012, 09:52 AM »
I have a repetitive task everyday, where I have to go through a lot of documents grabbing information. Then the information gets put into an email along with headers (that are usually the same ones day after day), and sent out. I've been using Notepad++ (and a lot of copying, pasting, and typing) for this, but I came up with an idea for a small program that would actually help streamline the task quite a bit. I tried to come up with as detailed a description of it as I could:

I. The GUI

    A. Textbox - The main part of the GUI should be a simple textbox. It should allow for typing, copying, pasting, etc. but no special formatting options or anything are needed. (Unicode support for the whole program would be a big plus though as it is possible I'll need to use this with Japanese text at some point.)

    B. Above the textbox.
        1. A persistent dropdown list for headers. (This should initially be empty when the program is first run).
        2. A button to add whatever is selected in the textbox to the dropdown list.
        3. A button to paste the selected header from the dropdown list at the cursor position in the textbox.
        4. A button to delete the currently selected header from the dropdown list.
        5. Not necessary at this point, but a way to switch header lists for different projects would probably be a good idea.

    C. Below the textbox.
        1. A button to clear the contents of the textbox. (Should confirm first, in case of accidental clicks).

II. Global Hotkeys - The program should set the following global hotkeys while it is running.

    A. Win+Ctrl+C - Copy selected text from active program, and paste at the cursor position in the textbox.
    B. Win+Ctrl+V - Paste entire contents of the textbox at the cursor position of the active program.

I think someone who is more adept than I am at AutoHotkey would probably be able to code this without too much of a problem.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #1 on: January 16, 2012, 10:14 AM »
You might get quite a way with mouser's program Clipboard Help+Spell, using its permanent clips, groups and favourites.

thancock20

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #2 on: January 16, 2012, 10:28 AM »
Thank you for the reply rjbull. I am aware of Clipboard Help+Spell, however:

1. I think it would be overkill for this particular project.
2. I can't really use it as a clipboard extender because (if I recall correctly), it lacks support for Japanese.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #3 on: January 16, 2012, 03:13 PM »
From ClipMate's Help file:
ClipMate does not use Unicode for its interface, so any text data that you see in ClipMate is "ansi text". However, ClipMate can accept "Unicode Text" from the clipboard, and then translate it into Ansi Text, using the codepage of the Unicode.  If you select a useful font/script combination for display, it should look fine in ClipMate.

Normally, ClipMate will capture Ansi Text from the clipboard, and display it. This works fine for most cases, if your windows local language is set correctly. However, if you work with other languages, you may need to tell windows to use a particular language for non-unicode programs.

ClipMate has a Unicode-To-Ansi function which will create an Ansi Text version of a clip based on its Unicode component, providing that you captured the clip with Unicode, which is controlled by the Application Profile.  There are two ways to do this:

* Use the Unicode To Ansi menu option under the Edit menu

* Turn off "TEXT" in the application profile for any given program, and turn on UNICODE TEXT. When ClipMate captures a clip that has Unicode Text but no Ansi Text, it'll call the Unicode To Ansi routine automatically.

Unicode To Ansi can work with the following code pages:

*     932,  Hiragana

*     932,  Katakana

But ClipMate's even more overkill, and payware to boot.

Another thought: I used to have something like your "B" group of requirements with PowerPro.  It was set so that whenever I used TED Notepad to edit a particular file, PowerPro put a couple of buttons on TED Notepad's title bar.  Clicking them dropped down menus of short boiler-plate text snippets.  That worked well, and PowerPro is free, though configuring it is not for the faint-hearted.  As for editors, I don't know much about Notepad++, but EmEditor is famous for excellent Unicode support.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #4 on: January 16, 2012, 03:52 PM »
Hm, sounds like mouser's Form Letter Machine could be able to do this, with one minus: No unicode support :huh:. But if it fits, then maybe we can persuade him to to upgrade it to unicode :D

AndyM

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 616
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #5 on: January 16, 2012, 04:09 PM »
I'm not volunteering, but I think this could be done in Word with VBA and could work pretty much as envisioned.  I think Word has some unicode support, but Japanese?

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #6 on: January 16, 2012, 05:08 PM »
what is the format of the output, eg is it columnar, or is it in blocks?

if it's columnar, will they be comma/tab separated, or some other schema?


thancock20

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #7 on: January 16, 2012, 05:51 PM »
Thanks for all the replies.

@rjbull: Yeah, clipmate is definitely overkill. I may look into the PowerPro idea if I can find the time before anyone comes up with anything else. Notepad++ works just fine with Unicode. I could use a toolbar designed to work with N++ if I need to, but part of the annoyance is opening a new text file and then specifically having to tell N++ not to save it. With the idea I came up with, the textbox wouldn't try to save it, since it's designed to just be an intermediary. Also, I would still need to setup the global hotkeys through AutoHotkey or something similar. So, I would probably be better off doing the GUI part under AutoHotkey as well.

@ath: Form Letter Machine could probably be configured to give me a list of headers, but it doesn't look like it would do the text capturing that I need.

@AndyM: I'd like to try avoiding MS Word for this if I can.

@Target:The idea of using the textbox and pasting the info into it is so that I can format it as needed in the box, but basically it would look like this:

Header 1:

Clip Text 1
Clip Text 2


Header 2:

Clip Text 3
Clip Text 4
etc.

The reason I thought leaving the formatting free and pasting the headers in is because sometimes multiple headers are used for one clip text like this:

Header 1 & Header 2:

Clip Text 5

Also, I don't get the all the clip texts for the same heading at the same time, so after getting up to Header 5 or so I may need to go back and add a clip text under Header 2.
« Last Edit: January 16, 2012, 06:09 PM by thancock20 »

thancock20

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #8 on: January 17, 2012, 12:01 AM »
Believe it or not, I solved this myself:

ListBuilder.gif

I downloaded a GUI creator from the forums at AutoHotkey.com, and just kept looking through the Help files to figure out the rest. It works exactly like my specs in the first post except for:

       5. Not necessary at this point, but a way to switch header lists for different projects would probably be a good idea.

I don't imagine that'll be too hard at some point, though.

Oh, and the hotkeys are Alt+Ctrl+C and Alt+Ctrl+V because the Win key was interfering with some other software on my system.

The Editbox (apparently I was misnaming it as a textbox earlier) and the Drop Down List both work with Japanese text as well. The contents of the drop down list are saved in a Headers.txt file, so it is persistent between runs. I even added an Autosave feature, in case something crashes while I'm working. The Clear button also deletes the Autosave.txt file, and if the file exists when the program is started it is automatically loaded into the Editbox.

I don't know if anyone else would have much use for the program, but I'll post it here anyway. It's only tested on Windows XP SP3 32 bit, because that's what I have. Also, the application is completely portable.

(That TitleBar is part of my Windows Theme, by the way)

Edit: I just swapped out the file, but just to remove the .exe from the name in the TitleBar.
« Last Edit: January 17, 2012, 12:16 AM by thancock20 »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #9 on: January 17, 2012, 01:26 AM »
and just kept looking through the Help files to figure out the rest.
You've got my respect, by solving your own Coding Snack request. :Thmbsup: :Thmbsup: :Thmbsup:

I don't know if anyone else would have much use for the program, but I'll post it here anyway.
Expect some takers, this select&paste&moderate stuff is often discussed here :D

thancock20

  • Supporting Member
  • Joined in 2009
  • **
  • default avatar
  • Posts: 36
    • View Profile
    • Donate to Member
Re: IDEA: Headed List Builder
« Reply #10 on: January 17, 2012, 03:02 AM »
^ Thanks, I appreciate it.

And I'm already releasing a version 1.1, because there were some bugs. Specifically

- If the Add button was pushed while nothing in the Edit Box was selected, whatever was in the clipboard would be added to the Header list.
- If the Alt+Ctrl+C hotkey was used while nothing was selected anywhere, whatever was in the clipboard would be added to the Edit Box.

I added error handling to both of those routines. Now if nothing is selected, nothing will happen. I also made it to where those - as well as the Alt+Ctrl+V hotkey - will now leave the contents of the clipboard intact.