infocatcher / akelpad_scripts Goto Github PK
View Code? Open in Web Editor NEWScripts for AkelPad text editor with Scripts plugin
Scripts for AkelPad text editor with Scripts plugin
To add Lua and Powershell support, the following modification is suggested:
Before (original code, line 108):
au3: [ ["#comments-start", "#cs"], ["#comments-end", "#ce"], [";"] ]
After (updated code):
au3: [ ["#comments-start", "#cs"], ["#comments-end", "#ce"], [";"] ],
lua: [ ["--[["], ["]]"], ["--"] ],
ps1: [ ["<#"], ["#>"], ["#"] ]
Example:
0 "^\s*(((Try)|(Else))(?:\s*,\s*|\s+)|(.{0,38}(?=::))(?:::))?\s*(#IfWinActive)((?:\s*,\s*|\s+)([^;,]*?))?(\s+;.*$)?(\s*,\s*([^;,]+?))?(\s+;.*)?$" `\3=(4,${OP},0) \4=(4,${IF},0) \5=(2,${STR},0) \6=(0,${OP},0) \9=(0,${ATTR},0) \10=(3,${COMM},0)`
The bug is sensitive to caret's position: if you place it at the end: 3 first script calls will just remove one semicolon each from the line, and only on 4th call the line will get commented, but with 3 lost semicolons that were initially present.
The bug doesn't happen with the above example, if caret is placed anywhere before the first semicolon.
Баг чувствителен к позиции каретки: если каретку расположить в конце строки, то первые 3 вызова скрипта - удалят по одной точке с запятой каждый. И только на 4-ый вызов - строка закомментируется, но с тремя потерянными ";", которые изначально в ней присутствовали.
Бага с вышеприведённым примером не произойдёт, если расположить каретку до первой точки с запятой.
See d6eda6f commit.
The script fails to work in a wine environment under FreeBSD:
Is there anything can be done about it?
Imported libs:
msls31 (MS Line Services)
riched20 (MS RichEdit Control 2.0 (riched.dll)
riched30 (MS RichEdit Control 3.0 (riched.dll, msls31.dll)
richtx32 (MS Rich TextBox Control 6.0)
wsh56vb (MS Windows Script Host 5.6, VBScript only, no CScript)
wsh57 (MS Windows Script Host 5.7)
Or the list of files:
cscript.exe
jscript.dll
riched20.dll
scrrun.dll
vbscript.dll
wscript.dll
Failed for requests like https://exchange-rates.org/converter/EUR/USD/1/N
var asyncUpdater = {
…
addRequest: function(code) {
…
request.send(null); // <-- Access denied error
return request;
},
Thanks for your useful scripts !
We use http://www.google.com/ig/calculator?hl=en&q=100EEK%3D%3FUSD
Since 2013-11-01 redirected to https://support.google.com/websearch/answer/2664197
Like
"<HKCU\\Software\\Ghisler\\Total Commander\\InstallDir>\\totalcmd.exe"
Updated version: https://github.com/Infocatcher/AkelPad_scripts/blob/jsBeautifier_new/jsBeautifier.js
Changes: https://github.com/Infocatcher/AkelPad_scripts/commits/jsBeautifier_new
Merged with master branch: 532e193
Tests:
==== Old tests ============================================================
---- input -------
#!
---- expected ----
#!
---- output ------
#!
---- expected-ws ------
#!
---- output-ws ------
#!\n
================================================================
==== Old tests ============================================================
---- input -------
#include
---- expected ----
#include
---- output ------
#include
---- expected-ws ------
#include
---- output-ws ------
#include\n
================================================================
==== Old tests ============================================================
---- input -------
#include "settings.jsxinc"
---- expected ----
#include "settings.jsxinc"
---- output ------
#include "settings.jsxinc"
---- expected-ws ------
#include_"settings.jsxinc"
---- output-ws ------
#include_"settings.jsxinc"\n
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<style><!----></style>
---- expected ----
<style>
<!--
-->
</style>
---- output ------
<style>
< !---->
</style>
---- expected-ws ------
<style>\n
____<!--\n
____-->\n
</style>
---- output-ws ------
<style>\n
____<_!---->\n
</style>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<style><!--
--></style>
---- expected ----
<style>
<!--
-->
</style>
---- output ------
<style>
< !-- -->
</style>
---- expected-ws ------
<style>\n
____<!--\n
____-->\n
</style>
---- output-ws ------
<style>\n
____<_!--_-->\n
</style>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<style><!-- the rest of this line is ignored
--></style>
---- expected ----
<style>
<!-- the rest of this line is ignored
-->
</style>
---- output ------
<style>
< !-- the rest of this line is ignored -->
</style>
---- expected-ws ------
<style>\n
____<!--_the_rest_of_this___line_is___ignored\n
____-->\n
</style>
---- output-ws ------
<style>\n
____<_!--_the_rest_of_this_line_is_ignored_-->\n
</style>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<style type="test/null"><!--
--></style>
---- expected ----
<style type="test/null">
<!--
-->
</style>
---- output ------
<style type="test/null">
<!--
-->
</style>
---- expected-ws ------
<style_type="test/null">\n
____<!--\n
____-->\n
</style>
---- output-ws ------
<style_type="test/null">\n
____<!--\n
____\n
____===|__\n
____\n
____-->\n
</style>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<div>
<script><!--
console.log("</script>" + "</style>");
</script>
</div>
---- expected ----
<div>
<script><!--
console.log("</script>" + "</style>");
</script>
</div>
---- output ------
<div>
<script>
<!--
console.log("</script>" + "</style>"); <
/script> <
/div>
---- expected-ws ------
<div>\n
____<script><!--\n
console.log("</script>"_+_"</style>");\n
_</script>\n
</div>
---- output-ws ------
<div>\n
____<script>\n
________<!--\n
________console.log("</script>"_+_"</style>");_<\n
________/script>_<\n
________/div>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<style><!--
.selector {
font-family: "</script></style>";
}
--></style>
---- expected ----
<style>
<!--
.selector {
font-family: "</script></style>";
}
-->
</style>
---- output ------
<style>
< !-- .selector {
font-family: "</script></style>";
}
-->
</style>
---- expected-ws ------
<style>\n
____<!--\n
____.selector_{\n
________font-family:_"</script></style>";\n
____}\n
____-->\n
</style>
---- output-ws ------
<style>\n
____<_!--_.selector_{\n
________font-family:_"</script></style>";\n
____}\n
\n
____-->\n
</style>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<script type="test/null">
<!--
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
--></script>
---- expected ----
<script type="test/null">
<!--
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
-->
</script>
---- output ------
<script type="test/null">
<!--
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
-->
</script>
---- expected-ws ------
<script_type="test/null">\n
____<!--\n
____console.log("</script>"_+_"</style>");\n
_____console.log("</script>"_+_"</style>");\n
____-->\n
</script>
---- output-ws ------
<script_type="test/null">\n
____<!--\n
_______console.log("</script>"_+_"</style>");\n
____console.log("</script>"_+_"</style>");\n
____-->\n
</script>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<script type="test/null"><!--
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
--></script>
---- expected ----
<script type="test/null">
<!--
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
-->
</script>
---- output ------
<script type="test/null">
<!--
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
-->
</script>
---- expected-ws ------
<script_type="test/null">\n
____<!--\n
____console.log("</script>"_+_"</style>");\n
_________console.log("</script>"_+_"</style>");\n
____-->\n
</script>
---- output-ws ------
<script_type="test/null">\n
____<!--\n
_____console.log("</script>"_+_"</style>");\n
__________console.log("</script>"_+_"</style>");\n
____-->\n
</script>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<script><![CDATA[
console.log("</script>" + "</style>");
]]></script>
---- expected ----
<script>
<![CDATA[
console.log("</script>" + "</style>");
]]>
</script>
---- output ------
<script>
< ![CDATA[
console.log("</script>" + "</style>");
]] >
</script>
---- expected-ws ------
<script>\n
____<![CDATA[\n
____console.log("</script>"_+_"</style>");\n
____]]>\n
</script>
---- output-ws ------
<script>\n
____<_![CDATA[\n
________console.log("</script>"_+_"</style>");\n
____]]_>\n
</script>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<style><![CDATA[
.selector {
font-family: "</script></style>";
}
]]></style>
---- expected ----
<style>
<![CDATA[
.selector {
font-family: "</script></style>";
}
]]>
</style>
---- output ------
<style>
< ![CDATA[ .selector {
font-family: "</script></style>";
}
]]>
</style>
---- expected-ws ------
<style>\n
____<![CDATA[\n
____.selector_{\n
________font-family:_"</script></style>";\n
____}\n
____]]>\n
</style>
---- output-ws ------
<style>\n
____<_![CDATA[_.selector_{\n
________font-family:_"</script></style>";\n
____}\n
\n
____]]>\n
</style>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<script type="test/null">
<![CDATA[
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
]]></script>
---- expected ----
<script type="test/null">
<![CDATA[
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
]]>
</script>
---- output ------
<script type="test/null">
<![CDATA[
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
]]>
</script>
---- expected-ws ------
<script_type="test/null">\n
____<![CDATA[\n
____console.log("</script>"_+_"</style>");\n
_____console.log("</script>"_+_"</style>");\n
____]]>\n
</script>
---- output-ws ------
<script_type="test/null">\n
____<![CDATA[\n
_______console.log("</script>"_+_"</style>");\n
____console.log("</script>"_+_"</style>");\n
____]]>\n
</script>
================================================================
==== Tests for script and style Commented and cdata wapping (#1641) ============================================================
---- input -------
<script type="test/null"><![CDATA[
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
]]></script>
---- expected ----
<script type="test/null">
<![CDATA[
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
]]>
</script>
---- output ------
<script type="test/null">
<![CDATA[
console.log("</script>" + "</style>");
console.log("</script>" + "</style>");
]]>
</script>
---- expected-ws ------
<script_type="test/null">\n
____<![CDATA[\n
____console.log("</script>"_+_"</style>");\n
_________console.log("</script>"_+_"</style>");\n
____]]>\n
</script>
---- output-ws ------
<script_type="test/null">\n
____<![CDATA[\n
_____console.log("</script>"_+_"</style>");\n
__________console.log("</script>"_+_"</style>");\n
____]]>\n
</script>
================================================================
==== unformatted_content_delimiter ^^ ============================================================
---- input -------
<span>0 0001 0002 0003 0004 0005 0006 0007 0008 ^^09 0010 0011 0012 0013 0014 0015 ^^16 0017 0018 0019 0020</span>
---- expected ----
<span>0 0001 0002 0003 0004 0005 0006 0007 0008
^^09 0010 0011 0012 0013 0014 0015 ^^16 0017 0018 0019 0020</span>
---- output ------
<span>0 0001 0002 0003 0004 0005 0006 0007 0008 ^^09 0010 0011 0012 0013 0014
0015 ^^16 0017 0018 0019 0020</span>
---- expected-ws ------
<span>0_0001_0002_0003_0004_0005_0006_0007_0008\n
____^^09_0010_0011_0012_0013_0014_0015_^^16_0017_0018_0019_0020</span>
---- output-ws ------
<span>0_0001_0002_0003_0004_0005_0006_0007_0008_^^09_0010_0011_0012_0013_0014\n
____0015_^^16_0017_0018_0019_0020</span>
================================================================
==== unformatted_content_delimiter ^^ ============================================================
---- input -------
<span>0 0001 0002 0003 0004 0005 0006 0007 0008 0009 ^^10 0011 0012 0013 0014 0015 0016 0^^7 0018 0019 0020</span>
---- expected ----
<span>0 0001 0002 0003 0004 0005 0006 0007 0008 0009
^^10 0011 0012 0013 0014 0015 0016 0^^7 0018 0019 0020</span>
---- output ------
<span>0 0001 0002 0003 0004 0005 0006 0007 0008 0009 ^^10 0011 0012 0013 0014
0015 0016 0^^7 0018 0019 0020</span>
---- expected-ws ------
<span>0_0001_0002_0003_0004_0005_0006_0007_0008_0009\n
____^^10___0011___0012___0013___0014___0015___0016___0^^7_0018_0019_0020</span>
---- output-ws ------
<span>0_0001_0002_0003_0004_0005_0006_0007_0008_0009_^^10_0011_0012_0013_0014\n
____0015_0016_0^^7_0018_0019_0020</span>
================================================================
17 tests failed.
Example:
// /*
alert(1);
// */
Requested here: http://akelpad.sourceforge.net/forum/viewtopic.php?p=28783#28783 (and not only here…)
https://en.wikipedia.org/wiki/Quoted-printable
Example:
7 =D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB =D1=81=D0=BE=D0=B7=D0=B4=
=D0=B0=D0=BD=D0=B8=D1=8F =D0=BA=D1=80=D0=B0=D1=81=D0=B8=D0=B2=D1=8B=D1=85 =
=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81=D0=BE=D0=B2 / =D0=A5=
=D0=B0=D0=B1=D1=80=D0=B0=D1=85=D0=B0=D0=B1=D1=80
Example from SearchReplace.js:
function RectToArray(lpRect, rcRect)
{
rcRect.left=AkelPad.MemRead(_PtrAdd(lpRect, 0) /*offsetof(RECT, left)*/, 3 /*DT_DWORD*/);
rcRect.top=AkelPad.MemRead(_PtrAdd(lpRect, 4) /*offsetof(RECT, top)*/, 3 /*DT_DWORD*/);
rcRect.right=AkelPad.MemRead(_PtrAdd(lpRect, 8) /*offsetof(RECT, right)*/, 3 /*DT_DWORD*/);
rcRect.bottom=AkelPad.MemRead(_PtrAdd(lpRect, 12) /*offsetof(RECT, bottom)*/, 3 /*DT_DWORD*/);
return rcRect;
}
Наверное, можно по-русски?
Пропущена буква r в \WinMege, 63 строка:
"%ProgramFiles%\WinMege\WinMergeU.exe",
Скрипт не нашел путь, как раз там программа и установлена.
А так всё работает. Отличное решение.
Большое спасибо.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.