I was looking for a way to establish a counter that increments per screenshot taken. Getdate and Gettime utilize characters that arent usable in filenames.
A couple of other posts offered a work around, but I dont think its the best workaround. Suggestions for improvement to help me and any others would be appreciated.
Code:
OnEvent>KEY_DOWN,VK192,0,Screenshot
Label>Idle_Loop
Wait>0.02
Goto>Idle_Loop
SRT>Screenshot
Year>Y
Month>M
Day>D
Hour>H
Sec>S
Let>Stamp=%Y%_%M%_%D%_%H%_%S%
GetScreenRes>screen_x,screen_y
ScreenCapture>0,0,screen_x,screen_y,C:\Documents and Settings\Z\My Documents\My Pictures\Screenshot_%Stamp%.bmp
PlayWav>chimes.wav
End>Screenshot
Screenshot filename increment
Moderators: Dorian (MJT support), JRL
You could do something like this:
However I like the date/time stamp just as well.
???? why aren't you using
Min>Min
to get the minutes???
Code: Select all
IfFileExists>c:\screenshot_counter.ini
ReadIniFile>c:\screenshot_counter.ini,ScreenShot,Counter,strValue
Add>strValue,1
EditIniFile>c:\screenshot_counter.ini,ScreenShot,Counter,strValue
MessageModal>counter=%strValue%
Else
MessageModal>c:\screenshot_counter.ini file is missing!
//Optional -- create the file
WriteLn>c:\screenshot_counter.ini,IO_result,[ScreenShot]
WriteLn>c:\screenshot_counter.ini,IO_result,Counter=1
Endif
However I like the date/time stamp just as well.
???? why aren't you using
Min>Min
to get the minutes???
Screenshot Tool for MS Image Recognition
Brilliant! Lets have a Guinness. Umm, I guess I threw it together and overlooked including minutes, I shall have to add even though its an awefully long filename I think its most usefull to try to include all the info.
Code: Select all
//Number Pad 0 should fire out some usefull screenshots for the best comparisons and planning during image recognition.
OnEvent>KEY_DOWN,VK96,0,Playmatic
Label>Idle_Loop
Wait>0.02
Goto>Idle_Loop
SRT>Playmatic
Year>Y
Month>Mo
Day>D
Hour>H
Min>Mi
Sec>S
Let>Stamp=%Y%_%Mo%_%D%_%H%_%Mi%_%S%
GetScreenRes>screen_x,screen_y
ScreenCapture>0,0,screen_x,screen_y,C:\Documents and Settings\Z\My Documents\My Pictures\Screenshot_%Stamp%.bmp
PlayWav>chimes.wav
End>Playmatic