AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Scripts discussion (3)
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 10, 11, 12  Next
 
Post new topic   Reply to topic    AkelPad Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Egor



Joined: 26 Nov 2011
Posts: 30

PostPosted: Wed May 28, 2014 11:58 am    Post subject: Reply with quote

FeyFre wrote:
единственный легальный способ про имитировать ввод это функция SendInput.

А можете показать пример, как это использовать в скриптах для AkelPad? Просто интересно, вдруг пригодится…
Back to top
View user's profile Send private message Send e-mail
KDJ



Joined: 06 Mar 2010
Posts: 1325
Location: Poland

PostPosted: Sat Jun 14, 2014 9:55 pm    Post subject: Reply with quote

InputBox_function.js
Added: scaling the window for DPI of screen.
Back to top
View user's profile Send private message
DV



Joined: 16 Nov 2006
Posts: 830
Location: Kyiv, Ukraine

PostPosted: Wed Jun 18, 2014 2:32 pm    Post subject: Reply with quote

Вопрос то ли по скрипту 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
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1325
Location: Poland

PostPosted: Wed Jun 18, 2014 10:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5293

PostPosted: Thu Jun 19, 2014 2:50 pm    Post subject: Reply with quote

DV
SearchReplace.js обновлен.
Back to top
View user's profile Send private message Send e-mail
DV



Joined: 16 Nov 2006
Posts: 830
Location: Kyiv, Ukraine

PostPosted: Thu Jun 19, 2014 6:19 pm    Post subject: Reply with quote

Instructor,
Так теперь правильно использовать \1 вместо $1 ?
В документации плагина Log сплошные $1, $2 и т.д.
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1325
Location: Poland

PostPosted: Thu Jun 19, 2014 8:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5293

PostPosted: Fri Jun 20, 2014 8:59 am    Post subject: Reply with quote

DV
Поправлено.
Back to top
View user's profile Send private message Send e-mail
FeyFre



Joined: 07 Aug 2007
Posts: 2034
Location: Vinnitsa, Ukraine

PostPosted: Fri Jun 20, 2014 3:54 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
KDJ



Joined: 06 Mar 2010
Posts: 1325
Location: Poland

PostPosted: Fri Jun 20, 2014 8:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1325
Location: Poland

PostPosted: Fri Jun 20, 2014 9:46 pm    Post subject: Reply with quote

AkelPadManualSettings.js
Added:
- button "Undo changes",
- scaling dialog window to DPI of screen.
Updated for AkelPad 4.8.9.
Back to top
View user's profile Send private message
FeyFre



Joined: 07 Aug 2007
Posts: 2034
Location: Vinnitsa, Ukraine

PostPosted: Sat Jun 21, 2014 9:08 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
KDJ



Joined: 06 Mar 2010
Posts: 1325
Location: Poland

PostPosted: Sat Jun 21, 2014 7:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
FeyFre



Joined: 07 Aug 2007
Posts: 2034
Location: Vinnitsa, Ukraine

PostPosted: Sat Jun 21, 2014 9:16 pm    Post subject: Reply with quote

KDJ
I shall try it later. I actually never worked with it in JScript. Only in native C++.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Skif_off



Joined: 20 Oct 2013
Posts: 268

PostPosted: Sun Jun 22, 2014 6:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Plugins All times are GMT
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 10, 11, 12  Next
Page 7 of 12

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group