English main discussion
-
Offline
- Posts: 32
- Joined: Thu Oct 15, 2015 2:20 am
Post
by CBruce »
I see script code in the forum with:
I just used that in a script, but the documentation only shows T/F as bSelect parameter.
Is there something special about the -2 value as the parameter? Or is it just acting as True?
Code: Select all
(Scripts_en.txt)
AkelPad.ReplaceSel
__________________
Replace selection.
ReplaceSel(pText[, bSelect]);
Arguments
pText
Text to replace with.
bSelect
true select inserted text.
false don't select inserted text (default).
Return Value
Zero.
Example:
AkelPad.ReplaceSel("MyText");
-
Offline
- Posts: 874
- Joined: Sat Jan 16, 2010 2:03 pm
Post
by opk44 »
CBruce wrote:but the documentation only shows T/F as bSelect parameter.
Still using the outdated version?
See docs in AkelPad 4.9.1-4.9.9, Scripts-plugin v15.9-18.6 (2014.12.16->):
Code: Select all
AkelPad.ReplaceSel
__________________
Replace selection.
ReplaceSel(pText[, nSelect]);
Arguments
pText
Text to replace with.
nSelect
0 //RST_NONE don't select inserted text (default).
-1 //RST_SELECT select inserted text.
-2 //RST_SELECTRESTORESCROLL select inserted text and restore scroll position.
Return Value
Zero.
Example:
AkelPad.ReplaceSel("MyText");
-
Offline
- Posts: 32
- Joined: Thu Oct 15, 2015 2:20 am
Post
by CBruce »
Thanks, opk44.
That was it.
I also had an old Coder_en.txt. Both updated now.