Page 1 of 1
Help using XY to Notate Screenshots
Posted: 13 Oct 2012 20:52
by kodyman
Occasionally while taking screenshots I want to add an individual comment to each after it is taken. The program I use has the ability to send a copy of the saved screenshot file name to the clipboard and also send a commandline afterward.
With the command line in the screen shot program I have gotten it to start XY after taking the shot. I have also been able to have XY show a pop-up window displaying the saved file name with path in the clipboard. What I would like to be able to do is when XY is called up, have it go to the screenshot file that was just taken and open a window/pop-up so I can enter a comment and save it.
It seems that XY should be able to do this but it is beyond my scripting skills. Which are miniscule at best.
If it is not too involved and can be done, could someone help me out? I would be very greatful.
Thanks
Re: Help using XY to Notate Screenshots
Posted: 15 Oct 2012 20:56
by kodyman
I just knew there had to be some way to do this. I looked through the help guide and did some various forum searches. I just didn't know the correct search phrases to use. Sort of like the old "if you don't know how to spell a word, how do you look it up in the dictionary."
I started down through the Script Exchange one by one till I found one of Stefan's helpful posts:
http://www.xyplorer.com/xyfc/viewtopic. ... c59#p54696
His "Select youngest file" script has me part of the way there. Thanks Stefan!
Select file from clipboard AND Add an comment to it
Posted: 15 Oct 2012 21:50
by Stefan
Ah, i had read your post but was out most of the weekend.
As far as i understood your request you want something like this?:
Code: Select all
//The program I use has the ability to send a copy of the saved screenshot file name to the clipboard
//// XYplorer read the clipboard to get the FILE name:
$FILE = "<clipboard>";
end( strpos($FILE, "<crlf>") > 0 , "This is not an file name, Script quits.");
end( exists($FILE) == 0 , "No such file<crlf 2>$FILE<crlf 3> Script quits.");
//and also send a commandline afterward.
//With the command line in the screen shot program
//I have gotten it to start XY after taking the shot.
//// XYplorer ask to start an script for that FILE:
msg "Select and add comment for:<crlf 2>$FILE<crlf 4>Continue?",1;
//What I would like to be able to do is when XY is called up,
//have it go to the screenshot file that was just taken
//// XYplorer goes to that FILE:
goto getpathcomponent("<clipboard>", "path");
selectitems $FILE,,1;
focus "L";
//and open a window/pop-up so I can enter a comment and save it.
//// XYplorer prompt you for an string to save as comment for that FILE:
$CommentValue = input(Enter an comment for, $FILE, "Taken at <date>" ,s, "UserHasCancelled");
end($CommentValue=="UserHasCancelled");
tag $CommentValue, $FILE, 2; //2=Comment
//// Cosmetic:
beep 800,100; beep 400,100; beep 600,100;
status "File comment done", "3300CC", "ready";
HTH?

Re: Help using XY to Notate Screenshots
Posted: 18 Oct 2012 14:13
by kodyman
Stefan
Thank you for your post and script help. I could have been clearer on the steps in my request.
I'm trying your scripts and some are working as I want. I need to and will spend more time digesting these and report back.
Unfortunately (not really... happy it is) my day job has taken up more of the front seat and I've not been able to spend time on this.
Will let you know how it goes.
K.