Scripts discussion (1)
- Author
- Message
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
Ок, сообщи об этом в скрипте, т.к. он молчит как партизан ))se7h wrote:ChmKw.exe необходимая часть скрипта, наличие которой строго обязательно
И ещё микро-баг: я выделил слово самостоятельно, а потом вызвал справку, так вот если слово выделенное есть, то не надо сбрасывать его выделение, т.е. скрипт за меня не должен это решать: если мне не нужно выделение, то я не буду выделять, а нажму вызов справки на слове, иначе - выделение нужно.
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
VladSh
Scripts LinesMoveUpDown.js and ShiftVerticaly.js not work properly when the option "Wrap words" is enabled.
It turns out that the functions:
- AkelPad.SendMessage(hWndEdit, 1078 /*EM_EXLINEFROMCHAR*/, 0, nMinSel),
- AkelPad.SendMessage(hWndEdit, 1078 /*EM_EXLINEFROMCHAR*/, 0, -2),
- AkelPad.SendMessage(hWndEdit, 187 /*EM_LINEINDEX*/, nMinLine, 0),
- AkelPad.SendMessage(hEditWnd, 193 /*EM_LINELENGTH*/, nMaxLine, 0)
treat wrapped lines as a separate rows.
Maybe you know, which function to use, so that was good?
Scripts LinesMoveUpDown.js and ShiftVerticaly.js not work properly when the option "Wrap words" is enabled.
It turns out that the functions:
- AkelPad.SendMessage(hWndEdit, 1078 /*EM_EXLINEFROMCHAR*/, 0, nMinSel),
- AkelPad.SendMessage(hWndEdit, 1078 /*EM_EXLINEFROMCHAR*/, 0, -2),
- AkelPad.SendMessage(hWndEdit, 187 /*EM_LINEINDEX*/, nMinLine, 0),
- AkelPad.SendMessage(hEditWnd, 193 /*EM_LINELENGTH*/, nMaxLine, 0)
treat wrapped lines as a separate rows.
Maybe you know, which function to use, so that was good?
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
I fixed the script LinesMoveUpDown.js.
It now works correctly with the options "Word wrap" and NoSelEOL.
PS.: VladSh thanks for the idea of disabling NoSelEOL.
It now works correctly with the options "Word wrap" and NoSelEOL.
PS.: VladSh thanks for the idea of disabling NoSelEOL.
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
I corrected the script LinesMoveUpDown.js.
With the help of Instructor, this script now works correctly with column selection.
With the help of Instructor, this script now works correctly with column selection.
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
I found other way to check whether the 'Word wrap" is enabled:VladSh wrote:Unfortunately I do not know.
I think this is a bug. But whose?..
AkelPad.SendMessage(hEditWnd, 3241 /*AEM_GETWORDWRAP*/, 0, 0).
If is > 0, then "Word wrap" is enabled.
To switch the "Word wrap" serves the function:
AkelPad.Command(4209 /*IDM_VIEW_WORDWRAP*/).
-
Offline
- Posts: 767
- Joined: Mon Sep 28, 2009 10:03 am
- Location: Minsk, Belarus
Update HTMLTidy.js v1.1
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
Try TextMoveLeftRight_.js script, which moves the selected text horizontally.
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
Something like this has been.KDJ wrote:Try TextMoveLeftRight.js script, which moves the selected text horizontally.
But these few uses, as there are Tab / Shift+Tab and Space / Shift+Space, that work even with the vertical selection.
-
Offline
- Posts: 1949
- Joined: Sat Mar 06, 2010 7:40 pm
- Location: Poland
Purpose of these two scripts is completely different.VladSh wrote:Something like this has been.
But these few uses, as there are Tab / Shift+Tab and Space / Shift+Space, that work even with the vertical selection.
ShiftRight.js adds spaces to the left of the line.
TextMoveLeftRight.js adds nothing to the text, only part of it moves.
Does not work with columnar selection, because it would make a confusion in the text.
-
Offline
- Posts: 3234
- Joined: Wed Nov 29, 2006 1:19 pm
- Location: Киев, Русь
- Contact:
Yeah, understood. Thanks for the clarification.KDJ wrote:only part of it moves
But easier to just cut and paste the text wherever necessary.
This would make sense just for the block selection, as the exchange of vertical blocks.
P.S. By the way for cases where there is no attempt to capture or move to the next line is not necessary to disable the function SmartSel::NoSelEOL.
-
Offline
- Posts: 767
- Joined: Mon Sep 28, 2009 10:03 am
- Location: Minsk, Belarus
как-то задумался, а можно ли создать скрипт интерактивного цветоселектора со вставкой кода цвета в редактор наподобие этого или у script plugin не хватит возможностей?
p.s.: на самый крайний случай сгодится диалог выбора цвета из windows
p.s.: на самый крайний случай сгодится диалог выбора цвета из windows