topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Thursday March 28, 2024, 1:04 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: CHS: New Formatting Dialog  (Read 40046 times)

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #25 on: October 13, 2011, 12:08 PM »
That works very nicely and hands stuff out for processing by an editor that has many years' worth of Rexx macros built into it.
-cranioscopical (October 10, 2011, 05:39 PM)

I'm not sure I follow you. I thought the point of this kind of tool was to avoid using the editor itself, while gaining extra benefit from scripts already written for it.  That is, instead of loading your editor, you'd run your scripts with a free-standing REXX interpreter via CHS.  Is that what you meant?

Well a couple of things...

First, my comment was intended simply to say "it works". Mouser had just enabled the ability to do that very thing and I was trying it out.

Second, I fully understand and accept your point but, for me at least, the mechanism can be used either way. Calling Rexx directly is certainly an option. For new stuff I'd probably do that and use whatever is the most suitable scripting tool. It just so happens, however, that the editor I use most has as its language a native version of Rexx (KEXX) with internal functions that aren't in standard Rexx. I could re-invent the wheel but I've used the editor for the past 30 years or so and it's now jam packed with quirky stuff that suits my workflow. Execution time is of no consequence to me; I don't process vast files, today's machines are so fast, the tasks I perform now so trivial...

Basically I'm:
  • set in my ways
  • lazy
  • uncaring these days about how something gets done, as long as it is done

 

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,199
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #26 on: October 13, 2011, 02:39 PM »
Understood now, and +1 on the last three points  :)  That's more or less why I asked for the STDIN/STDOUT alternative.

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #27 on: October 13, 2011, 03:01 PM »
That's more or less why I asked for the STDIN/STDOUT alternative.
The more access points the better  :Thmbsup:

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #28 on: October 14, 2011, 12:27 AM »
Mouser: after playing with this formatting dialog I have some comments.

1) When I click Modify Format/Case in the Main dialog it would be more intuitive (for me) to be presented a list of saved presets and apply it to the clip (with a preview box of course). You can then have buttons to Rename, Edit, Delete or Create New presets - which will then take you to your formatting screen.

2) There is currently no way to Rename/Delete a preset (1 will solve this)

3) Once in the formatting screen it is not clear which preset is loaded - it will be nice to see this (maybe in the title)

4) There is Accept and Cancel buttons - but no save button. Once (3) is implemented I would expect to have  a button that saves the loaded preset (currently you have to save as). [off topic]This drove me insane until I realised "Accept" accepts the changes to the text - not the preset[/off topic]

5) In the preset editing tree (i.e. where introduction,  add stuff etc are written - figure 2 in first post) - it may be helpful to add a checkmark to show if anything is active in that tree/tab (or make the actives bold or red or anything visual)[off topic]I actually preferred the old screen (as I could see what is on and what is off at a glance) [/off topic]

6) I would like to create a custom order of the list in (1) and this custom order should be kept for the Quick Paste option as well - I use keyboard shortcuts

7) I would like a way to perform this on a clip from the quick paste menu - though I cannot think of anyway to do it intuitively

8) I would like to have the option for user tools NOT to paste the output (my AHK example for example does not require pasting) - maybe if %outfile% does not exist (currently it gives an error).

9) I second the STDIN/STDOUT method as an option - it just seems more natural and cleaner. I would have to try and figure out how to do it in AHK though - but I am sure the forums will have something.


10) Unrelated to the formatting presets: when I use quick paste and the main window exists - the main window is activated first. This is not a big problem but it bothers me as the behaviour differs from when the main window is minimised to tray

11) Unrelated to the formatting presets: When I am in a rename mode (for example in explorer or gbCodeLib9) activating quick paste deactivates the edit/rename mode and the paste gets lost (i.e. go to explorer, select a file, press F2, Quick Paste something - filename unchanged). If there is anyway to prevent this from happening I would be extremely grateful but somehow I think that the creation of the quick paste menu will always do this.

12) Unrelated to the formatting presets: I would be grateful for some way to paste a clip with original formatting (for example, pasting bold text in MS Word as bold text)

(The last few points may have ways to do this already - and I apologise in advance for my ignorance should it be so. Also if I should move it to another thread I will do so)

Although I have a lot of comments - this does not mean that I do not find CHS useful. I do not participate in forums for software that I do not find useful, so in a sense this is a big compliment. Only been using it for a week or so and already finding it a huge timesaver.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #29 on: October 14, 2011, 06:48 AM »
It's fun to see some interest in the text modification features..

Let me try to answer some of the questions:

1) When I click Modify Format/Case in the Main dialog it would be more intuitive (for me) to be presented a list of saved presets and apply it to the clip (with a preview box of course). You can then have buttons to Rename, Edit, Delete or Create New presets - which will then take you to your formatting screen.

2) There is currently no way to Rename/Delete a preset (1 will solve this)

3) Once in the formatting screen it is not clear which preset is loaded - it will be nice to see this (maybe in the title)

4) There is Accept and Cancel buttons - but no save button. Once (3) is implemented I would expect to have  a button that saves the loaded preset (currently you have to save as). [off topic]This drove me insane until I realised "Accept" accepts the changes to the text - not the preset[/off topic]

Ok all of these are related.. let me explain:

The modification dialog can be used for two things -- first to quickly apply some custom formatting to the current text (of the current clip item).  When you just press the modification button on main window this is what you invoke.  It does *NOT* load a preset when you invoke it this way, it just uses your last settings.

So.. you could live your whole live never using saved presets -- just invoking that dialog when you want to apply some formatting and then closing it.

You can also trigger this use from the quick paste menu by selecting the last entry on the formatting submenu.

Now the other use of the dialog is to load and save presets, which are remembered settings.

Unlike some other programs, CHS wont remind you to save the changes in a preset if you load one and change some settings.  That's perhaps something i should think about improving.  But basically if you want to change a preset you load it, modify it, and then save it again.

The saved presets are just files, so if you want to delete one, share one, rename one, you can do so in your file system.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #30 on: October 14, 2011, 06:48 AM »
5) In the preset editing tree (i.e. where introduction,  add stuff etc are written - figure 2 in first post) - it may be helpful to add a checkmark to show if anything is active in that tree/tab (or make the actives bold or red or anything visual)[off topic]I actually preferred the old screen (as I could see what is on and what is off at a glance) [/off topic]

good idea, i'll see if i can do this.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #31 on: October 14, 2011, 06:49 AM »
6) I would like to create a custom order of the list in (1) and this custom order should be kept for the Quick Paste option as well - I use keyboard shortcuts

yeah i can see the value of this, i'll see what i can do but no promises.  your best bet now is to use file names to control order since the items are shown in alphanumeric order.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #32 on: October 14, 2011, 06:50 AM »
7) I would like a way to perform this on a clip from the quick paste menu - though I cannot think of anyway to do it intuitively

if you mean you want a way to apply formatting from quick paste menu you can already do that, from formatting submenu of quick paste menu, or even faster using custom hotkeys set for the formatting item.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #33 on: October 14, 2011, 06:51 AM »
8 I would like to have the option for user tools NOT to paste the output (my AHK example for example does not require pasting) - maybe if %outfile% does not exist (currently it gives an error).

Very good idea, i will add it.

For those that don't see the use for this -- consider that you can use chs to trigger some operation on the text under the cursor by launching a script on it -- and the script may have nothing to do with text transformation (for example you might have it open a web page to define the word under the cursor).

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #34 on: October 14, 2011, 06:53 AM »
10) Unrelated to the formatting presets: when I use quick paste and the main window exists - the main window is activated first. This is not a big problem but it bothers me as the behaviour differs from when the main window is minimised to tray

can you explain this a bit more, im not sure i understand.


11) Unrelated to the formatting presets: When I am in a rename mode (for example in explorer or gbCodeLib9) activating quick paste deactivates the edit/rename mode and the paste gets lost (i.e. go to explorer, select a file, press F2, Quick Paste something - filename unchanged). If there is anyway to prevent this from happening I would be extremely grateful but somehow I think that the creation of the quick paste menu will always do this.

i dont think i can control this.


12) Unrelated to the formatting presets: I would be grateful for some way to paste a clip with original formatting (for example, pasting bold text in MS Word as bold text)


one of the remaining big todo items of CHS is to save clips with richtext formatting not just plaintext; not possible yet but coming.

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #35 on: October 14, 2011, 07:43 AM »
12) Unrelated to the formatting presets: I would be grateful for some way to paste a clip with original formatting (for example, pasting bold text in MS Word as bold text)

+1 ... Yes, this is a requirement of mine also.
Sometimes I want the formatting though, and sometimes I don't. As a stopgap, this AHK code (below) will paste the last clip you copied to clipboard either with or without formatting. (I think I got this from the AHK forum. It's very handy and I find I use it a lot.)

(AHK code:
$^v::   ; Intercept Ctrl+v to send an UNformatted Paste
   Gosub, UnformattedPaste         ; Unformatted paste - Ctrl-V = Remove formatting from Ctrl-V (paste), unless SHIFT key is also pressed.
   return
;-------------------------------------------------------------------
$^+v::  ; Intercept Ctrl+Shift+v to send a Formatted Paste
   Send ^v             ; Normal paste - Ctrl+Shift+V = just send the regular paste command
   return
;-------------------------------------------------------------------
UnformattedPaste:   ; Unformatted paste - Ctrl-V = Remove formatting from Ctrl-V (paste), unless SHIFT key is also pressed.
   ClipSaved := ClipboardAll ;save original clipboard contents
   clipboard = %clipboard% ;remove formatting
   Send ^v ;send the Ctrl+V command
   Clipboard := ClipSaved ;restore the original clipboard contents
   ClipSaved = ;clear the variable
Return
;-------------------------------------------------------------------

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #36 on: October 14, 2011, 07:46 AM »
As a stopgap, this AHK code (below) will paste the last clip you copied to clipboard either with or without formatting. (I think I got this from the AHK forum. It's very handy and I find I use it a lot.)

Tip: If you are using CHS you can do this as follows:
  • Crtl+V will paste using windows clipboard, and so will preserve all formatting.
  • Press Ctrl+Alt+Q, to bring up CHS quick paste menu, then hit 1.  This works because it uses the CHS quick paste menu which does plaintext

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #37 on: October 14, 2011, 07:57 AM »
7) I would like a way to perform this on a clip from the quick paste menu - though I cannot think of anyway to do it intuitively

if you mean you want a way to apply formatting from quick paste menu you can already do that, from formatting submenu of quick paste menu, or even faster using custom hotkeys set for the formatting item.

Sorry - let me rephrase - when activating the quick paste menu - there is a history of 15 saved clips - I would like to run the formatting on one of these saved clips

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #38 on: October 14, 2011, 08:02 AM »
10) Unrelated to the formatting presets: when I use quick paste and the main window exists - the main window is activated first. This is not a big problem but it bothers me as the behaviour differs from when the main window is minimised to tray

can you explain this a bit more, im not sure i understand.

Step by step
1) Open the main window (ctrol+alt+w - or tray)
2) Navigate to Notepad (or anything but CHS)
3) Press Ctrl+Alt+Q (QuickPaste)


Result:
Main Window gets activated, and quick paste menu gets shown. CHS correctly pastes to notepad though, so this is just an annoyance and not a big problem.


mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #39 on: October 14, 2011, 08:03 AM »
Ah i can do that.. there is a shift+click menu that you can activate for any of the previous history of clips, i could put the formatting menu in there too.

But it's not so hard to do it now, you would just bring up  the main window, select the old clip, then choose the formatting preset from the button drop down arrow.
Screenshot - 10_14_2011 , 8_00_42 AM.png
« Last Edit: October 14, 2011, 08:09 AM by mouser »

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #40 on: October 14, 2011, 08:09 AM »
As a stopgap, this AHK code (below) will paste the last clip you copied to clipboard either with or without formatting. (I think I got this from the AHK forum. It's very handy and I find I use it a lot.)

Tip: If you are using CHS you can do this as follows:
  • Crtl+V will paste using windows clipboard, and so will preserve all formatting.
  • Press Ctrl+Alt+Q, to bring up CHS quick paste menu, then hit 1.  This works because it uses the CHS quick paste menu which does plaintext

12) Unrelated to the formatting presets: I would be grateful for some way to paste a clip with original formatting (for example, pasting bold text in MS Word as bold text)


one of the remaining big todo items of CHS is to save clips with richtext formatting not just plaintext; not possible yet but coming.

This would be great - the thing is that I use CHS almost as an aggregator e.g. copy 10 times from one document - the paste a bunch of them at once in the second document to minimize switching.
« Last Edit: October 14, 2011, 08:14 AM by capitalH »

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #41 on: October 14, 2011, 08:12 AM »
Ah i can do that.. there is a shift+click menu that you can activate for any of the previous history of clips, i could put the formatting menu in there too.

But it's not so hard to do it now, you would just bring up  the main window, select the old clip, then choose the formatting preset from the button drop down arrow. (see attachment in previous post)

I do not use the main window much - maybe that is why I missed it. The beauty of the quickpaste option is that I can see immediately which clip is which - whereas in the main window I first have to open the clip. I can live with it though.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #42 on: October 14, 2011, 08:40 AM »
whereas in the main window I first have to open the clip

Sounds like you dont have the grid configured to show an excerpt.  You can click on the little button to the far left of the grid column header to configure which columns are shown, and then drag and drop to position and resize.

capitalH

  • Participant
  • Joined in 2008
  • *
  • Posts: 71
    • View Profile
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #43 on: October 14, 2011, 09:38 AM »
whereas in the main window I first have to open the clip

Sounds like you dont have the grid configured to show an excerpt.  You can click on the little button to the far left of the grid column header to configure which columns are shown, and then drag and drop to position and resize.

Thanks - never knew there was an option for it (where is the facepalm emoticon?). Problem solved!

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #44 on: October 14, 2011, 09:08 PM »
As a stopgap, this AHK code (below) will paste the last clip you copied to clipboard either with or without formatting. (I think I got this from the AHK forum. It's very handy and I find I use it a lot.)

Tip: If you are using CHS you can do this as follows:
  • Crtl+V will paste using windows clipboard, and so will preserve all formatting.
  • Press Ctrl+Alt+Q, to bring up CHS quick paste menu, then hit 1.  This works because it uses the CHS quick paste menu which does plaintext

Thanks, yes, I understood that. I think that, in my haste, I did not make myself clear.
The thing is, most of the time I do not want to paste the text with its formatting, but without it.
Thus, using the AHK script would seem to be a much more efficient and quicker way of achieving what I want.

The constraint is that it can only do this with the last clip copied to the clipboard - sometimes I would like to get an older clip and its formatting, and past that in its entirety - i.e., not just the raw text as at present.

That is why I said:
+1 ... Yes, this is a requirement of mine also.
- in response to @capitalH saying:
12) Unrelated to the formatting presets: I would be grateful for some way to paste a clip with original formatting (for example, pasting bold text in MS Word as bold text)

The implication of the above is that the CHS functionality:
Press Ctrl+Alt+Q, to bring up CHS quick paste menu, then hit 1.  This works because it uses the CHS quick paste menu which does plaintext
- just to get the unformatted text - probably needs to be simplified to a single hotkey activation. If that were done, then the AHK code would be redundant for a CHS user.
You'll see that I used AHK so that:
  • Ctrl+V creates an unformatted paste. (This is what I frequently want.)
  • Shift+Ctr+V creates a formatted paste. (This is what I more infrequently want.)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #45 on: October 14, 2011, 09:14 PM »
just to get the unformatted text - probably needs to be simplified to a single hotkey activation.

fair enough, ill add that to todo list, seems reasonable.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #46 on: October 18, 2011, 06:50 PM »
The new alpha has the hotkey to plaintext paste.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #47 on: October 18, 2011, 06:55 PM »
The new alpha includes new options to:
  • redirect stdin and stdout instead of working from files (see new sample perl file -- you MUST include lines in your perl to flush stdout!)
  • ignore output -- useful if your tool doesn't modify text but launches some action
  • pass cliptext itself on commandline (only useful if its short!)

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,540
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #48 on: October 19, 2011, 07:48 AM »
The new alpha has the hotkey to plaintext paste.
Thanks, I have been trying that out.
It almost works correctly.
I have set the hotkey Ctrl+Shift+V as the "paste plain text" hotkey.
That leaves Ctrl+V as the usual "paste formatted text" hotkey.

However, if in MS Word I copy some formatted text:
 - I can paste it as formatted text - Ctrl+V
 - Then I can paste it as plain text - Ctrl+Shift+V
 - But I cannot paste it as formatted text again - Ctrl+V just pastes it as plain text.

After some experimentation it definitely looks as though the first time I press Ctrl+Shift+V, it clears the formatting altogether.
Are you able to fix this so as to preserve the formatting for the last copied clip, even after Ctrl+Shift+V (plain text paste) has been pressed?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: CHS: New Formatting Dialog
« Reply #49 on: October 19, 2011, 09:40 AM »
But I cannot paste it as formatted text again - Ctrl+V just pastes it as plain text.
ah you caught me.  i can add an option to fix that.  right now it uses the clipboard to sanitize it and leaves the plaintext on it.  i could use a different technique.