Jump to content

Recommended Posts

Posted (edited)

Oke, Say, It saves a file called 001.jpg how can I make the next one save as 002.jpg, 003.jpg etc

$Window = InputBox("Window", "Window Title:") $RegionPos = WinGetPos($Window) WinActivate($Window) DllCall("captdll.dll", "int", "CaptureRegion", "str", "dump_partial.jpg", "int", $RegionPos[0], "int", $RegionPos[1], "int", $RegionPos[3], "int", $RegionPos[4], "int", 50)

C:\Documents and Settings\Asus\Desktop\Desktop\Scripts\ScreenShot.au3 (6) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: 
DllCall("captdll.dll", "int", "CaptureRegion", "str", "dump_partial.jpg", "int", $RegionPos[0], "int", $RegionPos[1], "int", $RegionPos[3], "int", $RegionPos[4], "int", 50) 
DllCall("captdll.dll", "int", "CaptureRegion", "str", "dump_partial.jpg", "int", $RegionPos[0], "int", $RegionPos[1], "int", $RegionPos[3], "int", ^ ERROR

Anyone know why this isnt working?

Nevermind, Stupid mistake :whistle:

New question.

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
  • Moderators
Posted

For $i = 1 To 10
    MsgBox(64, 'info', StringFormat('%03d', $i) & '.jpg')
Next

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.

Posted (edited)

How would I make it take "shots" slower?

For $i = 1 To 10
    $SaveFull = StringFormat("%03d", $i)
DllCall("captdll.dll", "int", "CaptureScreen", "str", $SaveFull & ".jpg", "int", 50)
Next

How can I make it take the screenshots slower? Im wanting to make it, like, when I exit the script, later, I can put them into moviemaker, and make, liek, a clip.

EDIT::

Or is there an easier way?

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
  • Moderators
Posted

Maybe a Sleep(Something)?

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.

Posted (edited)

I tryed that, didnt really help though. Would there be a way to record the screen? that avicap dll or something?

EDIT::

"avicap32.dll"

&

With your first example, Im trying to use it with the screenshot dll, but, its not working how I want it to, it just takes that amount of screenshots, I want it, everytime the certain key gets pressed, it will take the screenshot, but when it saves it, save it, but +1, example

;pressed F1

<takes screenshot. saves as 001.jpg>

;pressed f1 again

<takes screenshot. this time as 002.jpg>

etc

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
  • Moderators
Posted

Once again, an example of what you have tried to accomplish on your own (since my code isn't working for you) is a good way to get the "specific" help you are requiring.

HotKeySet('{PGUP}', '_ADDJPG')
Global $ADDTOJPG

While 1
    Sleep(1000)
WEnd

Func _ADDJPG()
    $ADDTOJPG += 1
    $JPGNew = String(StringFormat('%03d', $ADDTOJPG) & '.jpg')
    MsgBox(64, 'info', $JPGNew)
EndFunc

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.

Posted

Once again, an example of what you have tried to accomplish on your own (since my code isn't working for you) is a good way to get the "specific" help you are requiring.

HotKeySet('{PGUP}', '_ADDJPG')
Global $ADDTOJPG

While 1
    Sleep(1000)
WEnd

Func _ADDJPG()
    $ADDTOJPG += 1
    $JPGNew = String(StringFormat('%03d', $ADDTOJPG) & '.jpg')
    MsgBox(64, 'info', $JPGNew)
EndFunc
Thanks.
# MY LOVE FOR YOU... IS LIKE A TRUCK- #

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
×
×
  • Create New...