Scripts discussion (1)

Discuss and announce AkelPad plugins
Locked
  • Author
  • Message
Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Post by VladSh »

se7h, Здорово!
Но теперь команды слева стало находить, а страницу не открывает..

И неплохо было бы задать проверку на существование на диске ChmKw.exe, и если нет - скорректировать строку поиска, хотя бы чтобы как раньше искало в корне..

Offline
Posts: 767
Joined: Mon Sep 28, 2009 10:03 am
Location: Minsk, Belarus

Post by se7h »

Но теперь команды слева стало находить, а страницу не открывает..
обнови файлы справки

ChmKw.exe необходимая часть скрипта, наличие которой строго обязательно и если её нет - ищите :lol:

hh.exe я забыл как страшный сон

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Post by VladSh »

se7h wrote:ChmKw.exe необходимая часть скрипта, наличие которой строго обязательно
Ок, сообщи об этом в скрипте, т.к. он молчит как партизан ))

И ещё микро-баг: я выделил слово самостоятельно, а потом вызвал справку, так вот если слово выделенное есть, то не надо сбрасывать его выделение, т.е. скрипт за меня не должен это решать: если мне не нужно выделение, то я не буду выделять, а нажму вызов справки на слове, иначе - выделение нужно.

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

Post by KDJ »

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?

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Post by VladSh »

KDJ
Unfortunately I do not know.
I think this is a bug. But whose?..

By the way, I noticed that when working with this script I have from time to time by itself is turned off this option ("Wrap words").

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

Post by KDJ »

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.

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

Post by KDJ »

I corrected the script LinesMoveUpDown.js.
With the help of Instructor, this script now works correctly with column selection.

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

Post by KDJ »

VladSh wrote:Unfortunately I do not know.
I think this is a bug. But whose?..
I found other way to check whether the 'Word wrap" is enabled:
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

Post by se7h »

Update HTMLTidy.js v1.1

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

Post by KDJ »

Try TextMoveLeftRight_.js script, which moves the selected text horizontally.

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Post by VladSh »

KDJ wrote:Try TextMoveLeftRight.js script, which moves the selected text horizontally.
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.

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

Post by KDJ »

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.
Purpose of these two scripts is completely different.
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:

Post by VladSh »

KDJ wrote:only part of it moves
Yeah, understood. Thanks for the clarification.
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

Post by se7h »

как-то задумался, а можно ли создать скрипт интерактивного цветоселектора со вставкой кода цвета в редактор наподобие этого или у script plugin не хватит возможностей?

p.s.: на самый крайний случай сгодится диалог выбора цвета из windows

Offline
Posts: 876
Joined: Tue Jul 24, 2007 8:54 am

Post by Fr0sT »

se7h
по идее есть стандартный виндовый диалог выбора цвета. Так что ничего сложного на первый взгляд.
Locked