Scripts discussion (2)

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 »

Translator.js
Fixed minor bug and improved calling the script with arguments.
The first argument can be set to "auto", which means auto-detection of the source language, eg:
Call("Scripts::Main", 1, "Translator.js", "auto ru").

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

Post by KDJ »

BrowseForFolder_function.js
Added optional argument: dialog box title.
Fixed minor bugs.

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

Post by Instructor »

oSys.Call("Ole32::CoTaskMemFree, lpIDL");

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

Post by Andrey_A_A »

KDJ в скрипте Translator.js появилась кнопка "Прослушать"
но по нажатию на неё создаётся файл Translator.mp3, кнопка мигает и воспроизведения нет. Так и должно быть?

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

Post by KDJ »

Instructor wrote:
oSys.Call("Ole32::CoTaskMemFree, lpIDL");
To find it, you must have eyesight like a falcon.
Thank you very much, fixed.

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

Post by KDJ »

Andrey_A_A wrote:KDJ в скрипте Translator.js появилась кнопка "Прослушать"
но по нажатию на неё создаётся файл Translator.mp3, кнопка мигает и воспроизведения нет. Так и должно быть?
Try new version: Translator.js
I have added error handling when playing mp3 file.
Give me the error number.

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

Post by Andrey_A_A »

KDJ , в новой версии Translator.js выдаёт ошибку:

263: Указанное устройство не открыто или не опознается интерфейсом MCI.

Система Vista

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

Post by KDJ »

Translator.js
Fixed: doesn't work option "Listen" if the path to AkelPad contains spaces.

Andrey_A_A
Try now.

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

Post by Andrey_A_A »

KDJ, спасибо заработало!

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

Post by KDJ »

ChooseFont_function.js
EnumerateWindows_functions.js
FileAndStream_functions.js
Changed: all sub functions that were global, was converted into private functions.

Offline
Posts: 582
Joined: Mon Apr 08, 2013 9:50 pm
Location: Win7SP1x64, APx64

Post by Drugmix »

Could someone, please, edit an existing script DuplicateLines.js a bit?
The thing is that it has 2 issues I don't like:
1. if you select multiple lines and duplicate them - they get duplicated like this:

Code: Select all

a
b
->

Code: Select all

a
a
b
b
instead of desired

Code: Select all

a
b
a
b
2. after execution of this script - the selection gets modified: the duplicated lines become selected too. Instead, I'd like to keep the initial selection.

Не мог бы, кто-нибудь, пожалуйста слегка переделать существующий скрипт DuplicateLines.js?
В нём есть 2 вещи, которые мне не нравятся:
1. если выделить несколько строк и их дублировать, то они дублируются так:

Code: Select all

a
b
->

Code: Select all

a
a
b
b
вместо ожидаемого

Code: Select all

a
b
a
b
2. после выполнения скрипта - выделение изменяется: изначально выделенный блок удваивается, а вместе с ним удваивается и выделенная область. Вместо этого, хотелось бы, чтобы выделение вообще не затрагивалось и выделенным оставался бы только изначально выделенный блок.
Last edited by Drugmix on Thu Apr 11, 2013 4:06 pm, edited 1 time in total.

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

Post by KDJ »


Offline
Posts: 582
Joined: Mon Apr 08, 2013 9:50 pm
Location: Win7SP1x64, APx64

Post by Drugmix »

KDJ
I had tried your script earlier, but I failed at writing a valid call. Now it's fine, thanks a lot!

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

Post by KDJ »

InputBox_function.js
Changed:
- abolished the limit on text length for labels and edit boxes
- argument oFunction can be passed as function name without the quotes,
- argument vFuncArg can be any type,
- script file can be saved in ANSI code,
- new examples in InputBox.js.
Added arguments:
- minimum edit box width,
- bottom labels,
- left labels,
- right labels.

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

Post by KDJ »

InputBox_function.js
Small correction in the position of the dialog box.
Locked