toggleComments-experimental.js
Исправлено некорректное определение конструкций вида func(a, /*b + */c) как регулярных выражений (важен первый непробельный символ перед открывающей «/»).
И,
.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));
}
);
определение регулярных выражений, перед которыми находятся комментарии.
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.
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.
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.