Welcome Guest.   Make a donation to an author on the site November 23, 2014, 07:24:11 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.
 
Check out and download the GOE 2007 Freeware Challenge productivity tools.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: 3 Feature Ideas  (Read 6514 times)
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: December 17, 2011, 02:38:46 PM »

I just finished watching the 3 screencasts, and I'm even more impressed with this program than before.

Ways that I could see CHS improved, that would also allow me to remove other programs from my system:

1) Text aliases i.e. shortcuts with a trigger that are then replaced by e.g. a much longer block of text.

I currently use Lifehacker's free Texter program for this and it works fine. But they way I look at, the expansions are just text blocks that I've copied like anything else in CHS, and want to be able to recycle quickly because I reuse them often.

Currently you can hack this with favorites but that requires mouse-clicking, while Texter let's me do this with just a few keystrokes.

2) Full-on key logging

Not for nefarious purposes, of course. I'm just tired of losing work because a program crashed and there was no autosave or I forgot to save regularly (which I shouldn't have to do). Yes, keylogging captures backspaces/deletions/etc., but I'd still rather reconstruct work from semi-jumbled text than have to try and recall everything from rote at a moment of extreme frustration.

And to avoid it being used for nefarious purposes, you could add in safeguards such as the captured text not being saved beyond the current session, for example.

3) Shortcuts to send copied content out as a tweet, Facebook status update, etc. with optionally-active built-in url shortening capabilities when a url is included. I'd love to have a submenu in the Popup Paste Menu that would allow me to choose a destination on the fly.

Jacob
Logged

rjbull
Charter Member
***
Posts: 2,788

View Profile Give some DonationCredits to this forum member
« Reply #1 on: December 17, 2011, 03:25:17 PM »

1) Text aliases i.e. shortcuts with a trigger that are then replaced by e.g. a much longer block of text.

I currently use Lifehacker's free Texter
Text expanders have been thrashed around on DC quite a lot.  The obvious suggestion is Phrase Express, because the basic version is free-for-personal-use, or AutoText Typing Assistant by the same company, which is completely free.  I currently use Typing Assistant, which is payware.  It's easy to add shortcut blocks of text via the clipboard.

2) Full-on key logging
This would almost certainly cause CHS to be flagged as malware.  If you'd like recommendations for free-standing ones, review this DC thread: pls recommend a good benign keylogger.  Keylogging is built into PowerPro.
Logged
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: December 21, 2011, 04:34:38 AM »

I definitely wouldn't want CHS to be flagged as malware- good point.

4) Word count tool

I'd love to be able to know how many words there are in any copied text items listed in the Main Window, or even as an option to display that information in the Quick Paste Menu for each item that appears there.
« Last Edit: December 21, 2011, 05:50:39 AM by jshare » Logged

Ath
Supporting Member
**
Posts: 2,263



see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: December 21, 2011, 05:06:55 AM »

I definitely would want CHS to be flagged as malware- good point.

Huh huh you mean wouldn't I guess?
Logged

jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: December 21, 2011, 05:51:13 AM »

you mean wouldn't I guess?

Doh! Good catch, I fixed it
Logged

ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #5 on: December 21, 2011, 08:15:33 AM »

4) Word count tool

I'd love to be able to know how many words there are in any copied text items listed in the Main Window, or even as an option to display that information in the Quick Paste Menu for each item that appears there.

Below is an initial attempt at an LBA script to report line and word count for the current selection -- the result comes up as a dialog box so it doesn't match the request exactly.

Formatted for Autohotkey with the GeSHI Syntax Highlighter [copy or print]
  1. ChangeText(InputText)
  2. {
  3.  Lines := []
  4.  Pattern := "mO)^(.*)$"
  5.  Start := 1
  6.  LineCnt := 0
  7.  While (True)
  8.  {
  9.    FoundPos := RegExMatch(InputText, Pattern, mObj, Start)
  10.    If (ErrorLevel != 0)
  11.    {
  12.      OutputDebug, % "RegExMatch ErrorLevel: " . ErrorLevel
  13.      SoundBeep
  14.      Return
  15.    }
  16.    If (FoundPos == 0)
  17.    {
  18.      Break
  19.    }
  20.    Start := FoundPos + 1
  21.    Lines.Insert(mObj[1])
  22.    LineCnt := LineCnt + 1
  23.  }
  24.  WordCnt := 0
  25.  WordPattern := "\b\w+"
  26.  Loop, % LineCnt
  27.  {
  28.    Line := Lines[A_Index]
  29.    Start := 1
  30.    While (True)
  31.    {
  32.      FoundPos := RegExMatch(Line, WordPattern, mObj, Start)
  33.      If (ErrorLevel != 0)
  34.      {
  35.        OutputDebug, % "RegExMatch ErrorLevel (2nd call): " . ErrorLevel
  36.        SoundBeep
  37.        Return
  38.      }
  39.      If (FoundPos == 0)
  40.      {
  41.        Break
  42.      }
  43.      Start := FoundPos + 1
  44.      WordCnt := WordCnt + 1
  45.    }
  46.  }
  47.  MsgBox, % "Counted:`n`n"
  48.          . "  " . LineCnt . " line(s)`n`n"
  49.          . "  " . WordCnt . " word(s)"
  50. }
Logged
rjbull
Charter Member
***
Posts: 2,788

View Profile Give some DonationCredits to this forum member
« Reply #6 on: December 21, 2011, 04:55:23 PM »

4) Word count tool

Character count is - sort of, I think - already built in.  You have to edit the columns you want shown, check the DataSize one, and make sure it shows up in the grid.  See screenshot.  I'm only guessing that DataSize equates directly to character count, though.  I can't see word count as such.  You could probably use an external program like unix `wc` as a Custom Script Tool, but that wouldn't give you an answer directly inside CHS.


* CHS_DataSize - 21_12_2011 , 22_50_22.png (79.95 KB, 690x495 - viewed 146 times.)
« Last Edit: December 21, 2011, 05:10:31 PM by rjbull » Logged
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: December 22, 2011, 03:12:25 AM »

Below is an initial attempt at an LBA script to report line and word count for the current selection -- the result comes up as a dialog box so it doesn't match the request exactly.

Thanks for this. I tried it and I get "Error reading output file C:\Users\X\Documents\DonationCoder\Clipboard Help+Spell\tmpout.txt after tool run: C:\Program Files (x86)\Clipboard Help+Spell\Tools\word-count.ahk with params "C:\Users\X\Documents\DonationCoder\Clipboard Help+Spell\tmpin.txt" "C:\Users\X\Documents\DonationCoder\Clipboard Help+Spell\tmpout.txt""
Logged

ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #8 on: December 22, 2011, 03:26:25 AM »

If you don't mind, would you provide more details on how you configured LBA and the steps you performed that resulted in the error?
Logged
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: December 22, 2011, 01:33:21 PM »

If you don't mind, would you provide more details on how you configured LBA and the steps you performed that resulted in the error?

Sorry, I had completely ignored the part about LBA. I thought that installing Autohotkey was enough. Now that LBA is setup, I added your script properly and it works. Although I would prefer a result in the Quick Paste Menu, this is definitely a big help already.

Thanks much!
Logged

ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #10 on: December 22, 2011, 05:07:11 PM »

I thought that installing Autohotkey was enough. Now that LBA is setup, I added your script properly and it works.

Glad to hear it seems to be working!  I hope the counting is implemented correctly -- I tested a few cases, but please let me know if you find problems.

BTW, installation of AutoHotkey is not necessary -- LBA comes with all necessary pieces (thanks to the AHK folks).

Quote
Although I would prefer a result in the Quick Paste Menu, this is definitely a big help already.

If someone can convince mouser of a way for external coders to extend CHS in other appropriate ways, may be there would be something us non-mousers could do Wink
Logged
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: December 23, 2011, 03:26:58 AM »

BTW, installation of AutoHotkey is not necessary

Cool, just uninstalled it.

Regarding the counting- here's a test using this blog post of mine:

  • Your script on it: 101 lines, 857 words
  • Pasted into Word: 99 lines, 821 words
  • Wordpress: 808 words

I'm not so concerned about the line count, it looks like your script is impacted by the width of the window.
Logged

ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #12 on: December 23, 2011, 03:46:39 AM »

Thanks for the test data smiley

Would you mind sharing which words you started and ended on in making your selection so I can do some testing here?
Logged
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: December 23, 2011, 03:57:33 AM »

Sure. I actually meant to do that but then forgot as I was compiling the information.

My selection started from the first line "Why you might..." and ended with my signature of "--Jacob Share". One important thing is that when you copy-paste anything from my site, a link back to the site is automatically appended to the pasted text, so you'll need to delete that and the whitespace before it for your results to be consistent.
Logged

ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #14 on: December 23, 2011, 05:43:11 AM »

Thanks for the further details and warning.  Hope to take a look soon.
Logged
ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #15 on: December 23, 2011, 07:41:44 PM »

Doing some investigation on what "word count" means...upon reflection it seems clear that there may be different definitions.  Though not conclusive, the following tests with online word counters perhaps indicate bugs, multiple interpretations, and/or duplication.


By the way, when I trid the script posted earlier to this thread, the result I saw was different from your report -- here I saw 842 words in 101 lines.  I did this test by copying the text to a text editor, editing it (based on your warning of the extra text at the end), selecting the result, and running the script on it.

The posted script treats each contraction as two words instead of one.  From searching online it appears that this may be viewed as overcounting.  For the current case, I think that's 18 too many words.

A word with a hypen was also counted as more than one word.  I think the overcounting from that was 3 words.

If those were the only differences, then adjustments would lead to agreement with Word's total of 821 = 842 - (18 + 3).  However, with such limited testing, it seems unsafe to bet that such adjustments would lead to perfect matches for all / most other cases.
Logged
ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #16 on: December 23, 2011, 08:16:06 PM »

It appears that depending on what web browser is used, what gets included in one's selection may differ.

My initial tests were with Chrome 14.0.x.  Using FF 8.0.1, I see:

Quote
interests-resume-cartoon

included in the selection, whereas there does not appear to be anything comparable when selecting with Chrome.
Logged
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #17 on: December 24, 2011, 11:32:10 AM »

Thanks for diving in to this.

Personally, as a WordPress blogger, the count that interests me most is that one but even one that is less than 5% different is fine.

Also, could you add a character count too? Useful for us Twitter users who are limited to 140 characters per message.
Logged

ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #18 on: December 25, 2011, 09:19:32 PM »

I'm pretty ignorant about WordPress -- do you know if the word counting feature you use is part of the basic functionality of WordPress or if it's some kind of plugin?  Perhaps there is some documentation or  source code that can be consulted -- but to dig any of that up, it might help to have an idea of where to look first smiley

Regarding character count, some basic functionality seems doable, but I don't know how much work it might be to try to conform to:

  https://dev.twitter.com/docs/counting-characters
Logged
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: December 26, 2011, 02:06:14 AM »

For WordPress: this is the Trac ticket where Word Count was implemented.

For Twitter: whatever functionality you decide to implement, just try to make it so the official Twitter count is always less than your count. That way, if your count is 140 or less, I know for sure that I won't need to edit the tweet again because Twitter's count will never be higher.
Logged

ewemoa
Honorary Member
**
Posts: 2,490



View Profile Give some DonationCredits to this forum member
« Reply #20 on: December 26, 2011, 06:19:51 AM »

Thanks for the WordPress-related link.  

Looking at:

  http://core.trac.wordpress.org/attachment/ticket/4807/word-count3.2.patch

some relevant bits appear to be:

Formatted for Javascript with the GeSHI Syntax Highlighter [copy or print]
  1.       tx = tx.replace( /[0-9.(),;:!?%#$¿'"_+=\\/-]*/g, '' );
  2.        tx.replace( /\S\s+/g, function(){tc++;} );


A brief glance suggests that after dropping characters from a certain set, a count is made of sequences of a non-space character followed by one of more space characters.

My current testing code takes a vaguely similar approach of trying to drop certain characters before attempting a count of modified text.

I'm having difficulty getting things to work out at the moment and it seems to have to do with the use of instances of the UTF-8 "RIGHT SINGLE QUOTATION MARK" that appear to be in your posts (e.g. see the word "don't" in the first sentence of the sample selection).  I'm not confident yet what the difficulty I am experiencing is, but it may have to do with Clipboard Help and Spell not being Unicode aware:

  https://www.donationcoder.com/forum/index.php?topic=24979.msg250346#msg250346
Logged
jshare
Supporting Member
**
Posts: 40


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #21 on: December 26, 2011, 09:53:16 AM »

Doh! Well I don't expect you to compensate for the lack of UTF-8. Maybe Mouser's planning on making CHS UTF-8 aware and we can revisit this then.
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.071s | Server load: 0.47 ]