Scripts discussion (1)

Discuss and announce AkelPad plugins
Locked
  • Author
  • Message
KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

kadvlad
InsertTextLN.js script works correctly in AkelPad versions ranging from 4.4.4.
You must update AkelPad, preferably to the latest version 4.4.6.

Offline
Posts: 27
Joined: Sun Mar 16, 2008 10:26 pm

Post by kadvlad »

KDJ,
thanks for reply.

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

Post by KDJ »

In the script CSVToColumnText.js, I added the possibility to stop working with long texts and save settings to .ini file.

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

Post by KDJ »

I have a question.
How does during execution of the script, read what the key was pressed?
For example, in while loop or for loop.

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

Post by Instructor »

KDJ

Code: Select all

var nTimeout=5000;
var i;

while (nTimeout > 0)
{
  if (AkelPad.SystemFunction().Call("User32::GetKeyState", 0x70 /*VK_F1*/) < 0)
  {
    WScript.Echo("F1 pressed");
    break;
  }
  WScript.Sleep(100);
  nTimeout-=100;
}

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

Post by KDJ »

Instructor
Thank you very much.
I used it in the script CSVToColumnText.js to break the loop (Esc key).
Instead the function GetKeyState, I used GetAsyncKeyState function.
In this case, GetKeyState not work correctly.

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

Post by KDJ »

Changes in the script InsertTextLN.js:
- improved numbering of the lines,
- saves settings to .ini file instead to registry,
- shortened script code.

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

Post by Instructor »

FeyFre
zen_coding
Чтобы текст не скролился в zen_editor.js, функцию getContent можно представить следующим образом:

Code: Select all

		getContent: function(){
			return context.GetTextRange(0, -1);
		},

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

Post by FeyFre »

Instructor, thx, fixed.

zen-coding updated

1. Fixes in zen_editor and in zen itself.
2. Implemeted zen_file interface.

Offline
Posts: 267
Joined: Mon Mar 12, 2007 3:45 pm

Post by [Yustas.NeO] »

ShiftMarker.js

Последний раз редактировалось: Instructor (Чт, 16 Сен 2010; 05:33)
Отлично! Спасибо! Теперь не только показывает изменения в статусбаре, но и само значение стало сохраняться после перезапуска и маркер не "уползает" в минус :)

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

Post by se7h »

FeyFre wrote:Instructor, thx, fixed.

zen-coding updated

1. Fixes in zen_editor and in zen itself.
2. Implemeted zen_file interface.
хорошая новость, релиз уже не за горами? ;)

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

Post by FeyFre »

se7h
Не могу знать. Я не пользуюсь ЗЕН-ом вообще(нету надобности, работа охватывает другие области), я только его адаптирую к Акелу. Скажите "нашли баг" или "не слишком удобно работает" - пофиксю, скажите "всё норм" - сделаю релиз(собственно никто не мешает делать это самостоятельно, пример я показал). Дело за пользователями.

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

Post by se7h »

VladSh
при создании вкладки из существующей, NewFilebyRecent.js не устанавливает подсветку у новой вкладки

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

Post by VladSh »

se7h
Если файл сохранён, то устанавливает, если нет - тогда нет, т.к. кроме как из расширения, полученного из имени файла, невозможно определить, какая подсветка применена.

P.S. Впрочем такая ошибка действительно была, я делал соотв. корректировки в августе. Точно установлена последняя версия?

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

Post by FeyFre »

se7h
Не забывайте, что собственно подстветка должна быть включена до запуска скрипта, иначе скрипт не подключит ничего.
Locked