topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday November 8, 2024, 9:15 pm
  • 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

Last post Author Topic: NANY 2010 Release: ClipTrap  (Read 138783 times)

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 563
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #75 on: July 14, 2012, 03:01 PM »
Skwire,  It happened again, and this time, I did some testing and narrowed it down to the point where I can successively reproduce the failure.

The GUI is fine as long as it is running, but if there are too many characters in clip.txt when ClipTrap starts up, the GUI fails to load completely - the application starts, and it still captures, but GUI doesn't function right.  (I have some screenshots I can email to you if you like).

So, to reproduce the GUI failure, close ClipTrap, create an empty clip.txt file, and paste "some string in this here line" (without the quotes) till you have 14922 lines of that phrase.  ClipTrap will start okay with this.  Now close ClipTrap and add one more line to the clip.txt.  When you restart ClipTrap, the error should happen. 

Now, I don't think it has to do with the number of lines - that is, the number of carriage return/line feeds.  Because, if you take those 14922 lines + 1 and join them so that you only have one line, ClipTrap will start okay - but if you duplicate that really long line so that you have two lines, ClipTrap *won't* start.

So, it is just the GUI that has issues when it starts.  If it is already started, you can have millions of lines in your clip.text and it is okay.

Anyway, there are a few ideas to play around with.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #76 on: July 14, 2012, 06:30 PM »
Skwire,  It happened again, and this time, I did some testing and narrowed it down to the point where I can successively reproduce the failure.

Awesome.  Thanks for taking the time to figure this out.  I think I've worked around the issue in this build.  Please try it out and let me know.  Thanks.

Website | Download
v1.1.2 - 2012-07-14
    ! Worked around an issue when attempting to load a large amount of
      saved text when ClipTrap starts.  (Thanks, BGM)

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #77 on: August 14, 2012, 05:50 PM »
Enhancement Request:

Add button in top region, "Send All To Text File, Clear Window Text, Then Exit."

Window pops up asking for name of file.

Presto, all done.


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #78 on: August 14, 2012, 06:29 PM »
I can add a Save button but that's all it will do, offer to save the contents as a file.  Clear Window Text and Exit are already handled.  In other words, I like to keep things abstract.  Cool?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #79 on: August 14, 2012, 06:36 PM »
The key is to make it as easy as possible to get ClipTrap contents into a file, and to exit.

In and out.  Job accomplished.

Preferably in the .ini file you can keep track of the preferred path in which to save the file.  Maybe even a default file name.

Very cool.


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #80 on: August 14, 2012, 07:34 PM »
The key is to make it as easy as possible to get ClipTrap contents into a file, and to exit.

Oh, I understand the reason but keep in mind that I like to keep things somewhat standard when it comes to user interfaces.  One button that does three actions like that isn't very standard.

Preferably in the .ini file you can keep track of the preferred path in which to save the file.  Maybe even a default file name.

I'll make it remember the last used path.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #81 on: August 14, 2012, 07:41 PM »
Just a thought, then:

"Execute Default Script" button.

Perhaps user has the opportunity to put a number of sequential steps into the .ini file.

That way it can be a custom-made thing, because different users probably would want to be able to rapidly do different things.


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #82 on: August 14, 2012, 09:46 PM »
Here you go, Nick.

Website | Download
v1.1.3 - 2012-08-14
    + Added "Save text as..." functionality via the toolbar, File menu, or Ctrl+S hotkey.  (Thanks, nkormanik)

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #83 on: August 15, 2012, 01:12 AM »

Really nice addition to a terrific program, Skwire.  Thank you!

Makes getting copied content safely saved away into a text file so much faster.

Glad you decided to have ClipTrap remember the last directory where things are saved, and use that as default presently.  No need to fiddle around searching for the right place.


nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #84 on: August 15, 2012, 06:16 PM »

Just my own personal opinion, but...

I think the "Save text" feature is so important that it warrants a larger button, same size as the "Scroll to top" and "Scroll to bottom" buttons.  With text.  And I think it should be placed to the right of "Append clips to..."

You know me -- always wanting more.



nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #85 on: August 22, 2012, 07:13 PM »

In addition to the previous suggestion, here's another:

To the right of the nice large "Save text" button..., add "Append text"

When user clicks on "Append text" button, a little window comes up remembering last saved location AND the last used file name.  Last used File name is populating the proper space where file name usually goes.

Click okay, and presto, window contents are appended to that file.

Clear the ClipTrap window, exit, all done.



nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #86 on: August 22, 2012, 09:02 PM »

At the very least, have ClipTrap remember the previously used file name.


nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #87 on: August 23, 2012, 04:05 PM »

By the way, I've noticed that when ClipTrap saves text to a file..., there is some added semi-invisible code at the very beginning of the created file.  Said code prevents a regular text editor from editing the text file.

In a more powerful text editor this is how the code appears:



Somehow it would be best to prevent that code from making it into the newly created text file.

Thanks!



skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #88 on: August 23, 2012, 04:58 PM »
In a more powerful text editor this is how the code appears:



Somehow it would be best to prevent that code from making it into the newly created text file.

That is the UTF-8 Byte Order Mark.  ClipTrap supports Unicode and writes to UTF-8 format.  Lesser editors that do not support UTF-8 may have trouble with opening these files (as you have seen).  I don't believe I can change this behaviour in AHK but I'll check.  If Unicode support is not important to you, use the ANSI version of ClipTrap (ClipTrap_ANSI.exe) instead.  It does not write in UTF-8 format (and doesn't support Unicode).
« Last Edit: August 23, 2012, 08:40 PM by skwire »

Cattleya

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #89 on: October 22, 2012, 04:32 AM »
Can you share me the software source code, many thanks! :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #90 on: October 22, 2012, 08:27 AM »
Hi, Cattleya, and welcome to the DonationCoder site.  My software is freeware but it's not open source.  Was there a particular feature you'd like to see added to ClipTrap?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #91 on: October 24, 2012, 06:50 PM »

Enhancement Request:

Skwire, please allow for the inclusion of default name in the "Save text as" box.

Have the name automatically populate the box.

Best if user can pre-select it, and that pre-selection saved in the .ini configurations file.

But, if not, then something like "ClipTrapped.txt."

Thanks!


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #92 on: October 24, 2012, 09:35 PM »
Website | Download
v1.1.4 - 2012-10-24
    + Last used filename is now saved.  (Thanks, nkormanik)
    * No longer writes the Unicode BOM to files.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #93 on: October 24, 2012, 11:25 PM »
Thanks, as always, Skwire.

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #94 on: October 25, 2012, 12:38 AM »

Further request:

Upon save, if file exists, offer to append or replace, with default being to append.

As of right now ClipTrap overwrites an existing file without any notice.  Poof.  All the previous clippings saved vanish and are substituted with a new set.  User ought to at least get a warning.

By the way, with append (to existing file), I can see the usefulness of including your "Enable timestamp tokens," which I've not thought about using before.


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #95 on: October 25, 2012, 10:43 AM »
As of right now ClipTrap overwrites an existing file without any notice.  Poof.  All the previous clippings saved vanish and are substituted with a new set.  User ought to at least get a warning.

I'm not sure what you're getting at.  If you try to save using a filename that already exists, you will get the standard "blah blah already exists.  Do you want to replace it?"  Is that not notice enough?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #96 on: October 25, 2012, 03:19 PM »
Very strange you get a warning.  I tried twice and didn't get one.

As said, ClipTrap simply silently overwrote the original, and replaced.  Poof.

How about the "Append to file" possibility?

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #97 on: October 26, 2012, 01:32 AM »
Same result on a different computer.  No warning at all.  Simply overwrote.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #98 on: October 26, 2012, 09:34 AM »
Very strange you get a warning.  I tried twice and didn't get one.
As said, ClipTrap simply silently overwrote the original, and replaced.  Poof.

I tested on both XP and W7 and it works for me.  Here's a quick screencast I made: http://skwire.dcmemb...p/sc/ClipTrap_01.swf

How about the "Append to file" possibility?

Website | Download
v1.1.5 - 2012-10-26
    + Added "Append text to..." functionality via the toolbar, File menu,
      or Ctrl+D hotkey.  (Thanks, nkormanik)

nkormanik

  • Participant
  • Joined in 2010
  • *
  • Posts: 554
    • View Profile
    • Donate to Member
Re: NANY 2010 Release: ClipTrap
« Reply #99 on: October 28, 2012, 03:40 AM »

Append works great, Skwire.  Huge and really useful addition to your Cliptrap program.  Thanks very much!

I realized the problem with overwrite....  Must include the extension with the name of the file.  Sometimes (not sure exactly when or why) all that's necessary to save a file is just the filename, and, say, .txt, is automatically added.  Well, if only filename is given, Cliptrap will overwrite the saved file that includes the extension.

So, when saving a file from Cliptrap, very important to type in the filename + the extension.  Then if such file already exists, Cliptrap will give a warning about overwriting.