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 (2)
Goto page Previous  1, 2, 3 ... 69, 70, 71 ... 94, 95, 96  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    AkelPad Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Infocatcher



Joined: 06 Aug 2007
Posts: 1646

PostPosted: Sat Mar 02, 2013 5:09 pm    Post subject: Reply with quote

converter.js
Add -test argument (speed test)
Add escape()/unescape() ability
Improve description for converters
Add F1 hotkey to show "help"
Back to top
View user's profile Send private message Visit poster's website
KDJ



Joined: 06 Mar 2010
Posts: 1437
Location: Poland

PostPosted: Sat Mar 02, 2013 5:43 pm    Post subject: Reply with quote

AkelEdit.h wrote:
AEM_SETRECT
...
(RECT *)lParam == pointer to a RECT structure that specifies the new dimensions of the rectangle. If this parameter is NULL, the formatting rectangle is set to its default values.

AkelPad crashes when executing the following:
Code:
AkelPad.SendMessage(AkelPad.GetEditWnd(), 3178 /*AEM_SETRECT*/, 1 /*AERC_UPDATE*/, 0);
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1437
Location: Poland

PostPosted: Sat Mar 02, 2013 10:25 pm    Post subject: Reply with quote

Translator.js
Improved function listening the text - now there is no limit to 100 characters.
Added border to the active edit window.
Fixed an error in the file Translator.ini.
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1437
Location: Poland

PostPosted: Wed Mar 06, 2013 7:51 pm    Post subject: Reply with quote

Translator.js
Improved "Listen" function for long texts.
Added "Listen" to the context menu.
Added hotkeys:
Ctrl+L - listen entire text from active edit panel,
Ctrl+Shift+L - listen selected text from active edit panel.
Back to top
View user's profile Send private message
akkorn



Joined: 08 Feb 2013
Posts: 39

PostPosted: Thu Mar 07, 2013 6:05 am    Post subject: Reply with quote

Подскажите пожалуйста, как можно получить/ задать текст определенной вкладке (например, вкладке с номером 2)? hWnd вкладки тоже известен.
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5507

PostPosted: Thu Mar 07, 2013 6:16 am    Post subject: Reply with quote

KDJ
Code:
AkelPad.SendMessage(AkelPad.GetEditWnd(), 3178 /*AEM_SETRECT*/, 1 /*AERC_UPDATE*/, 0);
Fixed.
Back to top
View user's profile Send private message Send e-mail
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5507

PostPosted: Thu Mar 07, 2013 6:19 am    Post subject: Reply with quote

akkorn
Переключиться на вкладку (AKD_FRAMEACTIVATE), если не активна, и использовать AkelPad.SetSel, AkelPad.ReplaceSel, AkelPad.GetSelText, AkelPad.GetTextRange.
Back to top
View user's profile Send private message Send e-mail
akkorn



Joined: 08 Feb 2013
Posts: 39

PostPosted: Thu Mar 07, 2013 6:33 am    Post subject: Reply with quote

Instructor wrote:
akkorn
Переключиться на вкладку (AKD_FRAMEACTIVATE), если не активна, и использовать AkelPad.SetSel, AkelPad.ReplaceSel, AkelPad.GetSelText, AkelPad.GetTextRange.


А без визуального переключения?

Задача стоит- найти во всех вкладках сочетание символов (напр. "asd") и вывести номера вкладок в msgbox. при этом хотелось бы,что бы интерфейс не "прыгал".

Спасибо.
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5507

PostPosted: Thu Mar 07, 2013 6:45 am    Post subject: Reply with quote

akkorn
Без переключения будет работать только в MDI: используем AKD_FRAMEFIND для перебора вкладок, получаем FI_WNDEDIT с помощью AKD_GETFRAMEINFO и передаем дескриптор окна редактирования в TextFind.
Back to top
View user's profile Send private message Send e-mail
akkorn



Joined: 08 Feb 2013
Posts: 39

PostPosted: Thu Mar 07, 2013 7:21 am    Post subject: Reply with quote

Instructor wrote:
akkorn
Без переключения будет работать только в MDI: используем AKD_FRAMEFIND для перебора вкладок, получаем FI_WNDEDIT с помощью AKD_GETFRAMEINFO и передаем дескриптор окна редактирования в TextFind.


А как можно проверить, использует ли пользователь MDI режим?
Back to top
View user's profile Send private message
Infocatcher



Joined: 06 Aug 2007
Posts: 1646

PostPosted: Thu Mar 07, 2013 7:38 am    Post subject: Reply with quote

akkorn
AkelFiles\Docs\Scripts-Rus.txt wrote:
Code:
AkelPad.IsMDI
_____________

Проверить использование многооконного режима (MDI).

  IsMDI();

Возвращаемое значение
  0  //WMD_SDI   Одноконный режим (SDI).
  1  //WMD_MDI   Многооконный режим (MDI).
  2  //WMD_PMDI  Псевдо-многооконный режим (PMDI).

Пример:
  var nMDI=AkelPad.IsMDI();
Back to top
View user's profile Send private message Visit poster's website
akkorn



Joined: 08 Feb 2013
Posts: 39

PostPosted: Thu Mar 07, 2013 9:31 am    Post subject: Reply with quote

Infocatcher
Спасибо, все получилось.

Скажите, а как можно получить весь текст определенной вкладки? Везде требуется диапазон, а нам он как раз не известен..


Last edited by akkorn on Mon Mar 11, 2013 5:00 am; edited 2 times in total
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1437
Location: Poland

PostPosted: Thu Mar 07, 2013 7:02 pm    Post subject: Reply with quote

akkorn
Read AkelPad sources: http://sourceforge.net/projects/akelpad/files/AkelPad%204/4.8.1/AkelPad-4.8.1-src.zip/download?use_mirror=switch&download=
AkelDLL.h wrote:
#define AKD_GETTEXTLENGTH (WM_USER + 161)

WM_USER = 1024 (hex 0x400): http://msdn.microsoft.com/pl-pl/library/windows/desktop/ms644931%28v=vs.85%29.aspx
Back to top
View user's profile Send private message
FeyFre



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

PostPosted: Thu Mar 07, 2013 7:29 pm    Post subject: Reply with quote

akkorn, используй AkelPad.Include("win32\user32.js") там есть все константы используемые для работы с пользовательской частью WINAPI
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
KDJ



Joined: 06 Mar 2010
Posts: 1437
Location: Poland

PostPosted: Thu Mar 07, 2013 9:23 pm    Post subject: Reply with quote

akkorn wrote:
Скажите, а как можно получить весь текст определенной вкладки? Везде требуется диапазон, а нам он как раз не известен..

The following code (GetTextFromTab.js) works in MDI and PMDI mode:
Code:
if (AkelPad.IsMDI() > 0) //MDI or PMDI
{
  var nTab = 2; //zero-based tab index
  var hMainWnd = AkelPad.GetMainWnd();
  var lpFrameTab = AkelPad.SendMessage(hMainWnd, 1290 /*AKD_FRAMEFINDW*/, 8 /*FWF_BYTABINDEX*/, nTab);

  if (lpFrameTab)
  {
    AkelPad.SendMessage(hMainWnd, 11 /*WM_SETREDRAW*/, false, 0);
    var lpFrameCur = AkelPad.SendMessage(hMainWnd, 1285 /*AKD_FRAMEACTIVATE*/, 0, lpFrameTab);
    var sText = AkelPad.GetTextRange(0, -1);
    AkelPad.SendMessage(hMainWnd, 1285 /*AKD_FRAMEACTIVATE*/, 0, lpFrameCur);
    AkelPad.SendMessage(hMainWnd, 11 /*WM_SETREDRAW*/, true, 0);
    WScript.Echo(sText.substr(0, 50000));
  }
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    AkelPad Forum Index -> Plugins All times are GMT
Goto page Previous  1, 2, 3 ... 69, 70, 71 ... 94, 95, 96  Next
Page 70 of 96

 
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