я честно списывал со своего transparency.js и честно опустил проверку if(WScript.Arguments.length > 0) - так, на всякий случай.

Code: Select all
AkelPad.Call "Scripts::Main", 2, "WordsMoveSelect.js", "0"
Code: Select all
Function WordsSelect(hWnd)
Dim nBegSel, nEndSel, bSelWord, nBreak1, nBreak2
nBegSel = AkelPad.GetSelStart()
nEndSel = AkelPad.GetSelEnd()
nBreak2 = AkelPad.SendMessage(hWnd, 1100, 7, nBegSel)
nBreak1 = AkelPad.SendMessage(hWnd, 1100, 4, nBreak2)
nBreak2 = AkelPad.SendMessage(hWnd, 1100, 7, nBreak1)
If nBegSel < nBreak2 And nEndSel > nBreak1 Then
nBegSel = nBreak1
End If
If nBegSel = nBreak1 Then
If nBegSel = nEndSel Then
nEndSel = AkelPad.SendMessage(hWnd, 1100, 7, nEndSel)
Else
nBreak1 = AkelPad.SendMessage(hWnd, 1100, 4, nEndSel)
nBreak2 = AkelPad.SendMessage(hWnd, 1100, 7, nBreak1)
nEndSel = nBreak2
End If
End If
AkelPad.SetSel nBegSel, nEndSel
End Function
viewtopic.php?p=13077#p13077us-us wrote:Понадобилась функция выделения слова под курсором, до недавних пор пользовался встроенной в WordMoveSelect.js, но с новыми версиями плагина Scripts он работает некорректно ( в частности, "вешает" поток scripts) при попытке вызвать его из другого скрипта с аргументом "2". То есть такой вот вызовприводит к зависанию.Code: Select all
AkelPad.Call "Scripts::Main", 2, "WordsMoveSelect.js", "0"
Code: Select all
/*
height: 20px; height: 20px;
width: 25px; --> width: 25px;/
*/
Code: Select all
/* height: 20px;*/ --> height: 20px/