Sign in to follow this  
Followers 0
Cameltoe

Capture - Logging script

4 posts in this topic

#1 ·  Posted (edited)

Hello, i'm making a logging script. the script will be able to save screen captures to a spesified folder with hour and min in the name of image file.

here is the script

#include <ScreenCapture.au3>
$file = "C:\Documents and Settings\Administrator\Desktop\Scripts\MN\Screenshot"
$random = @hour
$random2 = @min
_Main()

Func _Main()
    Local $jpg

    $jpg = ("Screen Capture")

    ; Capture window
    _ScreenCapture_Capture($file & $random & $random2  "\.jpg", $jpg)

EndFunc   ;==>_Main

where i need help is at the $random part. i want $random & $random2 variables to write the time in the name of the image.

ty all in advance!

Edited by Cameltoe

Share this post


Link to post
Share on other sites



Please somone! im using this ctrl-c to notepad and that is using much of the time....

Share this post


Link to post
Share on other sites

Way to make that WAY more complicated than need be. Just use the @HOUR and @MIN macros right in the _ScreenCapture_Capture function.

Also, it'd probably help if you use the correct syntax for the functions. ($jpg ..?)

#include <ScreenCapture.au3>
$file = "C:\Documents and Settings\Administrator\Desktop\Scripts\MN\Screenshot"
_ScreenCapture_Capture($file & @HOUR & @MIN & ".jpg")

This will create a screen capture: "C:\Documents and Settings\Administrator\Desktop\Scripts\MN\ScreenshotHHMM.jpg"

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Ty sooo much!!

ima test it now ;)

------Edit------

It worked really fine! ty bigtime

Edited by Cameltoe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0