Welcome Guest.   Make a donation to an author on the site August 01, 2014, 04:54:45 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2014! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: Headed List Builder  (Read 2128 times)
thancock20
Supporting Member
**
Posts: 33

View Profile Give some DonationCredits to this forum member
« on: January 16, 2012, 09:52:18 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.
Logged
rjbull
Charter Member
***
Posts: 2,737

View Profile Give some DonationCredits to this forum member
« Reply #1 on: January 16, 2012, 10:14:10 AM »

You might get quite a way with mouser's program Clipboard Help+Spell, using its permanent clips, groups and favourites.
Logged
thancock20
Supporting Member
**
Posts: 33

View Profile Give some DonationCredits to this forum member
« Reply #2 on: January 16, 2012, 10:28:41 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.
Logged
rjbull
Charter Member
***
Posts: 2,737

View Profile Give some DonationCredits to this forum member
« Reply #3 on: January 16, 2012, 03:13:39 PM »

From ClipMate's Help file:
Quote
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.
Logged
Ath
Supporting Member
**
Posts: 2,186



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: January 16, 2012, 03:52:16 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 cheesy
Logged

AndyM
Charter Member
***
Posts: 615


see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #5 on: January 16, 2012, 04:09:52 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?
Logged
Target
Honorary Member
**
Posts: 1,390



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: January 16, 2012, 05:08:24 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?

Logged

"Look wise, say nothing, and grunt. Speech was given to conceal thought" - Sir William Osler
thancock20
Supporting Member
**
Posts: 33

View Profile Give some DonationCredits to this forum member
« Reply #7 on: January 16, 2012, 05:51:32 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:

Quote
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:

Quote
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:33 PM by thancock20 » Logged
thancock20
Supporting Member
**
Posts: 33

View Profile Give some DonationCredits to this forum member
« Reply #8 on: January 17, 2012, 12:01:37 AM »

Believe it or not, I solved this myself:



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.

* ListBuilder.rar (318.68 KB - downloaded 119 times.)
« Last Edit: January 17, 2012, 12:16:11 AM by thancock20 » Logged
Ath
Supporting Member
**
Posts: 2,186



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: January 17, 2012, 01:26:15 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 cheesy
Logged

thancock20
Supporting Member
**
Posts: 33

View Profile Give some DonationCredits to this forum member
« Reply #10 on: January 17, 2012, 03:02:58 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.

* ListBuilder1.1.rar (318.74 KB - downloaded 112 times.)
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.04s | Server load: 0.05 ]