Scripts discussion (3)

Discuss and announce AkelPad plugins
Locked
  • Author
  • Message
DV
Offline
Posts: 1250
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Post by DV »

Вопрос то ли по скрипту SearchReplace.js, то ли по плагину Log...
Наблюдаю у себя такое поведение, что кнопка Find All правильно находит все вхождения и отображает их в окне Log::Output, да только двойной клик в панели Log::Output ничего не делает. Что-то не соображу, в чём может быть дело.
Создаём текстовый файл со следующим содержимым:
1234
1234
1234
Вызываем SearchReplace.js, вводим искомый текст: 23, выбираем Direction = Beginning, все остальные чек-боксы неотмечены, нажимаем кнопку Find All.
В окне Log::Output видим:
3:
(1,2) 1234
(2,2) 1234
(3,2) 1234
Однако при двойном клике по любой из строк каретка перемещается в самое начало файла.


Обновлено:
Кажется, нашёл, в чём дело:
"Log::Output" с "/GOTOLINE=$1:$2" - не работает
"Log::Output" с "/GOTOLINE=\\1:\\2" - работает.
Last edited by DV on Thu Jun 19, 2014 2:02 pm, edited 1 time in total.

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

Post by KDJ »

AkelPadDocsView.js
Added: scaling dialog window to DPI of screen.
Changed: "AkelHelp-*.htm" has been moved to the documents list. Internet Explorer window is now embedded in the script dialog.
Changed: option "Run in separate window" does not require a script restart.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

DV
SearchReplace.js обновлен.

DV
Offline
Posts: 1250
Joined: Thu Nov 16, 2006 11:53 am
Location: Kyiv, Ukraine

Post by DV »

Instructor,
Так теперь правильно использовать \1 вместо $1 ?
В документации плагина Log сплошные $1, $2 и т.д.

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

Post by KDJ »

AkelPadMethodsView.js
Added: scaling dialog window to DPI of screen.
Changed: option "Run in separate window" does not require a script restart.
Fixed: run time error when changing language.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

DV
Поправлено.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

KDJ
In AkelPadDocsView.js line 1245

Code: Select all

    AkelPad.MessageBox(hDlg, sTxtDlgTitle, sTxtNoIE, 0x30 /*MB_ICONWARNING*/);
Swap 2nd and 3rd arguments.
By the way, I am at Windows XP( not 7), using main Administrator account and getting popping this message.
By the way, for more info you should print oError.message and oError.number. It gives more useful information.
I getting error number 0x800A01CE (-2146827826) "Компьютер удаленного сервера не существует или недоступен"
( In my case I had no running service identified "DcomLaunch" which is require to instantiate COM objects implemented as Local Server )


As for embedding IE into windows application. There is special control for this purpose. Its ProgId "Shell.Explorer.2" Its interface described in the same TypeLib as used by you "InternetExplorer.Application" in %SystemRoot%\system32\shdocvew.dll

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

Post by KDJ »

AkelPadDocsView.js
Added: description of error, if unable to run Internet Explorer.
Added: option "Open/close file in AkelPad" in context menu on documents list (also double click on document name).
Changed: hotkeys Ctrl+Ins -> Alt+C, Ctrl+Shift+Ins -> Shift+Alt+C,
Fixed: minor bugs.
---------
FeyFre
Thank you for the valuable comments.
Where can I find documentation for "Shell.Explorer.2" object? On msdn I have not found.
Some forums refer to "WebBrowser Control": http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Is this:
var oWB = new ActiveXObject("Shell.Explorer.2");
creates "WebBrowser Control" object?

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

Post by KDJ »

AkelPadManualSettings.js
Added:
- button "Undo changes",
- scaling dialog window to DPI of screen.
Updated for AkelPad 4.8.9.

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

KDJ
Yes, "WebBrowser Control" is control I mentioned. "Shell.Explorer.2" is so called ProgId - human-oriented synonym for COM Component which can be used in COM/OLE syscalls . System knows components by its CLSID({xxxxxxxx-....} 128bit value).

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

Post by KDJ »

FeyFre
Unfortunately, it does not work:

Code: Select all

var oWB = new ActiveXObject("Shell.Explorer.2");
oWB.Visible = true;
oWB.Navigate("about:blank");
oWB.Width  = 300;
oWB.Height = 200;

Offline
Posts: 2247
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

KDJ
I shall try it later. I actually never worked with it in JScript. Only in native C++.

Offline
Posts: 1161
Joined: Sun Oct 20, 2013 11:44 am

Post by Skif_off »

Infocatcher, а почему в скрипте deleteCurrentFile.js вы не используете команды 4324 и 4318 перед удалением файла, как у VladSh?

И еще вопрос по jsBeautifier.js:
как сделать так, чтобы внутри тега
<binary id="..." content-type="...">...</binary>
скрипт ничего не трогал? Ну или собирал все в одну строку (совсем в одну - т.е. не заменяя перевод строк пробелами), сейчас скрипт собирает в три столбца.
Last edited by Skif_off on Sun Jun 22, 2014 8:14 pm, edited 2 times in total.

Offline
Posts: 1862
Joined: Mon Aug 06, 2007 1:07 pm
Contact:

Post by Infocatcher »

Skif_off
Потому что изначально спрашивали без закрытия:
%username%, 10.08.2013 14:35:08:
а не знаешь, как в акелпада сделать бы кнопку для удаления открытого файла (без закрытия вкладки)?

Offline
Posts: 1161
Joined: Sun Oct 20, 2013 11:44 am

Post by Skif_off »

Infocatcher
Понял, теперь я стал Буридановым ослом :)

С jsBeautifier.js разобрался: проглядел -unformattedTags=[""].

З.Ы. Круто, фтопку Notepad++ с его XML Tools, надоело вручную поправлять после него и скакать между редакторами :)
Locked