Suggestion:
Use this to create a list of documents containing clients' info, and put it under control along with Tags and Comments. This way, you can visually and easily tell your always-on-the-run-stressed-boss what's going on each and every time he stumble upon your door asking for the last results... believe: XY can do magic on such cases! I've been thru that, once...
Code: Select all
/* Batch New Items
v0.01.0000 2009.01.18 XY v7.80.0032
+ first "new" release
*/
"Batch New Items... : BatchNewItems"
global $XYS_name;
sub _ensureXY;
// files or folders ?
$is_file = confirm("Do you want to create files, or folders ?<br><br>OK = Files<br>Cancel = Folders");
$type = ($is_file) ? 'file' : 'dir';
// ask for new items' names
$names = input("$XYS_name: Enter new ".(($is_file) ? "files" : "folders")."' names",,<clipboard>, m);
// get last 2 bytes
substr $check, $names, -2;
// and make sure it ends with a CRLF
$names = $names . (($check == <crlf>) ? "" : <crlf>);
// remove empty lines
regexreplace $names, $names, "(\r\n){2,}", <crlf>;
// turn into a script
regexreplace $script, $names, "(.+?)\r\n", "new ""$1"", $type; ";
// and load it up!
load $script,,s;
-
-
" [ Batch New Items ]"
-
"_ensureXY"
global $XYS_name, $XYS_file;
self $XYS_file, file;
getkey $XYS_name, "name", "Internal", $XYS_file;
getkey $xyreq, "requiredXY", "Internal", $XYS_file;
end (compare(<xyver>, $xyreq, v) >= 0),,1;
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;
"&About Batch New Items : About"
global $XYS_name, $CJ_tmp;
sub _ensureXY;
self $file, file;
self $path, path;
self $base, base;
getkey $curver, "version", "Internal", $file;
getkey $xyreq, "requiredXY", "Internal", $file;
status "$XYS_name: version $curver";
//
$CJ_tmp = "_getXyauState";
sub _callCommonJacky;
$CJ_tmp = ($CJ_tmp == "_getXyauState") ? "Unable to get XYplorer Automatic Updater integration state -- requires common-jacky.xys" : $CJ_tmp;
//
msg "$XYS_name -- version $curver<br>Requires XYplorer $xyreq (Running: <xyver>)<br><br>This script: $file<br><br>$CJ_tmp";
load *;
"Change&log of Batch New Items : _AutoChangelog"
global $CJ_tmp;
sub _ensureXY;
$CJ_tmp = "_AutoChangelogHTML";
sub _callCommonJacky;
load *;
"- : _sep"
"Chec&k for updates of Batch New Items... : _CheckForAutoUpdates"
global $CJ_tmp;
sub _ensureXY;
$CJ_tmp = "_CheckForAutoUpdates";
sub _callCommonJacky;
load *;
"&Install Batch New Items support in XYplorer Automatic Updater... : _InstallInXYAU"
global $CJ_tmp;
sub _ensureXY;
$CJ_tmp = "_InstallInXYAU";
sub _callCommonJacky;
load *;
"_callCommonJacky"
global $CJ_tmp;
self $file, file;
self $path, path;
getkey $cj_req, "requiredCJ", "Internal", $file;
getkey $cj_ver, "version", "Internal", "common-jacky.xys";
end $cj_ver == "", ($CJ_tmp == '_getXyauState') ? '' : "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";
-
"Show &Full Menu... : ShowFullMenu"
load *,*;
"Show Standard &Menu... : _ShowMenu"
load *;
-
"Cancel : nothing"
"_nothing"
"_settings"
[Internal]
name="Batch New Items"
version="0.01.0000"
requiredXY="7.80.0032"
requiredCJ="0.01.0004"
CJoptional=1
Url="http://88.191.26.34/XYscripts/download/"
XYplorer Beta Club