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 (4)
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    AkelPad Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
YuS



Joined: 15 Sep 2013
Posts: 424

PostPosted: Fri Feb 24, 2017 3:46 pm    Post subject: Reply with quote

opk44 wrote:
Не обязательно вторая, но и первая цифра тоже может оказаться двузначной (9.6-10.2).

Угу, вариативность должна быть заранее оговорена...
По-хорошему, правильнее было бы создать два счетчика и уточнить зависимость увеличения левого числа при достижении максимума (?) правого... тогда проще было бы алгоритм сварганить...
Back to top
View user's profile Send private message
InFive



Joined: 10 Nov 2015
Posts: 77

PostPosted: Sun Feb 26, 2017 11:58 am    Post subject: Reply with quote

KDJ
regarding the script TextReplace.js

I have prepared a batch file, which contains the rules of 2697 replacements. in the document and in batch file all on one item, you just need to make adjustment in the text. but when I use your batch file, then displays the result that replacements was 2720 ... in the batch file duplicates no, the original document that I need to handle, was generated automatically and repeats is absolutely excluded.

so the question is-can you do the opportunity to show the detailed result that would contain info what and where was replaced?



относительно скрипта TextReplace.js

я подготовил batch-файл, в нем 2697 правил замен, в документе и в batch файле всё по одному элементу, нужно просто сделать перестановки в тексте... но когда я применяю свой batch файл, то результат выдает, что замен было сделано 2720... в batch файле повторов нету, исходный документ, который нужно обработать, был сгенерирован автоматически и повторы абсолютно исключены...

поэтому вопрос - можно ли прикрутить возможность, чтобы выводился подробнй результат, который бы содержал инфу, что и где было заменено?
Back to top
View user's profile Send private message
InFive



Joined: 10 Nov 2015
Posts: 77

PostPosted: Tue Apr 11, 2017 9:20 pm    Post subject: Reply with quote

пожалуйста, сделайте кто-нить скрипт по конвертированию римских цифр в арабские...
Back to top
View user's profile Send private message
Diamen



Joined: 15 Aug 2008
Posts: 57

PostPosted: Sat May 20, 2017 10:26 am    Post subject: Reply with quote

deleted.

Last edited by Diamen on Sun May 21, 2017 4:59 pm; edited 16 times in total
Back to top
View user's profile Send private message
Diamen



Joined: 15 Aug 2008
Posts: 57

PostPosted: Sat May 20, 2017 3:11 pm    Post subject: go end line Reply with quote

Do it is possible to go end line (wrapped and not line) programmatically?
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1919
Location: Poland

PostPosted: Mon May 22, 2017 6:14 pm    Post subject: Reply with quote

Diamen wrote:
deleted.

Why you deleted the post about WM_COPYDATA?
This topic is interesting.
If you have solved the problem himself, you could share with us of the the results.

Diamen wrote:
Do it is possible to go end line (wrapped and not line) programmatically?

Examples:
Code:
//Go to end of wrapped line:
var hWndEdit       = AkelPad.GetEditWnd();
var nCaretOffset   = AkelPad.SendMessage(hWndEdit, 3138 /*AEM_GETRICHOFFSET*/, 5 /*AEGI_CARETCHAR*/, 0);
var nLineEndOffset = AkelPad.SendMessage(hWndEdit, 3138 /*AEM_GETRICHOFFSET*/, 17 /*AEGI_LINEEND*/, nCaretOffset);

AkelPad.SetSel(nLineEndOffset, nLineEndOffset);

Code:
//Go to end of unwrapped line:
var hWndEdit       = AkelPad.GetEditWnd();
var nCaretOffset   = AkelPad.SendMessage(hWndEdit, 3138 /*AEM_GETRICHOFFSET*/, 5 /*AEGI_CARETCHAR*/, 0);
var nLineEndOffset = AkelPad.SendMessage(hWndEdit, 3138 /*AEM_GETRICHOFFSET*/, 19 /*AEGI_WRAPLINEEND*/, nCaretOffset);

AkelPad.SetSel(nLineEndOffset, nLineEndOffset);
Back to top
View user's profile Send private message
Diamen



Joined: 15 Aug 2008
Posts: 57

PostPosted: Mon May 22, 2017 6:36 pm    Post subject: Reply with quote

Excuse me, i have posted code in the collection.
Back to top
View user's profile Send private message
Sugars



Joined: 18 Jan 2015
Posts: 4

PostPosted: Mon Jun 05, 2017 5:16 pm    Post subject: Reply with quote

Подскажите как можно отслеживать нажатие клавиш?
Мне необходимо в скрипте получить последнее нажатие, далее я делаю некое преобразование в тексте и повторно его нажимаю.
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 6223

PostPosted: Sat Jun 10, 2017 10:36 am    Post subject: Reply with quote

Sugars
Это непросто, начиная с постановки задачи и заканчивая реализацией. Лучше сформулировать другое ТЗ Smile
Back to top
View user's profile Send private message Send e-mail
Diamen



Joined: 15 Aug 2008
Posts: 57

PostPosted: Sat Jun 17, 2017 10:43 am    Post subject: F3 string setting Reply with quote

Do it is possible to set programmatically the string to search when is pressed F3 key?
Back to top
View user's profile Send private message
c-sanchez



Joined: 04 Feb 2016
Posts: 49

PostPosted: Sat Jun 17, 2017 4:52 pm    Post subject: Reply with quote

How?
By default with Ctrl+F you call the Find dialog, and with F3 you find the next occurrence. I think so is ok.
But if you want call the Find dialog with F3 then set a shortcut key with Hotkeys plugin.
Options > Plugins (Alt+P) > Hotkeys::Main >
Set something like this
Back to top
View user's profile Send private message
Diamen



Joined: 15 Aug 2008
Posts: 57

PostPosted: Sat Jun 17, 2017 4:54 pm    Post subject: Reply with quote

ty, But I asked for something else.

I would to js script f.e.
setSearchString("test");
and then when press F3
search for "test".
Back to top
View user's profile Send private message
Diamen



Joined: 15 Aug 2008
Posts: 57

PostPosted: Sat Jun 17, 2017 5:53 pm    Post subject: Reply with quote

In terms of performance and resource management It's best to use HotKeys plugin to run the same script with multiple functions or Launch a memory resident script that manages the pressed keys with WindowGetMessage?
Back to top
View user's profile Send private message
Sugars



Joined: 18 Jan 2015
Posts: 4

PostPosted: Sat Jun 17, 2017 7:53 pm    Post subject: Reply with quote

Instructor wrote:
Sugars
Это непросто, начиная с постановки задачи и заканчивая реализацией. Лучше сформулировать другое ТЗ Smile

Было бы просто - не спрашивал бы, ну ладно... решил сторонней программой...

KDJ у вас есть скрипт EditControlTest.js , не могли ли вы сделать то же самое на vbs - у меня не получается и вообще нет ни одного подобного примера на vbs с использованием DialogCallback(hWnd, uMsg, wParam, lParam)
Back to top
View user's profile Send private message
Diamen



Joined: 15 Aug 2008
Posts: 57

PostPosted: Sun Jun 18, 2017 11:27 am    Post subject: Reply with quote

do it is possible to use "RegisterHotKey" ?
i get a error 1408: "Invalid window; it belongs to other thread"
I read this but not is clear.
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, 4, 5  Next
Page 4 of 5

 
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