laphlaw Posted March 30, 2006 Share Posted March 30, 2006 I got the following code snippet from gafrost: While 1 SplashImageOn($title, $screenshot,480,360,-300,-60) $hwnd = WinGetHandle("Live Screenshot") DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 250, "long", 0x00090000);fade-out Sleep ( 50 ) WinMove("Live Screenshot","",(@DesktopWidth/2)+350, (@DesktopHeight/2)+100) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 4000, "long", 0x00080000);fade-in Sleep ( 5000 ) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 4000, "long", 0x00090000);fade-out WEnd I have a couple questions with this: 1) Is the winmove necessary? Can you make it appear in a specified location instead of moving it from the top left corner? 2) How can you make the fade animation go faster? 3) I had trouble getting the image to display in the right location using the @desktopwidth macro... when I changed the resolution, the image was cut off at the corner. How could I fix this? 4) How do you know what functions to use in the user32dll? Do you just google it to find out what functions can be used? I'm a noob to DllCall. Thanks Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 30, 2006 Share Posted March 30, 2006 4) How do you know what functions to use in the user32dll? Do you just google it to find out what functions can be used? I'm a noob to DllCall.you can see functions with an dll/api viewer http://www.nirsoft.net/utils/dll_export_viewer.html *http://www.mentalis.org/agnet/apiviewer.shtmlhttp://www.activevb.de/rubriken/apiviewer/...iviewereng.html Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 30, 2006 Moderators Share Posted March 30, 2006 I got the following code snippet from gafrost: While 1 SplashImageOn($title, $screenshot,480,360,-300,-60) $hwnd = WinGetHandle("Live Screenshot") DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 250, "long", 0x00090000);fade-out Sleep ( 50 ) WinMove("Live Screenshot","",(@DesktopWidth/2)+350, (@DesktopHeight/2)+100) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 4000, "long", 0x00080000);fade-in Sleep ( 5000 ) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 4000, "long", 0x00090000);fade-out WEnd I have a couple questions with this: 1) Is the winmove necessary? Can you make it appear in a specified location instead of moving it from the top left corner? 2) How can you make the fade animation go faster? 3) I had trouble getting the image to display in the right location using the @desktopwidth macro... when I changed the resolution, the image was cut off at the corner. How could I fix this? 4) How do you know what functions to use in the user32dll? Do you just google it to find out what functions can be used? I'm a noob to DllCall. ThanksThe 250 and the 4000 are the speed in milliseconds (1/4 of a second and 4 seconds)... as far as the winmove, I didn't try it... but I would imagine that would be a preference by looking at it. 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...
laphlaw Posted March 31, 2006 Author Share Posted March 31, 2006 (edited) you can see functions with an dll/api viewer http://www.nirsoft.net/utils/dll_export_viewer.html * http://www.mentalis.org/agnet/apiviewer.shtml http://www.activevb.de/rubriken/apiviewer/...iviewereng.html Thanks, very useful resources. Quick question, though: DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 4000, "long", 0x00080000);fade-in I'm trying to break this down to understand it. What I don't understand is the last type and parameter at the end. How do you know what values to use? How did he know to use "long" and 0x00080000? I was poking around the sites you gave me, and I haven't seen a list of some sort of what values to use for what effects (such as the fade in). Appreciate the help... Oh, one more thing. Is there *any* way to get a smooth picture when its dynamic? I've been using SplashImageOn, and have it update the new image every second, but not surprisingly, it flashes. There's got to be a way... Edited March 31, 2006 by laphlaw 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