• Att: Scripters who create syntax highlighting files for editors (Notepad++, PSPad, etc.).
• Obj: Scripts to export a "clean list" of Scripting Commands, and of Variables, so it's easy to spot the changes between XYplorer versions (e.g. export list from XY v13.90, then compare with one exported from XY v11.00). Scripting Commands:
Add this to a UDC "User | Manage Commands | Run Script".
Caption: Export XY Scripting Commands.
Script:
Code: Select all
// backupto and copyto only appear on moveto line
// moveas only appears on copyas line
msg "<crlf>Help window will now open.<crlf>Click on window to focus it, select all and copy. <crlf>You can close Help window when you're done copying.";
rtfm "idh_scripting_comref.htm";
if (<clipboard> && confirm("Click OK when you're done copying.")) {
writefile("XY_ScriptingCommands.txt", regexreplace(regexmatches(regexreplace(<clipboard>, "\r\n\r\n(?=\w)", <crlf>), "([^\n]+ *\r\n[^\n]+ *\r\n)Syntax *\r\n([^\n]+ *\r\n)", <crlf>), "Syntax *\r\n"));
}
Add this to a UDC "User | Manage Commands | Run Script".
Caption: Export XY Scripting Variables.
Script:
Code: Select all
msg "<crlf>Help window will now open.<crlf>Click on window to focus it, select all and copy. <crlf>You can then close Help window. <crlf>You have 7 seconds before the data is processed and saved.";
rtfm "idh_variables.htm";
wait 7000;
writefile("XY_ScriptingVariables.txt", regexreplace(<clipboard>, "(^[^<%\r\n ][^\r]*|^ (?! *[<%\r])[^\r]*|^ *)(\r\n)*"));
It was a huge time saver for me when updating my Akelpad definitions after several months.
I hope this will be useful to those who make syntax highlighting definitions for other editors!
Have a nice day,
Flux