This is my first request for help so please be nice, i have only just started using Autoit and i need to capture a screen shot and save it with the file neam of machine number , user, date and time on a network drive.
I have used scripts that i have found on this forum and have got to the point where i press printscreen and it copies the screen to clipboard and previews it. This is where i get stuck as i can do a file save as but then that requires user input which is what i want to avoid. I know the text for the $filename is correct but i dont understand how to get it to put it as the file name and save it automatically. If that makes sense.
Thanks in advance
Func ContentHandler() Local $buffer Local $clipbmp = GetClipBoard($buffer) If $DEBUG Then _FileWriteLog($LOG, ";----------------------------------------------------------" & @LF) _FileWriteLog($LOG, "Begin Process: " & @error & @LF) EndIf If $DEBUG Then _FileWriteLog($LOG, "Getting Clipboard>" & @error & @LF) If $clipbmp Then If $DEBUG Then _FileWriteLog($LOG, "Captured Screen>" & @error & @LF) PreviewImage($buffer, $wide, $tall) FileSaveDialog ( "Save As" , "\\Wyjs_pdc\Flare\JWaugh" , "Images (*.jpg;*.bmp)") $filename = @UserName & " on " & @ComputerName & " at " & @HOUR & "." & @MIN & "." & @SEC & " on " & @MON & "-" & @MDAY & "-" & @YEAR & ".jpg" If $DEBUG Then _FileWriteLog($LOG, "Return Error Status: " & @error & @LF) EndIf If $DEBUG Then _FileWriteLog($LOG, "Exiting Now. Bye." & @LF) _FileWriteLog($LOG, ";----------------------------------------------------------" & @LF & @LF) EndIf DeleteObject($clipbmp) $buffer = 0 EndFunc ;==>ContentHandler
Edited by jameswaugh, 18 August 2006 - 12:36 PM.






