jpam Posted February 25, 2008 Author Share Posted February 25, 2008 (edited) Above script creates empty bitmap and fill it half with blue and half with red in the loop it looks if an pixeldata has the value of the blue color if it finds one, it change it value to white i dont do any with the created $ArrayData[$i] that part is for you Edited February 25, 2008 by jpam Link to comment Share on other sites More sharing options...
Kilhian Posted February 25, 2008 Share Posted February 25, 2008 lol ... fastest than Fedex platinum... 4 hours delivery Link to comment Share on other sites More sharing options...
Kilhian Posted February 26, 2008 Share Posted February 26, 2008 I've take $arraydata and modify some pixels values. thenI did a _arraytostring($arraydata,"") to make a long string so i copy paste your function drawsprite() to generate a bitmap from the string ... $bitmap3 = DrawSprite(1,_ArrayToString($ArrayData,""),$width,$height) CopyArray($hdc, 300, 0, $bitmap3) then a big crash the same effect if I do CopyArray($hdc, 300, 0, $arraydata) i'm really dumb Link to comment Share on other sites More sharing options...
jpam Posted February 26, 2008 Author Share Posted February 26, 2008 (edited) CopyArray($hdc, 300, 0, $bitmap3) , you cant copy bitmapdata with "CopyArray" only arraydata ! But why turn it in to a long string with "_arraytostring" You can modify some pixels directly in the picture array copy the Array back to an empty bitmap "CopyArray($empty_bitmap, 300, 0, $array)" And save it with "SaveExtImage($empty_bitmap, "C:\new_bitmap.bmp", 0, 10)" The routine is slow , but if you know the offset of the colordata in the array you can make it allot faster ! i am dumb too ! Most of this stuff i learned from frank, he is a real code magician Edited February 26, 2008 by jpam Link to comment Share on other sites More sharing options...
Nordwind Posted February 26, 2008 Share Posted February 26, 2008 (edited) InitExtFX() generates image-datas of an image. The result of this function is a handle to following structure:0 LONG Size of these structure without pointer to memory (40 Bytes) 4 LONG biWidth, width if the image 8 LONG biHeight, height of the image 12 WORD biPlanes, always 1 14 WORD biBitCount, always 24 16 LONG biCompression, always BI_RGB 20 LONG biSizeImage, size of image-datas in bytes 24 LONG biXPelsPerMeter, not fpr user-interest 28 LONG biYPelsPerMeter, not fpr user-interest32 LONG biClrUsed, not for user-interest36 LONG biClrImportant, not for user-interest40 LONG Pointer of a memory with imagedatas Edited February 27, 2008 by Nordwind Link to comment Share on other sites More sharing options...
Dellairion Posted February 27, 2008 Share Posted February 27, 2008 Lol, voice acting by your wife . Btw, It works on Windows XP on my own computer so i gues it was just a Vista issue. And thanks for making things like this possible in autoit Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
jpam Posted February 29, 2008 Author Share Posted February 29, 2008 (edited) posted new fx-imagedemo.exeposted new source--imagedemo.au3posted new prospeed.udfFixed some bugs that the demo did crash at start.Fixed aftertitles not shown on some computers.Added "#RequireAdmin" in the script for vista users, don't know if it helps.Cannot test it myself , i dont have vista.All new effects are added incl 2 waterdemos.and has now screen buffers for WM_PAINT.http://prospeed-jan.xprofan.com/ Edited February 29, 2008 by jpam Link to comment Share on other sites More sharing options...
suppa2 Posted March 1, 2008 Share Posted March 1, 2008 I can't include your udf. whenever i do so, it gives me the following error: ERROR: $WM_PAINT previously declared as a 'Const' Global Const $WM_PAINT = 0x000F ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ Link to comment Share on other sites More sharing options...
jpam Posted March 1, 2008 Author Share Posted March 1, 2008 use last version of autoit ! Link to comment Share on other sites More sharing options...
suppa2 Posted March 1, 2008 Share Posted March 1, 2008 I'm sorry but I've got the last version (from 25th November, 2007 ) Link to comment Share on other sites More sharing options...
jpam Posted March 1, 2008 Author Share Posted March 1, 2008 i use v3.2.11.0 (beta) Seems that v3.2.10.0 allready has Declared WM_PAINT Comment this line in prospeed udf "Global Const $WM_PAINT = 0x000F" Link to comment Share on other sites More sharing options...
GEOSoft Posted March 1, 2008 Share Posted March 1, 2008 i use v3.2.11.0 (beta)Seems that v3.2.10.0 allready has Declared WM_PAINT Comment this line in prospeed udf "Global Const $WM_PAINT = 0x000F"It's also declared in WindowsConstants.au3 in v3.2.11.0 and v3.2.11.1 (beta) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
jpam Posted March 4, 2008 Author Share Posted March 4, 2008 New Function "MergeImagePng"Merge The Image data From 2 Png Image filesCombined With MergeChannelPng you can get a morph Effect with Png imagesUpdated FX-ImageDemo.exe Updated fx-mergeChannelpng.exe and renamed to "fx-mergeimagepng.exe"New WaterDemo with Mask image "fx-waterwithmask.exe" added source files Updated New Prospeed.dll and Udf filehttp://prospeed-jan.xprofan.com/ Link to comment Share on other sites More sharing options...
suppa2 Posted March 4, 2008 Share Posted March 4, 2008 (edited) I just wanted to test source--mergeimagepng.au3 and source--paintpng-with-background-buffering.au3. There was still the error withGlobal Const $WM_PAINT = 0x000Fand after i commented it out, autoit just crashed directly when i started it (windows said something like autoit3 has just caused an error and must quit).Note: I tested it here under windows 2k because at this place is no xp.Is this UDF win2k compatible?are you sure that you use the lastest autoit version?Except that i can't get it to work, I really like your udf. The demos look great EDIT: I just realized that you /fileinstalled/ some files that arent included in the downloads.Anyway, i tried to launch the compiled version and it gave me the same windows-error, as before. seems like your dll does really not work under 2k.EDIT2: Now thats strange: after i ran your exe the first time both exe and au3 are working O_O Edited March 4, 2008 by suppa2 Link to comment Share on other sites More sharing options...
jpam Posted March 4, 2008 Author Share Posted March 4, 2008 When you try to run an source file without Image files, then it will crash ! Run the compiled version first , to get the Images or use your own Image files i included the source files so people can look how the effects are done Its strange that the demos does not run the first time Mybe it has todo with fileinstall , vista users have the same problem mybe i have to put some sleep functions between the fileinstalls i'm glad that it works under windows 2k too Link to comment Share on other sites More sharing options...
jpam Posted March 11, 2008 Author Share Posted March 11, 2008 I have put a new Demo online "Book of Secrets" (book.exe)http://prospeed-jan.xprofan.com/kind Regards jpam Link to comment Share on other sites More sharing options...
Dellairion Posted March 11, 2008 Share Posted March 11, 2008 Is it possible to add some sort of inputbox on a sprite? Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
Dellairion Posted March 15, 2008 Share Posted March 15, 2008 (edited) Hmms I'm trying to get my "falling snow on desktop" script back to work but it doesn't want to work anymore with the new udf atleast for me it isn't, i could use some advice/help. I've tryed creating an example script to find out whats wrong but i just can't get it to work. expandcollapse popup; include #include "include\prospeed.au3" ; Options ;#NoTrayIcon #RequireAdmin _Singleton(@ScriptName) Opt("RunErrorsFatal", 0) ; Variables $Snowflake = @ScriptDir&"\Files\snow.bmp" $SnowflakeSize = 15 $Sprites = 10 Dim $SpriteList[$Sprites+1], $SpriteLoc=0 ; ==================== Snow ==================== WinMinimizeAll() Sleep(100) GetDesktopHDC() ; Required for desktop sprites Sleep(100) $Snowflake_Load = LoadSprite($Snowflake) ; Snowflake picture x1 Picture y1 Picture x2 Picture y2 Frames Startframe Framespeed X loc Y loc $SpriteList[1] = Sprite($Snowflake_Load, 0, 0, $SnowflakeSize, $SnowflakeSize, 1, 1, 0, 0, -$SnowflakeSize-1) SpriteToHDC($SpriteList[1]) ; Move 1st sprite to desktop SetSpritePos($SpriteList[1], 0, -$SnowflakeSize-1, 0, @DesktopHeight+$SnowflakeSize+1) ; Let the sprite fall down $i = 2 Do $SpriteLoc += $SnowflakeSize+1 $SpriteList[$i] = CopySprite($SpriteList[1]) SpriteToHDC($SpriteList[$i]) ; Move sprite to desktop SetSpritePos($SpriteList[$i], $SpriteLoc, -$SnowflakeSize-1, $SpriteLoc, @DesktopHeight+$SnowflakeSize+1) ; Let the sprite fall down $i += 1 Until $i > $Sprites While 1 ; WEnd Any help would be appreciated. Thnx Dellairion Edited March 15, 2008 by Dellairion Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
jpam Posted March 16, 2008 Author Share Posted March 16, 2008 You have to set the spritebuffer manual with createbuffer() and setbuffer() its alot easyer now to chance background for sprites and WM_PAINT first createbuffer() with your window dimentions like "createbuffer(800,600)" and then "setbuffer($yourbackgroundpicture)" you can easy change that to "setbuffer($newbackgroundpicture)" so all the sprites get this new backgroundbuffer and are painting correctly to the new background example below; expandcollapse popup; include #include <prospeed.au3> ; Options ;#NoTrayIcon #RequireAdmin ;~ _Singleton(@ScriptName) ;~ Opt("RunErrorsFatal", 1) ; Variables $Snowflake = "snow.bmp" $SnowflakeSize = 27 $Sprites = 10 Dim $SpriteList[$Sprites+1], $SpriteLoc=0 ; ==================== Snow ==================== WinMinimizeAll() Sleep(100) GetDesktopHDC() ; Required for desktop sprites Sleep(100) CreateBuffer(@DesktopWidth,@DesktopHeight) SetBuffer($hdc) $Snowflake_Load = LoadSprite($Snowflake) ; Snowflake picture x1 Picture y1 Picture x2 Picture y2 Frames Startframe Framespeed X loc Y loc $SpriteList[1] = Sprite($Snowflake_Load, 0, 0, $SnowflakeSize, $SnowflakeSize, 1, 1, 0, 0, -$SnowflakeSize-1) SpriteToHDC($SpriteList[1]) ; Move 1st sprite to desktop SetSpritePos($SpriteList[1], 0, -$SnowflakeSize-1, 0, @DesktopHeight+$SnowflakeSize+1) ; Let the sprite fall down $i = 2 Do $SpriteLoc += $SnowflakeSize+1 $SpriteList[$i] = CopySprite($SpriteList[1]) SpriteToHDC($SpriteList[$i]) ; Move sprite to desktop SetSpritePos($SpriteList[$i], $SpriteLoc, -$SnowflakeSize-1, $SpriteLoc, @DesktopHeight+$SnowflakeSize+1) ; Let the sprite fall down $i += 1 Until $i > $Sprites While 1 ; WEnd Link to comment Share on other sites More sharing options...
Dellairion Posted March 16, 2008 Share Posted March 16, 2008 Thank you so much jpam. Grtz Dellairion Hot Key ControllerPinball Trainer? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now