Scripts discussion (2)

Discuss and announce AkelPad plugins
Locked
  • Author
  • Message
Offline
Site Admin
Posts: 6403
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »


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

Post by Infocatcher »


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

Post by KDJ »

FeyFre
I've done, as you suggested: FileStreams_functions.js
Can you test this on Win-Vista or Win-7?

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

Post by FeyFre »

KDJ, no can do. I'm still using XP and have not any Vista/7 in my reach range.
But I have analysed changes and have a notices:
You checking only major OS version(if >5 then FindFirstStreamW is present) which define set of Vista,7,2008,8, but You missed 2003(major=5 and minor=2).
Second: code

Code: Select all

var lpFindStream = AkelPad.MemAlloc(8 + (260 + 36) * _TSIZE);
must be changed into

Code: Select all

var lpFindStream = AkelPad.MemAlloc(8 + (260 + 36) * 2);
e.g. hardcode 2 instead of _TSIZE since you explicitly use Unicode variant of function (suffix W means _TSIZE == 2)

In any case Good Work! You almost did what I planned to do for few months.

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Post by VladSh »

Instructor
Хотелось бы понять, каким образом можно использовать
Instructor wrote:Добавлено: метод AkelPad.GetEditDoc - определить дескриптор активного документа.
Andrey_A_A
Instructor wrote:Изменено: переключение между командами 4212, 4213, 4214 осуществляется без промежуточного отключения разделения окна.
Возможно и не из-за этого. но SwitchSplittedWindow.vbs завалился.
Last edited by VladSh on Fri Nov 18, 2011 8:37 am, edited 1 time in total.

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

Post by KDJ »

ResetUrlDelimiters.js
ResetUrlPrefixes.js
InsertTabOrSpaces.js
WordsMoveSelect.js
Scripts have been adapted to AkelPad version 4.7.0.

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

Post by KDJ »

FeyFre
Thank you for checking the script code (FileStreams_functions.js).
Errors corrected.

Offline
Posts: 670
Joined: Thu Jun 03, 2010 8:47 am
Location: Сочи, Хоста
Contact:

Post by Andrey_A_A »


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

Post by KDJ »

FileStreams_functions.js
Added: function IsFileStreamExists().
Added: example of deleting stream.

Offline
Posts: 767
Joined: Mon Sep 28, 2009 10:03 am
Location: Minsk, Belarus

Post by se7h »

Infocatcher wrote:
se7h wrote:а что если создать один скрипт (вилку), который бы вызывал нужный форматтер определяя тип ...
Пожалуй, и правда пора делать гуёвину. Собственно, уже начал делать, но это довольно занудно, так что скоро ждать не стоит. :)
как дела с гуёвиной? ;)

Offline
Posts: 3234
Joined: Wed Nov 29, 2006 1:19 pm
Location: Киев, Русь
Contact:

Post by VladSh »

Вопрос по "определению символа(-ов) сдвига из настроек" снимается, - спасибо KDJ.

Откорректирован selCompleteLine.js.

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

Post by Infocatcher »

se7h wrote:как дела с гуёвиной? ;)
Да как-то вяло, если честно.
Сначала было не определиться с внешним видом, а потом стало некогда.
Сейчас вот еще выяснилось, что с вкладками не все так просто (вылезает фон другого цвета).

Offline
Posts: 767
Joined: Mon Sep 28, 2009 10:03 am
Location: Minsk, Belarus

Post by se7h »

Infocatcher
всё-равно выглядит неплохо, пора делать пре-релиз :)

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

Post by Instructor »

VladSh, KDJ

Code: Select all

var hMainWnd=AkelPad.GetMainWnd();
var bTabStopAsSpaces;

bTabStopAsSpaces=AkelPad.SendMessage(hMainWnd, 1223 /*AKD_GETFRAMEINFO*/, 52 /*FI_TABSTOPASSPACES*/, 0);

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

Post by KDJ »

Instructor
Thanks for the hint. It is more simple.
But I need also to change bTabStopAsSpaces value in FRAMEDATA structure:
AkelPad.MemCopy(lpFrame + nOffset, (! bTabStopAsSpaces), DT_DWORD);
It would be good something like that:
AkelPad.SendMessage(hMainWnd, n /*AKD_SETFRAMEDATA*/, 52 /*FI_TABSTOPASSPACES*/, (! bTabStopAsSpaces), 0);
Locked