Jump to content

Screenshoot While Minimezed


Recommended Posts

Hi everyone, im new at this language but i find it awesome!!

While trying to lear about it i started creating a script that will take a screenshoot of Winamp, but just a part of it that i want.

The thing is that a can't get it to work while its minimized..

Here's the code

#include <ScreenCapture.au3>

global $WinHndl,$PicName,$PicPath,$GuiMatt,$Titulo,$Ventana,$NeedResize=0
if WinExists("","Winamp") Then
    ;MsgBox(0,"",winGetTitle("","Winamp"))
    ;exit
    WinActivate("","Winamp")
    go()

Else
    Exit
EndIf



Func Go()

        $size = WinGetPos("","Winamp")
        if $size[0]<> 313 Then
            $NeedResize=1
        EndIf
        if $size[1]<> 102 Then
            $NeedResize=1
        EndIf
        if $size[2]<> 1486 Then
            $NeedResize=1
        EndIf
        if $size[3]<> 869 Then
            $NeedResize=1
        endif
        if $NeedResize=1 Then

            WinMove("","Winamp",313,102,1486,869,1)
            $NeedResize=0
        EndIf



            $Titulo=WinGetTitle("","Winamp")
            $WinHndl=WinGetHandle($Titulo,"Winamp")
            $PicName=@MyDocumentsDir & "\aaaaprueba8.jpg"
            $PicPath="C:\Users\Matt\Desktop\Digitaled Imported Download\" & "Tema "&  @MON & "-" & @MDAY& " " & @HOUR & "-" & @MIN &".jpg"
            winwait($Titulo,"Winamp")
            _ScreenCapture_CaptureWnd($PicPath,$WinHndl,305,29,1084,141)
            beep(2014,375)
            beep(2014,375)




    WinSetOnTop("","Winamp",0)


EndFunc

The aim is to get the artits and artist on a screenshoot, all while in background and/or minimized

Can anyone help me the make it work? Is it posible?

Thanks a lot !

PS: Not most brilliant english typer xD

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...