Sign in to follow this  
Followers 0
au3scr

screenhot

8 posts in this topic

How i can get started with screenhot making script?

i want set p to take screenshot and save it automatically.


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

$Dll=DllOpen("User32.dll")
$number=0
While 1
If _IsPressed("the p key goes here...", $Dll) Then
$number=$number+1
_ScreenCapture_Capture(@DesktopDir & "\ScreenShot" & $Number & ".jpg")
EndIf
Sleep(50)
WEnd

Edited by Swift

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

where u learn these user32.dll functions?

C:\Documents and Settings\rain\Desktop\printscr.au3(4,24) : ERROR: _IsPressed(): undefined function.

If _IsPressed("p", $Dll)

~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\rain\Desktop\printscr.au3(6,70) : ERROR: _ScreenCapture_Capture(): undefined function.

_ScreenCapture_Capture(@DesktopDir & "\ScreenShot" & $Number & ".jpg")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Documents and Settings\rain\Desktop\printscr.au3 - 2 error(s), 0 warning(s)

Edited by au3scr

Share this post


Link to post
Share on other sites

How i can get started with screenhot making script?

i want set p to take screenshot and save it automatically.

#include <ScreenCapture.au3>

HotKeySet("p", "capture")

Func capture()

_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image1.jpg")

EndFunc

While 1

Wend

Share this post


Link to post
Share on other sites

#include <ScreenCapture.au3>

HotKeySet("p", "capture")

Func capture()

_ScreenCapture_Capture(@MyDocumentsDir & "\GDIPlus_Image1.jpg")

EndFunc

While 1

Wend

oh and you need the latest autoit version :D

Share this post


Link to post
Share on other sites

That wasn't suppost to work Au3Scr. It was a example of what to do.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

oh,ok

ty anyway

Edited by au3scr

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