Page 68 of 97

Posted: Sun Mar 13, 2011 1:53 am
by Infocatcher
toggleComments-experimental.js
Исправлено некорректное определение конструкций вида func(a, /*b + */c) как регулярных выражений (важен первый непробельный символ перед открывающей «/»).
И,

Code: Select all

.replace(
	/([=(\[,&|?:!]\s*((\/\/[^\n\r]*[\n\r]+|\/\*[\s\S]*?\*\/)\s*)*)\/([^*\\\/\n\r]|\\[^\n\r])(\\\/|[^\/\n\r])*\//g,
	// special chars   line comments       block comments         regexp begin                       regexp end
	function(s, prefix) {
		return prefix + escaper(s.substr(prefix.length));
	}
);
:shock: :D
определение регулярных выражений, перед которыми находятся комментарии.

P.S. Что-то на форуме не то с шириной пробелов (?) в блоках кода.

Posted: Sun Mar 13, 2011 5:23 pm
by KDJ
Infocatcher
I like the script runScript.js.
Good for testing scripts with arguments.
Only thing missing is the list of scripts to choose from.
Could you do it?

Posted: Sun Mar 13, 2011 7:44 pm
by Infocatcher
KDJ
May be, but I think, is better to add arguments support to plugins dialog. :)

Posted: Mon Mar 14, 2011 12:54 am
by Infocatcher
Prototype with list of scripts: runScript-test.js

Image


P.S.
Я wrote:P.S. Что-то на форуме не то с шириной пробелов (?) в блоках кода.
Как оказалось, что-то не так с отрисовкой шрифтов в Firefox 4 RC1. :)

Posted: Mon Mar 14, 2011 12:54 pm
by Instructor
Infocatcher

Code: Select all

AkelPad.IsOldWindows() ? 0 /*DT_ANSI*/ : 1 /*DT_UNICODE*/
эквивалентно _TSTR.

Posted: Mon Mar 14, 2011 5:00 pm
by Infocatcher
Instructor wrote:эквивалентно _TSTR.
Спасибо, упустил. :)

runScript-test.js
Dialog window is now resizable.
Removed eval() functionality – it's better to use separate scripts.


[Upd]
Separated eval() functionality:
executeScript.js, executeScript.vbs
Added -useTempFile argument – it's better to detect line with error.

Posted: Mon Mar 14, 2011 7:25 pm
by KDJ
Infocatcher
runScript-test.js is super. You've done it quickly. Thanks.
My suggestions:
1. Disable OK button when in the listbox is selected runScript
2. Double click on listbox can act as "Run".
3. After run sub-script, restore the focus to the dialog runScript.

Posted: Mon Mar 14, 2011 8:12 pm
by Infocatcher
1. Disable OK button when in the listbox is selected runScript
Strange. Sometimes I can run itself, but only sometimes.
In any case, it was a feature. :)
Should work better: runScript-test.js
2. Double click on listbox can act as "Run".
I don't know, how detect double click event. :?
3. After run sub-script, restore the focus to the dialog runScript.
Sounds very good, but I'm not sure that it is possible.

Posted: Mon Mar 14, 2011 8:38 pm
by KDJ
Infocatcher wrote:I don't know, how detect double click event. :?
You can use LBN_DBLCLK: http://msdn.microsoft.com/en-us/library ... 85%29.aspx
Sounds very good, but I'm not sure that it is possible.
Try this: WM_ACTIVATE (http://msdn.microsoft.com/en-us/library ... 85%29.aspx)

Posted: Mon Mar 14, 2011 10:07 pm
by Infocatcher
KDJ wrote:You can use LBN_DBLCLK
Thanks, added. :)

[Upd]
converter.js
getHash.js
Added handling of double clicks on radiobuttons.

Posted: Wed Mar 16, 2011 12:13 am
by Infocatcher
jsBeautifier.js
Now used \n as line breaks (trim_leading_comments() function didn't work).

Posted: Wed Mar 16, 2011 10:39 am
by se7h
WinMerge 0.3
Some improvements in finding paths to WinMerge

Posted: Wed Mar 16, 2011 4:25 pm
by Instructor
Обновлен DeleteRecentFile.js для работы с AkelPad 4.5.6 или выше.

Posted: Thu Mar 17, 2011 7:32 pm
by KDJ
I have a question.
What is the difference between AEGI_NEXTCHAR and AEGI_NEXTCHARINLINE?

Posted: Thu Mar 17, 2011 8:16 pm
by Infocatcher
Experimental and untested scripts come back again. :)

toggleComments-experimental.js
-blockCommentsEntireLines=-1 and -blockCommentsEntireLines=0 now works with -preferLineComments=true.

converter-test.js
Base64 converter now supports \0 character.
Added -codePageURI and -codePageBase64 arguments. Old -codePage still supported, but deprecated.

crypt-test.js (renamed AESCrypt.js script)
Added Blowfish encryption, based on scripts from http://www.farfarfar.com/scripts/encrypt/.
Added warning for slow operations.

getHash-test.js
Added SHA-224, SHA-384 and SHA-512 hash functions, based on scripts from http://www.farfarfar.com/scripts/encrypt/.
Fixed -autoCalc=true.
Added warning for slow operations.