topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • October 18, 2019, 06:42 AM
  • Proudly celebrating 13 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 2019: TextWorx - Universal Text Manipulator  (Read 19440 times)

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #25 on: January 07, 2019, 05:42 AM »
Cool, I like such tools. Thanks for your work.


Test with 0.7 on Notepad2 on W7/64:
"Transform > Reverse" on a few lines: did reverse but also added one additional line break for each selected line.


Suggestion:
Add this text to the ReadMe.txt
win+K to show the menu
win+shift+K to toggle the toolbar

After you have the menu open (or when you push a toolbar button):
  • hold shift to reverse the effect (in many cases)
  • hold control to work the effect on each line in the selection
  • hold control+shift to do both

For example, if you want to encase a word in double-quotes, just select the text, then select the function from the menu.
  • To remove double-quotes, hold shift when you select the function.
  • To encase each line in double-quotes, hold control when you select the function.
  • To remove double-quotes from each line, hold control+shift when you select the function.

also show there the release number (or somewhere else) so we can report which release we tested with.
Sorry, just found it behind the TNA icon ;-)



Ideas:
1. Insert > Prefix text to lines / Append text to lines (dialog box like Notepad2 Alt+M) ((( Aha, works already with Control-key on (Encase > Surround*)-command )))

2. Transform > Wrap line at pos: [ 72] ()Exactly ; ()Only after Space, Dot or ?!"-signs. For to split a long line into shorter lines.

3. Transform > Wrap line after [ 500] signs at char [. ] (this is a "dot+space") For to split one long joined line into a few paragraph with junks of 500 signs.

4. For to indicate a follow up dialog, me think a trailing '...' on the menu entry is more common then your trailing '*' ? (For me it tokes a few minutes until I realized what that sign was for  :P )

5. kind of "Restart TextWorx" entry for to re-read the INIs after modifying them (currently I have to exit and restart TextWorx)

6. Do you really need the numbering for the menu items?
100=single line|test1
101=spaced lines|test2
102=[brackets]|test3
I would found it better without, so I can easily rearrange the entries at wish, without order the numbers afterwards too.
Entry=single line|test1
Entry=spaced lines|test2
Entry=[brackets]|test3



I just tested TextWorx with TotalCommander, works fine:
- Modifying an button > Change... > Command-box: >>> Win+K > Editor > Zoom Editor
- F7 create new folder > >>> Win+K > Date and Time > Montag, 7. Januar 2019




  :Thmbsup:
« Last Edit: January 07, 2019, 08:39 AM by AbteriX »

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #26 on: January 07, 2019, 11:29 AM »
Updated to version 0.8.  Changelog.

I fixed the extra lines in Reverse and most all of the other ones.  I've tested all the functions and they all work now

I haven't figured out how to make the global hotkey custom, but it's on my list.

If a menu item summons a dialogue, it has a * at the end of it.  This is actually in the documentation file that I am writing which you don't have yet.  ;)

Adding a "Restart TextWorx" item is a good idea; I think I'll do that.

Yes, you need the numbering for menu items.  The numbering on the left of the = sign is the order they appear, but you can rearrange what is on the right side.  They are not tied together.  The numbering allows the program to distinguish between settings and custom items.

The Zoom Editor works (I need to work on it, though) but you can't use TextWorx' own functions in that Zoom window.  It was designed for this, and it used to work, but I broke it.  I'm working on fixing that now.

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #27 on: January 07, 2019, 08:13 PM »
I think I've figured out how to make every single menu user-configurable!
My quandry is this, though, if the default menus can be changed, and then I add new functions, they won't appear anywhere in the menu, and the user would have to read the docs to add the new items if they want them.

Should I make the default menus just toggle-able?  The user can always create their own (in the new version I'm working on) which won't ever be overwritten by the program.

cytochrome

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 9
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #28 on: January 10, 2019, 08:28 AM »
TextWorx is incredibly useful! Thank you for creating it.
The one addition that might be useful in the 'coding' menu might be the ability to convert between variable naming conventions (snake case, camel case, kebab case, etc.)
Cheers,
Brad

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #29 on: January 10, 2019, 08:51 AM »
cytochrome - can you elaborate a little?  In the Convert menu there is uppercase, lowercase, sentence and title case.  I could add camelCase there.  I've never heard of snake and kebab case, though.

cytochrome

  • Supporting Member
  • Joined in 2010
  • **
  • Posts: 9
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #30 on: January 10, 2019, 10:31 AM »
Sure. As you know, different programmers/computer languages have different conventions for naming variables.

camel case: concatenated words with each word in titlecase or the first word in lowercase 
  ThisIsMyVariableName or thisIsMyVariableName

snake case: lower-case words concatenated by underscores
  this_is_my_variable_name

kebab case: lowercase words concatenated by dashes
  this-is-my-variable-name

Cheers,
Brad

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #31 on: January 10, 2019, 10:36 AM »
Great!  It's on my todo list.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 10,246
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #32 on: January 10, 2019, 02:47 PM »
Sure. As you know, different programmers/computer languages have different conventions for naming variables.

camel case: concatenated words with each word in titlecase or the first word in lowercase 
  ThisIsMyVariableName or thisIsMyVariableName

snake case: lower-case words concatenated by underscores
  this_is_my_variable_name

kebab case: lowercase words concatenated by dashes
  this-is-my-variable-name



I'd not heard of those other cases being referred to by a particular name.  Interesting!

For others in that same situation -

https://en.wikipedia...#Special_case_styles

There's also Studly caps, which it doesn't seem like a useful thing to implement.. :)

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #33 on: January 15, 2019, 02:17 PM »
Okay, everyone, it's ready now!  I've made a weeks worth of changes and fixes to it, and nearly everything works like a charm.
You can check out the help file which shows the changes. 

Main changes:
  • Menus are now completely customizable
  • Full Documentation
  • Toolbars work
  • Much more reliable
  • Any command can be on the toolbar or in the menu
  • Choose from many configurable toolbars
  • Many new commands
  • Many commands fixed

If you are using one of the betas, please delete all the files before using the new version.  Version 1.0 does things a bit differently with the config INI file.

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 3,279
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #34 on: January 15, 2019, 05:05 PM »
 ;D :-* :P

Running to try. I will comment !!!!!!!!!!!!!!!!!!!!!!

Sounds like an astonishing and wonderful work !
 



mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 39,476
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #35 on: January 15, 2019, 05:42 PM »
Very impressive.  :up:

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 39,476
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #36 on: January 15, 2019, 05:43 PM »
Some screenshots on the web page would be nice.

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #37 on: January 15, 2019, 06:55 PM »
Mouser - you mean on the download page?  Okey, dokey, Boss.  I've added screenshots to the download page (my other apps already had them).
« Last Edit: January 15, 2019, 09:24 PM by BGM »

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #38 on: January 15, 2019, 09:51 PM »
Sure. As you know, different programmers/computer languages have different conventions for naming variables.

camel case: concatenated words with each word in titlecase or the first word in lowercase 
  ThisIsMyVariableName or thisIsMyVariableName

snake case: lower-case words concatenated by underscores
  this_is_my_variable_name

kebab case: lowercase words concatenated by dashes
  this-is-my-variable-name

I've been thinking about this.  But there's no way to tell where one part of the word starts and another ends.
Say you type:  thisismyvariablename - what kind of forensics is there to use to separate that string into words in order to work on the words separately?  Same thing for snake_case and kebab-case.  The best I can think of is to change spaces to - or _   But that would mean you'd have to put spaces in your variables... so I don't think this is possible without some extravagant database of words to search through and do regex camparisons.  Even then, many varables are not composed of words at all.  I don't think this can be done.

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 10,246
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #39 on: January 15, 2019, 11:23 PM »
I was thinking that the ask was to take a phrase and turn it into the appropriate case.  So if you had this is a variable it would be turned into this_is_a_variable or this-is-a-variable.  Nothing would be done to thisisavariable.

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #40 on: January 15, 2019, 11:25 PM »
oh, well, if there were word separations, such as spaces, that would be easy. thisisavariable would be quite difficult (more difficult than I am interested in, anyway!).  However, would anybody ever want to do that to a phrase?  I think Cytochrome wanted to do it to thisisavariable, and I can understand wanting to do that.  When people write variables in code, they never write them with spaces between.  I would actually find it easier to camelcase the vars as they come to me in my mind than to put spaces into them where they don't belong.

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 3,279
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #41 on: January 16, 2019, 02:51 PM »
I all my testing work like a charm !!!!!!!  :-* :P

 ;D

But I have something to ask....

For years in DC i have been asking for features and more features about manipulating text.
Some of these features are powerful features in TextWorx.
Some of the same features are useful in PsPad program.

I use PsPad from several years and I am very used to it.

Recently I begin a discussion in pspad forum to ask for the possibility to link to a folder from inside a plain text file (txt file for instance).

The real thing is that from PsPad I can launch an url, but not a folder. At least no directly. By similar reasons I can't launch a file to open or a program.

pspad answered me : No it can't to know it.
File/folder path can contain spaces, URL like protocols not. So PSpad isn't able to take general text and duess where is end.

I have accepted this as a logical rule or limitation in the txt files.

But I proposed there and here an idea.

One of the options in the pspad contextual menu : "Open Selected file in default application" allow me to open a folder, a file, a program....

I have an old script (of course I don't remember how I did) to select from the cursor a text to the beginning of the line. In a txt file, or even here.

As pspad said there are limitations, but is possible to select manually a chain of characters and launch with the option above of the contextual menu.
I don't remember how of course, but I know is possible to launch in a batch file or other environments (AHK, Autoit,....) this chain of characters.

So I am launching from the txt file folders, programs, files to open with word or acrobat, etc (images, videos, audios,.....) with the above method.

Is it possible a little script included in TextWorx to launch selective chains ?

By example :

c:/program files\textworx\textworx.exe

If I put the cursor at the end of the above chain and the script select it and automate the launching. Automate to launch with the default application you have configurated if any. In other case do nothing.

 :-* :P

P.S. I have assigned Ctrl+.   (control and "." ) to selected a line from the cursor to the beginning of the line.
But any configurable hotkey may serve.

Best Regards

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #42 on: January 16, 2019, 03:25 PM »
I'm glad you like TextWorx - it's one of my long-time programs, and I happily use it myself.
In the Tools & Options menu, there is a command to simply RUN the selected text.
Also, if you look in the help file under Tools, you'll see a way to add your own programs into the menu.

Just select the text and choose RUN Text from the Tools Menu, it could be anything (but it doesn't do multiple lines - I think I'll add that too).
notepad "c:\test.txt"
calc


For selective chains, I've been thinking about that.  As things are, you would have to use the Select Line command, then the RUN text command.
Unless you use notepad3, which has selective chains built in already (meaning, if you push ctrl+c with no text selection in notepad3, notepad3 copies the entire line).

However, TextWorx does this for the Duplicate function.  If you use the Duplicate command with no text selection, TextWorx will grab the entire line (internally using Select Line on it's own). 

I've been thinking about making TextWorx do this for everything, not only Duplicate.  I'll add this to my list.

However, if you want to create hyperlinks to open stuff for you, check out my other program called Protocaller.  Besides html pages, there are some programs that will let you use system url protocols (there are some that limit you to just http).
« Last Edit: January 16, 2019, 03:33 PM by BGM »

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 3,279
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #43 on: January 16, 2019, 05:11 PM »
I'm glad you like TextWorx - it's one of my long-time programs, and I happily use it myself.
In the Tools & Options menu, there is a command to simply RUN the selected text.
Also, if you look in the help file under Tools, you'll see a way to add your own programs into the menu.

Just select the text and choose RUN Text from the Tools Menu, it could be anything (but it doesn't do multiple lines - I think I'll add that too).
notepad "c:\test.txt"
calc


For selective chains, I've been thinking about that.  As things are, you would have to use the Select Line command, then the RUN text command.
Unless you use notepad3, which has selective chains built in already (meaning, if you push ctrl+c with no text selection in notepad3, notepad3 copies the entire line).

However, TextWorx does this for the Duplicate function.  If you use the Duplicate command with no text selection, TextWorx will grab the entire line (internally using Select Line on it's own). 

I've been thinking about making TextWorx do this for everything, not only Duplicate.  I'll add this to my list.

However, if you want to create hyperlinks to open stuff for you, check out my other program called Protocaller.  Besides html pages, there are some programs that will let you use system url protocols (there are some that limit you to just http).

Running to try protocaller.
But .... Wher is the Tools & Options menu.
I put a screenshot after activation of the program with Win+K

AsusPortatil - 16_01_2019 , 23_08_12.pngNANY 2019: TextWorx - Universal Text Manipulator

I am doing something bad !  . I don't see the option.
 :-\

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 3,279
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #44 on: January 16, 2019, 05:20 PM »
I am doing some disconfiguration.
I try the help and the option appears, but not in my menu....

AsusPortatil - 16_01_2019 , 23_19_23.pngNANY 2019: TextWorx - Universal Text Manipulator

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #45 on: January 16, 2019, 06:54 PM »
HAha!  You are right - it's not there.  I left it out of the created ini file by accident.

Open the ini file, and under [Menus]
change this:
mainmenu=default
to:
mainmenu=800||201|307|302|301||104|901|212|725||encase|coding|editor|sort|trim|transform|convert|webedit|insert|*sar|*date|tools
and add this:
tools=default
Then restart TextWorx.
That will fix it.

After you do that, if you want RUN Text to be in the main menu, the command is 850.  Just put it in the string for the mainmenu, like this:
mainmenu=800||850||201|307|302|301||104|901|212|725||encase|coding|editor|sort|trim|transform|convert|webedit|insert|*sar|*date|tools

So, your entire [Menus] section will look like this; you will have RUN Text in the main menu, and the Tools menu will appear:
mainmenu=800||850|201|307|302|301||104|901|212|725||encase|coding|editor|sort|trim|transform|convert|webedit|insert|*sar|*date|tools
editor=default
transform=default
insert=default
trim=default
sort=default
coding=default
encase=default
convert=default
webedit=default
tools=default

Sorry for the trouble!  I'm saving up fixes for the next version.

But I'll add it in the next update so it shows by default.  The update won't affect your configuration any, though.
If you wanted to know how to add it, you'd have to look through the Menu topic in the help file.  That would say how to add the default tools menu, and also tells how to customize the tools menu and every other menu.

So, if you want to open the file in the default program, you can just RUN Text (command 850) on a filename.
RUN Text on this will open it in notepad for me because notepad is default for .txt files.
c:\test.txt
« Last Edit: January 16, 2019, 07:37 PM by BGM »

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 3,279
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #46 on: January 17, 2019, 04:39 AM »
 ;D

I'll try. Wonderful interior of the program !
 :-*

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 3,279
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #47 on: January 17, 2019, 05:55 AM »
Works like a charm !!!!!!!

Ejem. My problem is obvious a problem of efficiency. When I select the text with the standard features of pspad I have to open the contextual menu and select the option Open the selected file with the default application.
One click and move of the mouse, right click and selected the above option.

With TextWorx I have more movements or keystrokes.
Perhaps if we can assign hotkeys to certain functions will be the best.  :-* :P

Is it possible in a future version ?

Best Regards

BGM

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 373
    • View Profile
    • bgmCoder DC
    • Read more about this member.
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #48 on: January 17, 2019, 08:09 AM »
Yes, I have been thinking of that, too, - hotkeys for the commands but I have to figure out how to do it first.  It would be pretty nifty.  However, my first goal will be to allow the user to change the global hotkey for the menu.  Problem with hotkeys for the commands is that they would *all* be global.  OR, maybe there could be some way to lock them to the active window so they are not global.  This will require some thought.

TextWorx is about the same for you as PSPad if you add the command to the top of the main menu.  Select Text - open menu, select command

But for you, Contro, do you use autohotkey?  If you like that RunText function, I can make you a little script that will let it work for you that way; it would be pretty easy.
« Last Edit: January 17, 2019, 08:25 AM by BGM »

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 10,246
    • View Profile
    • Donate to Member
Re: NANY 2019: TextWorx - Universal Text Manipulator
« Reply #49 on: January 17, 2019, 09:02 AM »
oh, well, if there were word separations, such as spaces, that would be easy. thisisavariable would be quite difficult (more difficult than I am interested in, anyway!).  However, would anybody ever want to do that to a phrase?  I think Cytochrome wanted to do it to thisisavariable, and I can understand wanting to do that.  When people write variables in code, they never write them with spaces between.  I would actually find it easier to camelcase the vars as they come to me in my mind than to put spaces into them where they don't belong.

I was thinking about this, and you could convert between CamelCase, snake_case, and kebab-case pretty simply.  Just not the random all lower case words.  That could be a real use.