Page 2 of 2
Re: EXIF Conditional Rename
Posted: 16 Jun 2014 19:28
by highend
Anywhere you like, just use a fixed path for $ahkHelper.
Like
Code: Select all
$ahkHelper = "D:\Tools\My little programs\xyEditItemNamesWindow_Helper.exe
Or wherever you like to store it...
Re: EXIF Conditional Rename
Posted: 17 Jun 2014 03:20
by aimy
Thank you highend.
So, this is my code:
Code: Select all
$shift = 8; // Time (in hours to shift the time)
$previewNames = "";
$ahkHelper = "D:\SugarSync\Programs\Settings\xyEditItemNamesWindow_Helper.exe"
$clip = "<clipboard>"; // Store current clipboard data
foreach($item, <get SelectedItemsPathNames |>, "|") {
$device = property("CameraModel", $item);
$baseName = getpathcomponent($item, "base");
$extension = getpathcomponent($item, "ext");
$date = formatdate(property("WhenTaken", $item), "yyyymmdd.hhnnss", "h", $shift);
if ($device == "SAMSUNG PL150 / VLUU PL150 / SAMSUNG TL210 / SAMSUNG PL151") {
$pattern = "$date-$baseName¬SAMSUNG PL151.$extension";
} elseif ($device == "SM-N9005") {
$pattern = "$date¬SM-N9005.$extension";
} else {
$pattern = "$date-$baseName¬$device.$extension";
}
$previewNames = $previewNames . $pattern . "<crlf>";
}
$previewNames = formatlist($previewNames, "e", "<crlf>");
copytext "$previewNames";
run """$ahkHelper""";
#147;
copytext $clip; // Restore clipboard data
But it doesn't work as expected. The moment I click the script button, it suddenly open Windows Explorer and hang my PC for a while.
Is there anything wrong with my $ahkHelper setting?
Thank you.
Re: EXIF Conditional Rename
Posted: 17 Jun 2014 04:53
by bdeshi
aimy wrote:
Code: Select all
$ahkHelper = "D:\SugarSync\Programs\Settings\xyEditItemNamesWindow_Helper.exe"
[/size]
End this line with semicolon.
Code: Select all
$ahkHelper = "D:\SugarSync\Programs\Settings\xyEditItemNamesWindow_Helper.exe";
Re: EXIF Conditional Rename
Posted: 17 Jun 2014 05:31
by aimy
SammaySarkar wrote:aimy wrote:
Code: Select all
$ahkHelper = "D:\SugarSync\Programs\Settings\xyEditItemNamesWindow_Helper.exe"
[/size]
End this line with semicolon.
Code: Select all
$ahkHelper = "D:\SugarSync\Programs\Settings\xyEditItemNamesWindow_Helper.exe";
I'm sorry about that.
Thank you so much.
It works now.