layer Posted April 2, 2005 Share Posted April 2, 2005 Just messing around... but for this DllCall DllCall("user32.dll", "int", "FlashWindow", "hWnd", "Windows Media Player",;Boolean?, "FALSE") Is this possible to do because of the BOOL statement? I don't think so... =/ But I though I'd just double check... FootbaG Link to comment Share on other sites More sharing options...
Valik Posted April 2, 2005 Share Posted April 2, 2005 Just messing around... but for this DllCallDllCall("user32.dll", "int", "FlashWindow", "hWnd", "Windows Media Player",;Boolean?, "FALSE")Is this possible to do because of the BOOL statement? I don't think so... =/ But I though I'd just double check...<{POST_SNAPBACK}>I can't believe you would ask this and have/are attempting to learn C++. Basic types, a book may teach you these minor details where-as a tutorial will not (At least not sufficiently). Link to comment Share on other sites More sharing options...
layer Posted April 2, 2005 Author Share Posted April 2, 2005 Thanks. FootbaG Link to comment Share on other sites More sharing options...
layer Posted April 2, 2005 Author Share Posted April 2, 2005 Ok... I know that an "int" is a number, but I still tried supplying "TRUE" and "FALSE" for it, then I even tried 1 and 0... expandcollapse popup$Dll = DllOpen("user32.dll") ;First attempt...: $hWnd = "Windows Media Player" DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", "TRUE") Sleep(1000) DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", "TRUE") ;Second attempt...: DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", "FALSE") Sleep(1000) DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", "FALSE") ;Third attempt...: DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", "TRUE") Sleep(1000) DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", "FALSE") ;Fourth attempt...: DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", "FALSE") Sleep(1000) DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", "TRUE") ;Fifth attempt...: DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 1) Sleep(1000) DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 1) ;Sixth attempt...: DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 0) Sleep(1000) DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 1) ;Seventh attempt...: DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 0) Sleep(1000) DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 0) DllClose($Dll)I know it's something obvious im missing... Or...? Here's the source I got it from: http://msdn.microsoft.com/library/default....flashwindow.aspSuggestions?Thanks! FootbaG Link to comment Share on other sites More sharing options...
Developers Jos Posted April 2, 2005 Developers Share Posted April 2, 2005 try this version: $Dll = DllOpen("user32.dll") ;First attempt...: $hWnd = WinGetHandle("") For $x = 1 to 5 DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 1) Sleep(1000) Next DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 1) DllClose($Dll) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
layer Posted April 2, 2005 Author Share Posted April 2, 2005 @JdeB, Thanks! Works perfectly @Larry, Oops, forgot :"> Thanks for the support FootbaG Link to comment Share on other sites More sharing options...
layer Posted April 2, 2005 Author Share Posted April 2, 2005 (edited) Sorry... To be such a bother but, I've made a function, with the help of you guys, called _WinFlash and I have two optional paremeters.Func _WinFlash($hWnd, $OptDelay = 500, $OptFlashes = 2);Thanks to Larry and JdeB $Dll = DllOpen("user32.dll") For $x = 1 to $OptFlashes DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 1) Sleep($OptDelay) Next DllClose($Dll) EndFunc _WinFlash(WinGetHandle("Windows Media Player"), 1, 10)Now, for some reason, specifying 10 flashes, it only flashes twice, although the delay works? I tried removing the Optional delay paremeter and then the window flashed 10 times... Is there a limit to optional paremeters? Or something that I've missed...Thanks so much... EDIT: Removed the DllCall after the Next... Edited April 2, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
Developers Jos Posted April 2, 2005 Developers Share Posted April 2, 2005 Sorry... To be such a bother but, I've made a function, with the help of you guys, called _WinFlash and I have two optional paremeters.Func _WinFlash($hWnd, $OptDelay = 500, $OptFlashes = 2);Thanks to Larry and JdeB $Dll = DllOpen("user32.dll") For $x = 1 to $OptFlashes DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 1) Sleep($OptDelay) Next DllCall($Dll, "int", "FlashWindow", "hWnd", $hWnd, "int", 1) DllClose($Dll) EndFunc _WinFlash(WinGetHandle("Windows Media Player"), 1, 10)Now, for some reason, specifying 10 flashes, it only flashes twice, although the delay works? I tried removing the Optional delay paremeter and then the window flashed 10 times... Is there a limit to optional paremeters? Or something that I've missed...Thanks so much... <{POST_SNAPBACK}>Works fine... Guess 1 ms is to short to see what happends... try it with 1000..ps: you need to remove the last DllCall() after the next .. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
layer Posted April 2, 2005 Author Share Posted April 2, 2005 Yep, looks like the $OptDelay is the problem... Not really the problem, but as you said, if it's too little, you may not see all of the flashes, thanks! FootbaG 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