Select a specific number of characters
Posted: Sun Mar 30, 2025 6:48 am
Is there a way, maybe a plugin, to select a certain number of bytes/characters forward or backward from the cursor, preferably stopping at word boundaries 

Code: Select all
// https://akelpad.sourceforge.net/forum/viewtopic.php?p=36773#p36773
// selectNcharsRelativetoCursor.js
// select a specified number of chars relative to cursor
// 2025-04-01 ewild
// select from the cursor position backward/up/toward the beginning
AkelPad.TextFind(0,".{12}",0x001C0000);
WScript.Echo('hit ok to continue');
// select from the cursor position forward/down/toward the end
AkelPad.TextFind(0,".{12}",0x000C0001);
// Scripts-Eng.txt
// AkelPad.TextFind
// 0x00040000 dot symbol '.' in regular expressions specifies any character except new line
// 0x00080000 search with regular expressions
// 0x00100000 find up
// 0x001C0000 = sum of above