View previous topic :: View next topic |
Author |
Message |
Egor
Joined: 26 Nov 2011 Posts: 30
|
Posted: Wed May 28, 2014 11:58 am Post subject: |
|
|
FeyFre wrote: | единственный легальный способ про имитировать ввод это функция SendInput. |
А можете показать пример, как это использовать в скриптах для AkelPad? Просто интересно, вдруг пригодится… |
|
Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1929 Location: Poland
|
Posted: Sat Jun 14, 2014 9:55 pm Post subject: |
|
|
InputBox_function.js
Added: scaling the window for DPI of screen. |
|
Back to top |
|
 |
DV
Joined: 16 Nov 2006 Posts: 1015 Location: Kyiv, Ukraine
|
Posted: Wed Jun 18, 2014 2:32 pm Post subject: |
|
|
Вопрос то ли по скрипту 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 |
|
Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1929 Location: Poland
|
Posted: Wed Jun 18, 2014 10:40 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 6250
|
Posted: Thu Jun 19, 2014 2:50 pm Post subject: |
|
|
DV
SearchReplace.js обновлен. |
|
Back to top |
|
 |
DV
Joined: 16 Nov 2006 Posts: 1015 Location: Kyiv, Ukraine
|
Posted: Thu Jun 19, 2014 6:19 pm Post subject: |
|
|
Instructor,
Так теперь правильно использовать \1 вместо $1 ?
В документации плагина Log сплошные $1, $2 и т.д. |
|
Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1929 Location: Poland
|
Posted: Thu Jun 19, 2014 8:38 pm Post subject: |
|
|
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. |
|
Back to top |
|
 |
Instructor Site Admin
Joined: 06 Jul 2006 Posts: 6250
|
Posted: Fri Jun 20, 2014 8:59 am Post subject: |
|
|
DV
Поправлено. |
|
Back to top |
|
 |
FeyFre
Joined: 07 Aug 2007 Posts: 2240 Location: Vinnitsa, Ukraine
|
Posted: Fri Jun 20, 2014 3:54 pm Post subject: |
|
|
KDJ
In AkelPadDocsView.js line 1245
Code: | 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 |
|
Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1929 Location: Poland
|
Posted: Fri Jun 20, 2014 8:20 pm Post subject: |
|
|
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/aa752040%28v=vs.85%29.aspx
Is this:
var oWB = new ActiveXObject("Shell.Explorer.2");
creates "WebBrowser Control" object? |
|
Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1929 Location: Poland
|
Posted: Fri Jun 20, 2014 9:46 pm Post subject: |
|
|
AkelPadManualSettings.js
Added:
- button "Undo changes",
- scaling dialog window to DPI of screen.
Updated for AkelPad 4.8.9. |
|
Back to top |
|
 |
FeyFre
Joined: 07 Aug 2007 Posts: 2240 Location: Vinnitsa, Ukraine
|
Posted: Sat Jun 21, 2014 9:08 am Post subject: |
|
|
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). |
|
Back to top |
|
 |
KDJ
Joined: 06 Mar 2010 Posts: 1929 Location: Poland
|
Posted: Sat Jun 21, 2014 7:53 pm Post subject: |
|
|
FeyFre
Unfortunately, it does not work: Code: | var oWB = new ActiveXObject("Shell.Explorer.2");
oWB.Visible = true;
oWB.Navigate("about:blank");
oWB.Width = 300;
oWB.Height = 200; |
|
|
Back to top |
|
 |
FeyFre
Joined: 07 Aug 2007 Posts: 2240 Location: Vinnitsa, Ukraine
|
Posted: Sat Jun 21, 2014 9:16 pm Post subject: |
|
|
KDJ
I shall try it later. I actually never worked with it in JScript. Only in native C++. |
|
Back to top |
|
 |
Skif_off
Joined: 20 Oct 2013 Posts: 1114
|
Posted: Sun Jun 22, 2014 6:55 pm Post subject: |
|
|
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 |
|
Back to top |
|
 |
|