rush4hire Posted February 25, 2007 Share Posted February 25, 2007 Code here is taken from an old post by Larz http://www.autoitscript.com/forum/index.php?showtopic=20634And the floating merlin example that comes with AutoIt3 ( the example for GUICtrlCreatePic )I used IfranView to extract the frames from the gif, and then used the "Create Panorama image.." feature to make a long bmp.Then I made another one that's smaller..At first I loaded all the images in the same coords on the gui, and they where all hidden, and I would go through the array of control handles hiding and showing them. It worked great, but it kinda flickered, which looks cheap.Func Swimg() GUICtrlSetState($pics[$ccc], 32) $ccc += 1 If $ccc > 11 Then $ccc = 0 GUICtrlSetState($pics[$ccc], 16) EndFunc oÝ÷ Ù*!z··öƳ"¶èìZ^±«miÈfz{Here's the origional animated gifanimation_simulation.zip Decompilable game code manager for Dark Deeds 6 for Warcraft IIIA web broadcast TiVo like thing.. (this example is for 3abn.org)Finally.. AutoIt Pac-Man Digital Hymn Player Link to comment Share on other sites More sharing options...
_Kurt Posted February 25, 2007 Share Posted February 25, 2007 Wow this is really great!! I'm very impressed. Very nice example, thanks for sharing. I always wondered how to eliminate the white around the picture/gif. Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
_Kurt Posted February 26, 2007 Share Posted February 26, 2007 Bump: this is interesting, think more people should take a look at it. (I know it's an early bump ) Kurt Awaiting Diablo III.. Link to comment Share on other sites More sharing options...
rush4hire Posted March 4, 2007 Author Share Posted March 4, 2007 It would be nice to just use an animated gif, and if your script could extract the different images and put them together. But I guess the bmp compress very well. I thought bitmap was a very primitive image format because it's so big, but now I realize it compresses so well when you compile an .exe Decompilable game code manager for Dark Deeds 6 for Warcraft IIIA web broadcast TiVo like thing.. (this example is for 3abn.org)Finally.. AutoIt Pac-Man Digital Hymn Player Link to comment Share on other sites More sharing options...
Pakku Posted March 4, 2007 Share Posted March 4, 2007 (edited) Hi, you might like this replace this $gui=GUICreate("test transparentpic", 200, 100) oÝ÷ ÛØb±«¢+Ø(ÀÌØíÕ¤õU% ÉÑ ÅÕ½ÐíÑÍÐÑɹÍÁɹÑÁ¥ÅÕ½Ðì°ÈÀÀ°ÄÀÀ°´Ä°´Ä°´Ä°ÀÌØí]M}a}Q==1]%9=¤oÝ÷ ÚÞ½éÛzÛ^«¢+Ø(ÀÌØíÕ¤õU% ÉÑ ÅÕ½ÐíÑÍÐÑɹÍÁɹÑÁ¥ÅÕ½Ðì°ÈÀÀ°ÄÀÀ°´Ä°´Ä°´Ä°ÀÌØí]M}a}Q==1]%9=¬ÀÌØí]M}a}Q=A5=MP¤(oÝ÷ Øêð«]£*.¶§¦èºÛaÊÞ¦VzØb±«¢+Ø)¼(ÀÌØíµÍôU%Ñ5Í ¤)չѥ°ÀÌØíµÍôÀÌØíU%}Y9Q} 1=MoÝ÷ Ùú+¶¬jëh×6 do $msg = GUIGetMsg() $pos = MouseGetPos() WinMove($picgui,"",$pos[0]+5,$pos[1]) until $msg = $GUI_EVENT_CLOSE oÝ÷ Ø ãjzlü¨¹ÈZæ¢÷)à²f²mëazZ(¥«¢+Ø)¼(ÀÌØíµÍôU%Ñ5Í ¤)չѥ°ÀÌØíµÍôÀÌØíU%}Y9Q} 1=MoÝ÷ Ú+zÛ^®Ú¢+eG+ºÚ"µÍÚ[HBTÛY L BÑ[ÓÜÙÛÝÙHÎÚ[HBIÌÍÜÜÈH[ÝÙQÙ]ÜÊ BUÚ[[ÝJ ÌÍÜXÙÝZK ][ÝÉ][ÝË ÌÍÜÜÖÌJÍK ÌÍÜÜÖÌWJBÙ[ Edited March 4, 2007 by arjan staring How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
MajSlayer420 Posted March 5, 2007 Share Posted March 5, 2007 Could some please cut this code down some so that I can get this 7 picture gif splash screen going without the flicker? Its currently 2 complex for me to understand and get into my code Thanks MajSlayer420 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 6, 2007 Moderators Share Posted March 6, 2007 Could some please cut this code down some so that I can get this 7 picture gif splash screen going without the flicker?Its currently 2 complex for me to understand and get into my codeThanksMajSlayer420 That's funny!!!I don't think I've ever seen a request to Dummy Down a piece of code so someone could use it!!! A suggestion... If it's too complex for you to understand, you don't need to be using it... If you are sharing what you have with others, you may have something hurt the end-user because of your lack of understanding. 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. Link to comment Share on other sites More sharing options...
Valuater Posted March 6, 2007 Share Posted March 6, 2007 (edited) That's funny!!!I don't think I've ever seen a request to Dummy Down a piece of code so someone could use it!!! You know, I had to read that post about 5 times just to understand how "lame" the thinking really was... Then I did't even know how to respond to it!!!Glad you did!!! ( Dummy Down )BTW, Thanks for Sharing Rush8) Edited March 6, 2007 by Valuater Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted March 6, 2007 Share Posted March 6, 2007 That's funny!!!I don't think I've ever seen a request to Dummy Down a piece of code so someone could use it!!! A suggestion... If it's too complex for you to understand, you don't need to be using it... If you are sharing what you have with others, you may have something hurt the end-user because of your lack of understanding.he's probably talkin about the example.. not the udf Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted March 6, 2007 Share Posted March 6, 2007 try this.. expandcollapse popup#region -Example #include <GUIConstants.au3> HotKeySet("{ESC}", "_exit") Global $grspeed = 100, $nnn Global $gui,$bmpctrl Global $bmpfile = "looparrow_long.bmp" Global $bmphight = 87 Global $bmpwidth = 120 Global $bmpwidth2 = 1440 $gui=GUICreate("test transparentpic", 200, 100,-1,-1,-1,$WS_EX_TOOLWINDOW) $picgui=GUICreate("qqqqqq", $bmpwidth, $bmphight, 10, 10,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$gui) $bmpctrl = GUICtrlCreatePic( $bmpfile,0,0, 0,0) GUISetState(@SW_SHOW,$picgui) GUISetState(@SW_SHOW,$gui) WinSetTrans ( "test transparentpic", "", 0 ) $picPos = WinGetPos($picgui) $guiPos = WinGetPos($gui) $graphic = _ProgressInitiateGraphic($picgui,$bmpctrl,$bmpfile) While 1 _ProgressSwimg($nnn,$graphic,$bmpwidth,$bmpwidth2,$bmphight) sleep($grspeed) WEnd _exit() Func _exit() _ProgressDestroyGraphic($graphic) Exit EndFunc #endregion Func _ProgressSwimg(ByRef $nnn, $dllspecs,$bmpwidth,$bmpwidth2,$bmphight, $opendll = "gdi32.dll") Local Const $SRCCOPY = 0xCC0020 $nnn += $bmpwidth If $nnn > $bmpwidth2-1 Then $nnn = 0 DLLCall( $opendll, "int","BitBlt","int",$dllspecs[0],"int",0,"int",0,"int",$bmpwidth,"int", $bmphight, _ "int",$dllspecs[1],"int",$nnn,"int",0,"int",$SRCCOPY) EndFunc Func _ProgressInitiateGraphic(ByRef $hWin, ByRef $nID, $szFile) Local Const $GWL_HINSTANCE = -6 Local Const $IMAGE_BITMAP = 0 Local Const $LR_LOADFROMFILE = 0x0010 Local $dllspecs[4],$dll, $hwnd, $opendll,$phWnd,$dc,$dc1,$old $hwnd = WinGetHandle($hWin) $opendll = DllOpen("gdi32.dll") Local $dll = DllOpen("user32.dll") $hInst = DllCall($dll, "int", "GetWindowLong", "hWnd", $hwnd, "int", $GWL_HINSTANCE) $hBmp = DllCall($dll, "hwnd", "LoadImage", "hwnd", $hInst[0], "str", $szFile, _ "int", $IMAGE_BITMAP, "int", 0, "int", 0, "int", $LR_LOADFROMFILE) $phWnd = DLLCall($dll, "hwnd", "GetDlgItem", "hwnd", $hWin, "int", $nID) $dc = DllCall($dll,"int","GetDC","hwnd",$phWnd[0]) $dc1 = DLLCall($opendll,"int","CreateCompatibleDC","int",$dc[0]) $old = DLLCall($opendll,"hwnd","SelectObject","int",$dc1[0],"hwnd",$hBmp[0]) $dllspecs[0] = $dc[0] $dllspecs[1] = $dc1[0] $dllspecs[2] = $hBmp[0] $dllspecs[3] = $old[0] DllClose ($dll) Return $dllspecs EndFunc Func _ProgressDestroyGraphic($dllspecs) Local $opendll = DllOpen("gdi32.dll") DLLCall($opendll,"hwnd","SelectObject","int",$dllspecs[1],"hwnd",$dllspecs[3]) DLLCall("user32.dll","int","ReleaseDC","hwnd",0,"int",$dllspecs[0]) DLLCall($opendll,"int","DeleteDC","int",$dllspecs[1]) DLLCall($opendll,"int","DeleteObject","hwnd",$dllspecs[2]) DllClose($opendll) EndFunc Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
MajSlayer420 Posted March 6, 2007 Share Posted March 6, 2007 Sweet thank you very much. Seems it works perfect, But part of my picture is transparent and for the life of me I can seem to find where to turn this off in the code:( And thanks for the cleaned up code, helped a ton Thx MajSlayer420 Link to comment Share on other sites More sharing options...
experience Posted May 31, 2007 Share Posted May 31, 2007 Nice code - just one thing can the image be built into the exe as having to put it in the same folder is a bit messy Link to comment Share on other sites More sharing options...
nerdgerl Posted June 4, 2007 Share Posted June 4, 2007 You know, I had to read that post about 5 times just to understand how "lame" the thinking really was... Then I did't even know how to respond to it!!!Glad you did!!! ( Dummy Down )BTW, Thanks for Sharing Rush8)1. Unless you're the type that likes to laugh and call names at those who aren't as "advanced" as you, it's not funny at all. And I can't think of a "lamer" response than what the two of you made. Both of you have certainly lost my respect.2. There's a lot of code on this board that forces me to squint, scratch my head, and wonder WTF is going on between #Include and Exit. A little CODE COMMENTING within these scripts would be well appreciated by ANYONE. 3. You will be well advised to remember we all have skills in different areas, and chances are, I - as well as others here - have a few that would put you in your place!Now continue to stroke each other's egos. That seems to be another skill you've just perfected. My AutoIT's:[topic="53958"]Personal Encyclopedia/Dictionary[/topic][topic="46311"]MS Access (Style) Database[/topic]"Some people are born on third base and go through life thinking they hit a triple." Link to comment Share on other sites More sharing options...
Obi-w00t Posted June 4, 2007 Share Posted June 4, 2007 Well said, nerdgerl. I especially agree on number 2, sometimes it seems like I am the only person in the world who actually comments their code, not just for my own benefit but for the benefit of others if I decide to release it. I don't know if people think that it will make them look "noobish" or make their code look messy to include comments but it is a very good programming practice to get into. I also don't like it when people blindly rubbish peoples' requests and code. I am okay with criticism but insulting people because you think that their ideas are somehow beneath you is, in my opinion, just not on. [/rant] Still a pretty useful script, thanks for sharing - this one will be saved to the hard drive definitely. 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