Code: Select all
Focus('L');
Sel();
$i = 0;
while (GetInfo('CountSelected') == 0 and $i < 1000000000) {
Sel("[$prefix$suffix$ext]",,1);
$i = $i + 1;
}
#172; //File -> Rename
Code: Select all
Focus('L');
Sel();
$i = 0;
while (GetInfo('CountSelected') == 0 and $i < 1000000000) {
Sel("[$prefix$suffix$ext]",,1);
$i = $i + 1;
}
#172; //File -> Rename
Code: Select all
#172, 1; #172, 1; #172, 1 //File -> Rename
Code: Select all
#172, wait=1; #172, wait=1; #172, wait=1 //File -> Rename
Code: Select all
//New Text File with Path and Custom Date in Rename Mode
"Do Stuff"
// Filename before the (possible) suffix.
$prefix = 'Links_' . RegExReplace("<curfolder>", '_+', '_') . "_<date yyyy-mm-dd>";
// Filename after the (possible) suffix.
$ext = '.txt';
/* Use the user defined suffix pattern.
* Note that the value is taken from the config file,
* which means if it has changed since last saved
* those changes will not be reflected here.
* You could call SaveSettings(); or #193; here to fix that.
*/
$suffix = GetKey('PostfixNum','General');
/* This splits the pattern into three parts
* pre: Anything before the last set of zeros.
* zed: The last set of zeros.
* suf: Anything after the last set of zeros.
*/
$suffix = RegExReplace("$suffix", '^(.*?[^0]?)(0+)([^0]*)$', "$1<crlf>$2<crlf>$3");
$suffix_pre = GetToken("$suffix", 1, "<crlf>");
$suffix_zed = GetToken("$suffix", 2, "<crlf>");
$suffix_suf = GetToken("$suffix", 3, "<crlf>");
$suffix = '';
// Check for collisions and increment suffix pattern.
$min_lead = StrLen("$suffix_zed");
$i = 0;
while (Exists("<curpath>\$prefix$suffix$ext") != 0) {
$i = $i + 1;
$suffix = "$suffix_pre" . StrRepeat('0', $min_lead - StrLen("$i")) . "$i$suffix_suf";
}
// Write clipboard's contents to file.
$err = WriteFile("<curpath>\$prefix$suffix$ext", "<clipboard>", 'n');
End($err != 1, "Could not write file:<crlf>$prefix$suffix$ext");
Focus('L');
Sel();
$i = 0;
while (GetInfo('CountSelected') == 0 and $i < 1000000000) {
Sel("[$prefix$suffix$ext]",,1);
$i = $i + 1;
}
sendkeys"{F2}"; wait 100; sendkeys"{F2}"; wait 100; sendkeys"{F2}"; wait 100; //File -> Rename
Code: Select all
sendkeys"{F2}"; wait 100; sendkeys"{F2}"; wait 100; sendkeys"{F2}"; wait 100;
Code: Select all
//New Text File with Path and Custom Date in Rename Mode
"Do Stuff"
// Filename before the (possible) suffix.
$prefix = 'GotDKey_' . RegExReplace("<curfolder>", '_+', '_') . "_<date yyyy-mm-dd>";
// Filename after the (possible) suffix.
$ext = '.txt';
/* Use the user defined suffix pattern.
* Note that the value is taken from the config file,
* which means if it has changed since last saved
* those changes will not be reflected here.
* You could call SaveSettings(); or #193; here to fix that.
*/
$suffix = GetKey('PostfixNum','General');
/* This splits the pattern into three parts
* pre: Anything before the last set of zeros.
* zed: The last set of zeros.
* suf: Anything after the last set of zeros.
*/
$suffix = RegExReplace("$suffix", '^(.*?[^0]?)(0+)([^0]*)$', "$1<crlf>$2<crlf>$3");
$suffix_pre = GetToken("$suffix", 1, "<crlf>");
$suffix_zed = GetToken("$suffix", 2, "<crlf>");
$suffix_suf = GetToken("$suffix", 3, "<crlf>");
$suffix = '';
// Check for collisions and increment suffix pattern.
$min_lead = StrLen("$suffix_zed");
$i = 0;
while (Exists("<curpath>\$prefix$suffix$ext") != 0) {
$i = $i + 1;
$suffix = "$suffix_pre" . StrRepeat('0', $min_lead - StrLen("$i")) . "$i$suffix_suf";
}
// Write clipboard's contents to file.
$textfooter="<crlf><crlf>===============<crlf><crlf>";
$text="$textfooter <clipboard>";
$err = WriteFile("<curpath>\$prefix$suffix$ext", "$text", 'n');
End($err != 1, "Could not write file:<crlf>$prefix$suffix$ext");
Focus('L');
Sel();
$i = 0;
while (GetInfo('CountSelected') == 0 and $i < 1000000000) {
Sel("[$prefix$suffix$ext]",,1);
$i = $i + 1;
}
open "<curitem>"
//open "<curpath>\<curitem>" //ERROR
//sendkeys"{F2}"; wait 100; sendkeys"{F2}"; wait 100; sendkeys"{F2}"; wait 100; //File -> Rename Mode