Jump to content

prospeed


jpam
 Share

Recommended Posts

  • Replies 511
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I was thinking this myself, if you could save out the altered Bitmap, then we could make an image type App like Paint shop Pro etc, drawing with a Sprite like a Stamp or paintbrush would be good too.. :)

You can program a function to click a Sprite, You can get the Sprite Pos with GetSpriteInfo and then use the normal autoit functions to get the Mouse Pos, and check for a mouse click.

2015 - Still no flying cars, instead blankets with sleeves.

Link to comment
Share on other sites

Hi!!

now it works by me fine, too and... i can only say one word: AMAZING!! respekt to you jpam and to you frank!! Thank you for this script/dll!

But: i will make now smth like this: i will coloring the desktop Grey (like by shuttding down windows when the dialog come: "Standby","Shutdown" and "restart") i make a screenshot with the captdll and save it as a bmp file.. then i'll load the gui with your function "Grey"! The gui is on fullscreen (0,0,@desktopwidth,@desktopheigth) and the grey-bmp is on 0,0 (left top) of the gui..then ived set it on top (WinSetOnTop) and: it works! now is my background grey! but: if i click at the gui (only a click... the gui is ontop!) then the gui will go where i clicked in the background :) so its isnt OnTop... Here is my script.. script needed the captdll.dll from Lazycat

CODE

#include <GUIConstants.au3>

#include <Prospeed.au3>

Opt("GUIOnEventMode", 1)

$gui = GUICreate("Prospeed",0, 0, @DesktopWidth, @DesktopHeight,$WS_POPUP)

WinSetOnTop($gui,"",1); OnTop... why doesnt work??

DesktopScreenShot()

ConsoleWrite(@error & @LF)

GUISetState()

;~ Background(@scriptdir & "Desktop.bmp", 0, 0)

Grey(@scriptdir & "Desktop.bmp", 0, 0)

Sleep(4000)

Exit

Func DesktopScreenShot()

Local $Quality = -1; Dateityp zum Speichern des Screenshots:

; -1 steht für *.BMP

; 1-100 steht für Qualität des *.JPG

If $Quality = -1 Then

Local $SaveAs = ".bmp"

Else

Local $SaveAs = ".jpg"

EndIf

Local $CaptureDirectory = @ScriptDir&""; Verzeichnis für die Screenshots

Local $CaptureFile = "Desktop" & $SaveAs

$ret = $CaptureDirectory & $CaptureFile

DllCall("captdll.dll", "int", "CaptureRegion", "str", $ret, "int", "0", "int", "0", "int", @DesktopWidth, "int", @DesktopHeight, "int", $Quality)

; $CaptureDirectory & $CaptureFile = zu speichernder Pfad und Name des Screenshots

; "0" = Links

; "0" = Oben

; @DesktopWidth = Breite

; @DesktopHeight = Höhe

; $Quality = BMP (-1) od. JPG (1-100)

If @error Then

$ret = 0

SetError(1)

MsgBox(16,"","")

EndIf

Return $ret

EndFunc ;==>DesktopScreenShot

Func _exit()

Exit

EndFunc

And here is how does it looks e.g. in Scite:

Posted Image

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Link to comment
Share on other sites

When you use Sprite() to create a sprite it seems like it uses the color of the topleft pixel as transparent. Is there any way to skip transparency for a sprite if I for example want a simple singlecolored square?

Link to comment
Share on other sites

@ GtaSpider

glad it works

prospeed can make his on screenshot or part of the screen to

and save it as bitmap to hd

can you post your script in file form

because when i copie the codebox to scite its one line code

@Psibernetic

Thanks

i hope you can make a lot of nice programs with it

Link to comment
Share on other sites

When you use Sprite() to create a sprite it seems like it uses the color of the topleft pixel as transparent. Is there any way to skip transparency for a sprite if I for example want a simple singlecolored square?

Create a square with a 1 pixel boarder of a different colour?

Do Sprites not use the Transpanancy setting of a Gif Jpam?

2015 - Still no flying cars, instead blankets with sleeves.

Link to comment
Share on other sites

you can't with sprites

I see. Maybe I should use images.

----

I really think the work so far is awesome but I've run into some problems. It's about keeping track of the sprites you got.

The Sprite() and CopySprite() adds the sprites to an array. Good. DeleteSprite() and DeleteAllSprites() doesn't remove them from the array however.

I'm not sure what's the best way to handle this but perhaps you could do either of:

1. Instead of having a global array with the sprites make Sprite() and CopySprite() return the value that is now stored in the global array. Then it's up to the programmer to keep track of his sprites. DeleteSprite() and DeleteAllSprites() could then be called with the value instead of a elementnumber.

2. Make DeleteSprite() and DeleteAllSprites() zero the element in the array and make Sprite() and CopySprite() use the lowest zeroed number in the array if there is one and othervise use _ArrayAdd like you do now. If it's done that way Sprite() and CopySprite() would have to return the element number so you know which place in the array they ended up in.

As I said I'm not a pro programmer so there might be some much more elegant way making usage much more simple.

Link to comment
Share on other sites

Hi!

oh?? realy? can prospeed take a screenshot? How called the function?

Qusetion^^: How can I add an attachment?? i can't see thms like an button "Add Attachment" :D am i silly :) ?

Maybe you can copy it so?:

#include <GUIConstants.au3>
#include <Prospeed.au3>

Opt("GUIOnEventMode", 1)

$gui = GUICreate("Prospeed",0, 0, @DesktopWidth, @DesktopHeight,$WS_POPUP)
WinSetOnTop($gui,"",1); OnTop... why doesnt work??


DesktopScreenShot()
ConsoleWrite(@error & @LF)
GUISetState()
;~ Background(@scriptdir & "\Desktop.bmp", 0, 0)
Grey(@scriptdir & "\Desktop.bmp", 0, 0)
Sleep(4000)

Exit
Func DesktopScreenShot()
    Local $Quality = -1; Dateityp zum Speichern des Screenshots:
    ; -1 steht für *.BMP
    ; 1-100 steht für Qualität des *.JPG
    If $Quality = -1 Then
        Local $SaveAs = ".bmp"
    Else
        Local $SaveAs = ".jpg"
    EndIf
    Local $CaptureDirectory = @ScriptDir&"\"; Verzeichnis für die Screenshots
    Local $CaptureFile = "Desktop" & $SaveAs
    $ret = $CaptureDirectory & $CaptureFile
    DllCall("captdll.dll", "int", "CaptureRegion", "str", $ret, "int", "0", "int", "0", "int", @DesktopWidth, "int", @DesktopHeight, "int", $Quality)
    ; $CaptureDirectory & $CaptureFile = zu speichernder Pfad und Name des Screenshots
    ; "0" = Links
    ; "0" = Oben
    ; @DesktopWidth = Breite
    ; @DesktopHeight = Höhe
    ; $Quality = BMP (-1) od. JPG (1-100)
    If @error Then
        $ret = 0
        SetError(1)
        MsgBox(16,"","")
    EndIf
    Return $ret
EndFunc   ;==>DesktopScreenShot



Func _exit()
    Exit
EndFunc

Mfg / Best regards Spider

www.AutoIt.de - Moderator of the German AutoIt Forum

 

Link to comment
Share on other sites

Added ScreenShot Function

Makes Screenshot in any resolution and any position of the screen

Saves picture as bmp or jpg to harddisk

"Spritesnames" and "mouseoversprites" are more complicated then i thought :)

But i keep working on it

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...