
The latest version of the script is
0.01.0011 and can be
downloaded from here. Requires XY 7.80.0032

There's a
new dependency, in form of an additional script file (common-jacky.xys) that you can
download from here. This new script will allow different scripts to use the same "features" without having to pack all the same codes, etc It's a "library", can't be loaded on its own (I mean it can be, but it won't do nothing

).

There's been different little changes and fixes, as well as the introduction of "hidden" items, so you need to click on "Show Full Menu" to see them. For example, the feature "Get changelog" has been hidden, and so is the new "Edit Configuration File" (just opens the INI file)

The major addition, related to our common-jacky mentioned above, is of course the possibility to use XYAU (this script!

) to check for updates of other scripts. Since I do work on a few scripts of my own that needs updates, since I use them on different computers or share them with other people, I wanted to quick & easy way to check for & update them all at once, so what better that using this script!
As of this writing, XYUA can check for updates of itself, common-jacky and MiniTrees (as well as XY, of course!) That means it can check for updates for everything when you click "Check for updates", and it can download the new script file when a new version is available. You can also just install support for those scripts in XYAU without enabling the automatic check for updates, then there's a menu "Check for updates of additional scripts..." with both the possibility to "Check for updates of all scripts..." as well as checking for individual ones.
Technically, support for any script could be added (given a few rules are followed), but I'm already thinking of ways to automate all of that even more and make it more accessible, to allow everyone to have their scripts' updates handled through XYAU easily... stay tuned!
--
lukescammell wrote:Looking forward to seeing some documentation on how others can utilise some of the "Jacky Common" stuff, looks like a damned good idea!
Okay, just for you then

One thing you can use already, if you want to play with common-jacky, is "_AutoChangeLog". What it does it read your script file to "extract" the changelog and show it (using text). Of course it must follow some rules to work:
- you need to have common-jacky.xys obviously, and it needs to be in the same folder as your own script file
- your script file must have an INI section "Internal" embedded, with setting "version" set to its version number
- you must define two global vars, $XYS_name with the name of your script (e.g. self $XYS_name, base;), and $XYS_file with the path/file to the XYS (e.g. self $XYS_file, file;)
- your script file must open with a multi-line comment (/* blahblah.. */) that will be the famous changelog extracted & shown
FYI: for lines beginning with two tabulations, the 2 tabulations will be replaced by two spaces; then, for lines beginning with one tabulation, the tabulation will be removed; and finally the name of the script ($XYS_name) will be replaced by "Changelog of $XYS_name v<version>" (<version> being from the Internal INI key version, obviously)
Basically, here's a basis of what I'd use...
Code: Select all
/* ScriptName
v0.01.0000 yyyy.mm.dd XY v7.80.0032
+ first release
*/
"Stuff..."
sub _ensureXY;
msg "This should probably do something...";
-
"_ensureXY"
global $XYS_name, $XYS_file;
self $XYS_file, file;
getkey $XYS_name, "name", "Internal", $XYS_file;
getkey $xyreq, "requiresXY", "Internal", $XYS_file;
setting "AllowRecursion", 1;
sub (compare(<xyver>, $xyreq, v) >= 0) ? "_nothing" : "_ensureXYfailed";
"_ensureXYfailed"
global $XYS_name;
self $file, file;
getkey $xyreq, "requiresXY", "Internal", $file;
msg "WARNING: This version of $XYS_name requires XYplorer v$xyreq in order to work properly.<br><br>You are currently running an older version (<xyver>), are you sure you want to continue anyway ?<br><br>Note that this might lead to errors / unexpected results.", 1;
"Show changelog... : AutoChangelog"
global $CJ_tmp;
sub _ensureXY;
$CJ_tmp = "_AutoChangelog";
sub _callCommonJacky;
load *;
"_callCommonJacky"
global $CJ_tmp;
self $file, file;
self $path, path;
getkey $cj_req, "requiresCJ", "Internal", $file;
getkey $cj_ver, "version", "Internal", "common-jacky.xys";
end $cj_ver == "", "In order to accomplish the desired operation, you need to have the ""library"" common-jacky.xys installed -- Please download the script file and put it in the same folder as this script file ($path\).", 1;
end (compare($cj_ver, $cj_req, v) == -1), "In order to accomplish the desired operation, you need to have the ""library"" common-jacky.xys v$cj_req or more installed, your current version is v$cj_ver -- Please update to the latest version.", 1;
load "common-jacky", "$CJ_tmp";
-
"Cancel : nothing"
"_nothing"
"_settings"
[Internal]
name="ScriptName"
version="0.01.0000"
requiresXY="7.80.0032"
requiresCJ="0.01.0001"
Have fun!
