Sign in to follow this  
Followers 0
pjotterke

making printscreen

10 posts in this topic

Hi guys i want to make a prints screen of a screen this is my code...

DllCall("captdll.dll", "int", "CaptureScreen", "str", $input_1, "int", 85)

But i want to make "$input_1" like this "$input_1.JPG"

understand?

how can i do that

Share this post


Link to post
Share on other sites



If $input_1 is for the name of the picture, then this may do.

$input_1 = "PictureName.jpg"
DllCall("captdll.dll", "int", "CaptureScreen", "str", $input_1, "int", 85)

:whistle:

Share this post


Link to post
Share on other sites

thanks for the Reply MHz

but there is a little prob $input_1 is a variable and iam using it in an other script...

so if i use your script he gives a "0" :S:S

verry odd...

so he wants to use input_1 to times...

Share this post


Link to post
Share on other sites

thanks for the Reply MHz

but there is a little prob $input_1 is a variable and iam using it in an other script...

so if i use your script he gives a "0" :S:S

verry odd...

so he wants to use input_1 to times...

Look at DLLCall in the help file to understand the return values (You'll also note, that if successful that DLLCall() will return an array).

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Look at DLLCall in the help file to understand the return values (You'll also note, that if successful that DLLCall() will return an array).

i have looked @ the helpfile...

but didn't understand thats why i have asked on the forum :whistle:

i just don't understand how i have to make a jpg with a variable...

i can do it if i have a name... like picture

then it's onlue picture.jpg thats easy but with a variable it is different...

Share this post


Link to post
Share on other sites

i have looked @ the helpfile...

but didn't understand thats why i have asked on the forum :whistle:

No kidding... and I gave you an answer directly, but you also need read it... if you can't understand something in the help file, then ask the question specifically on the help file.

i just don't understand how i have to make a jpg with a variable...

i can do it if i have a name... like picture

then it's onlue picture.jpg thats easy but with a variable it is different...

You can't store the picture like you want the way you want in a variable and just display it. There, saved you alot of time.

P.S.

PaulIA has some screen capture options in his AU3 library in the example scripts forum.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

$input_2 = "PictureName.jpg"

DllCall("captdll.dll", "int", "CaptureScreen", "str", $input_2, "int", 85)


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

im thinking he has $Input_1 as a user input..

in which case, he needs to "stitch" the .jpg onto the end of it during the Dll call

$Input_1 = String("Picture")
$input_2 = String($Input_1&".jpg")
DllCall("captdll.dll", "int", "CaptureScreen", "str", $input_2, "int", 85)

Share this post


Link to post
Share on other sites

$pic = GuiCtrlRead($input_1)

$pic = $pic & ".jpg"

DllCall("captdll.dll", "int", "CaptureScreen", "str", $pic, "int", 85)


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

$pic = GuiCtrlRead($input_1)

$pic = $pic & ".jpg"

DllCall("captdll.dll", "int", "CaptureScreen", "str", $pic, "int", 85)

thanks for the reply it works..!!

only 1 thing not:(

i want to give the JPG a name that i have put in on input_1

now it gives a "0" (not good)

is that because he thinks he have to give the JPG 2 names ore something elsE?

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