Sign in to follow this  
Followers 0
Awais

Action Recorder

1 post in this topic

I'm new To Autoit 

:geek:  

Program record Pic To D:pic 

:thumbsup:

 Press CTRL + ALT + ESC To exit

#RequireAdmin
#NoTrayIcon
#include <Date.au3>
#include <ScreenCapture.au3>

Global $address = "D:\PIC"
HotKeySet("^!{ESC}","exxxxx")
DirCreate($address)
Global $pos = MouseGetPos()

if @OSArch = 'X64' Then
    Local $NUMBER = RegRead("HKEY_CURRENT_USER64\Software\Test", "NO")
        If @error Then
        $NUMBER = 0
    EndIf
Else
    Local $NUMBER = RegRead("HKEY_CURRENT_USER\Software\Test", "NO")
        If @error Then
        $NUMBER = 0
    EndIf
EndIf
While 1
    Global $pos2 = MouseGetPos()
    If $pos[0] = $pos2[0] And $pos[1] = $pos2[1] Then
        Sleep(100)
    Else
        takepic()
        Global $pos = $pos2
    EndIf
WEnd
Func exxxxx()
    Exit
EndFunc

Func takepic()
    $NUMBER = $NUMBER + 1
    If @OSArch = 'X64' Then
        RegWrite("HKEY_CURRENT_USER64\Software\Test", "NO", "REG_SZ", $NUMBER)
    Else
        RegWrite("HKEY_CURRENT_USER\Software\Test", "NO", "REG_SZ", $NUMBER)
    EndIf
    _ScreenCapture_Capture($address&"\"&$NUMBER&".PNG")
    Sleep(1000)
EndFunc

:bye:

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