Change selected text to upper/lower/title case, problem

English main discussion
  • Author
  • Message
Offline
Posts: 2
Joined: Thu Mar 27, 2014 7:45 am
Location: Australia

Change selected text to upper/lower/title case, problem

Post by bawldiggle »

When I select some text to "change-the-case" the selected text is changed.

BUT if no text selected, the entire document is changed :shock:

AkelPad 4 - User's Manual [url=file:///C:/Programs2/AkelPad/AkelFiles/Docs/AkelHelp-Eng.htm#ch5]Keyboard commands[/url] states "selected text"
And if Commands are assigned to hot-keys the same behaviour occurs.

It is catastrophic on some large code files !

Is there a way of trapping/filtering "no selection" ?
(In Metapad if nothing is selected an alert shows and no changes are made)

I would appreciate any guidance :)

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

bawldiggle
You can assign via Hotkeys plugin the following commands for change case:

Command:

Code: Select all

Call("Scripts::Main", 1, "EvalCmd.js", `if (AkelPad.GetSelStart() != AkelPad.GetSelEnd()) AkelPad.Command(4175);`)
Hotkey:

Code: Select all

Ctrl+6
Command:

Code: Select all

Call("Scripts::Main", 1, "EvalCmd.js", `if (AkelPad.GetSelStart() != AkelPad.GetSelEnd()) AkelPad.Command(4176);`)
Hotkey:

Code: Select all

Ctrl+7
and so on.

After AkelPad 4.8.9 release you would be able to assign "Command(4175, 1)". It will change case for current word if no selection.

Offline
Posts: 8
Joined: Thu Jun 26, 2014 10:50 am

Post by sandrito »

Instructor says
After AkelPad 4.8.9 release you would be able to assign "Command(4175, 1)". It will change case for current word if no selection.

Instructor
I do not understand where I can do: You can assign via Hotkeys plugin the following commands for change case: Command: Code: Hotkey: Code:..........

I like AkelPad because it has the option of File>Preview... before printing and I am using the newest AkelPad 4.8.9 release from Portableapps.com

I yet destroyed some text file, because I didn't see, that I used for example Ctrl+8 "Sentence case" and saved the file. I would like to deactivate Ctrl+6 till Ctrl+0 or as described before: It will change case for current word if no selectionn = this should be by default!.

For exampel at Ctrl+6 the "Command(4175,1)" does not work - it still changes the whole text to UPPERCASE - and not only change case for current word if no selection.

To change the Ctrl+6 command I do:
- Option>Plugins
- Mark the (Plugin::Function) Hotkeys::Main = Status Running
- Click "Call" then "All keys..."
- Select IDM_EDIT_UPPERCASE, Command(4175), Ctrl+6 with DoubleClick
- Cange the Command to Command(4175,1) and klick on Modify
- Close the "Hotkeys plugin" Windows
- Restart AkelPad

What is missing? What I am doing wrong?

Thanks for help

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

sandrito
Works for me. You all doing right. Make sure you have checked "Hotkeys::Main" autoload (after restart it should have status "Running").

Offline
Posts: 8
Joined: Thu Jun 26, 2014 10:50 am

Post by sandrito »

Like I wrote above I did:
- Mark the (Plugin::Function) Hotkeys::Main = Status Running

and I can see it in the Plugin Window: Hotkeys::Main = Status Running

To compare and before writing to you, I installed AkelPad on Win7. The installed AkelPad 4.8.9 reacts the same as the PortableApps Version.

What seems to be strange is: even all checkboxes (Select checkbox for plugin autoload) in the Plugin Window are NOT checked . But the Hotkeys::Main all Ctrl-6 to Ctrl-0 are working! So please test it with a new clean installed AkelPad.

Thanks for your help

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

sandrito wrote:What seems to be strange is: even all checkboxes (Select checkbox for plugin autoload) in the Plugin Window are NOT checked . But the Hotkeys::Main all Ctrl-6 to Ctrl-0 are working!
If you call "Hotkeys::Main", "Hotkeys::Main" became "Running" even after you close Hotkeys dialog.

I don't understand, you solve problem? As, I wrote above, just set autoload checkbox for "Hotkeys::Main" press "OK" and restart AkelPad.

Offline
Posts: 8
Joined: Thu Jun 26, 2014 10:50 am

Post by sandrito »

No, the problem is NOT solved.

I do NOT WANT that the Ctrl-6 to Ctrl-0 are working (function, are active). But in a new installed AkelPad, this keys are functioning - but should not! And with your instruction....."Command(4175, 1)"..... it did NOT work for me as well.

So please test it with a new clean installed AkelPad. before answering me again.

Thanks

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

sandrito wrote:I do NOT WANT that the Ctrl-6 to Ctrl-0 are working (function, are active).
Then you should assign "Command(0)" or "Command(-1)".

If you have autoload checkbox on "Hotkeys::Main", "Hotkeys::Main" status running and assigned to Ctrl+6 command "Command(4175,1)" don't work then upload/send your AkelPad folder (settings must be saved to ini) - I will check it.

Offline
Posts: 8
Joined: Thu Jun 26, 2014 10:50 am

Post by sandrito »

To Instrucor:
Is my english so bad (I am Swiss) or you do not want to understand me?

I do not have to upload/send you AkelPad. Like I wrote you already twice:
So please test it with a new clean installed AkelPad.

You can get it from:
http://portableapps.com/apps/developmen ... d_portable
and test it with this. For me in this new clean installed AkelPad Portable Version the Ctrl-6 to Ctrl-0 are working (function, are active) without manipulating anything - and they should not - right?

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

sandrito wrote:Is my english so bad (I am Swiss) or you do not want to understand me?
Breathe smoothly and you will be able to see some new aspects of life that were hidden from you :)
... the Ctrl-6 to Ctrl-0 are working (function, are active) without manipulating anything - and they should not - right?
Not right. See User's Manual:
AkelHelp-Eng.htm wrote:Ctrl+5 cycle selection through case change
Ctrl+6 selected text, as "UPPERCASE"
Ctrl+7 selected text, as "lowercase"
Ctrl+8 selected text, as "Sentence case."
Ctrl+9 selected text, as "Title Case"
Ctrl+0 selected text, as "iNVERT cASE"

Offline
Posts: 8
Joined: Thu Jun 26, 2014 10:50 am

Post by sandrito »

to Instructor

OK, now I know that Ctrl+5 till Ctrl+0 is set by default. But who (which person) needs this (for the entier text)? :evil: By the way "Ctrl+5 cycle selection through case change" is not in the menu.

Like bawldiggle already said on Sun Apr 13, 2014 in this first post:
BUT if no text selected, the entire document is changed :shock:
It is catastrophic on some large code files !

I agree with bawldiggle, it should be like:
(In Metapad if nothing is selected an alert shows and no changes are made)

For me Ctrl+5 till Ctrl+0 could be banish into "Hotkeys::Main", where I could activate it, if I need it.

What you are going to do it with this problem?

Offline
Posts: 8
Joined: Thu Jun 26, 2014 10:50 am

Post by sandrito »

To Instructor

My problem is still not solved and I did not get an answer what you are going to do.

I spent a lot of time to analyze this problem for me and would like to have a solution.

Thanks

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

sandrito

It should be like this:
Image

Offline
Posts: 8
Joined: Thu Jun 26, 2014 10:50 am

Post by sandrito »

@Instructor

Thanks for the screenshot and further help. I see, you do not want deactivate Ctrl+5 till Ctrl+0 as default.

So lets go back to banish them the manual way:

Already on my first poste on "Thu Jun 26, 2014 11:49 am" I described how I changed the Ctrl+5 till Ctrl+0 Commands with (41XX,1) = it looks like your screenshot - but it does not work :-(

On "Tue Jul 01, 2014 4:21 am" you said ....don't work then upload/send your AkelPad folder (settings must be saved to ini) - I will check it. = You can download the whole folder of my AkelPad PortableApps-Version from this Link: http://1drv.ms/WquXjx

I hope there you will find the bug. Thanks

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

sandrito
Screenshot was posted by KDJ.

Downloaded your AkelPad folder. But all works fine - case changed only for current word (not for all text):
Image

Probably some problem with PortableApps launcher. You can try to reproduce with standard AkelPad installation.
Post Reply