Xenobiologist Posted January 19, 2007 Share Posted January 19, 2007 Hi, the image loads wrong. expandcollapse popup#include <prospeed.au3> #include <GUIConstants.au3> $r = GUICreate("My GUI", 400, 400, 300, 300) ; will create a dialog box that when displayed is centered $b = GUICtrlCreateButton("close", 10, 10, 100, 30) GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $b Then $gui = _GreyBackground(0, 1, 1) Sleep(500) GUIDelete($r) Sleep(500) GUIDelete($gui) Exit(0) EndIf WEnd Func _GreyBackground($iBlur = 0, $iFade = 0, $onTop = 1) Local $iGui = GUICreate("Prospeed", @DesktopWidth, @DesktopHeight, 0, 0, -2147483648, 128);$WS_POPUP, $WS_EX_TOOLWINDOW If $onTop Then WinSetOnTop($iGui, "", 1) ScreenShot (@ScriptDir & "\Desktop.jpg", @DesktopWidth, @DesktopHeight, 0, 0, 1) WinSetTrans($iGui, "", 1) GUISetState() $dsktop = LoadImage (@ScriptDir & "\Desktop.jpg", 0, 0, 1) Grey ($dsktop, 0, 0, 1) If $iFade Then For $i = 1 To 255 Step 5 WinSetTrans($iGui, "", $i) Next WinSetTrans($iGui, "", 255) Else ;WinSetTrans($iGui, "", 254) WinSetTrans($iGui, "", 255) EndIf If $iBlur Then blur ($dsktop, 0, 0, 30, 1) Return $iGui EndFunc ;==>_GreyBackground So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Lakes Posted January 19, 2007 Share Posted January 19, 2007 (edited) Try this as a test.. #include <prospeed.au3> #include <GUIConstants.au3> #include <Misc.au3> Opt("PixelCoordMode",2) $dll = DllOpen("user32.dll") HotKeySet("{Esc}","_exit") ScreenShot (@ScriptDir & "\ScrnShot.jpg", 800, 400, 0, 0, 1) While 1 $pos = MouseGetPos() $PosX = $pos[0] $PosY = $pos[1] ToolTip("PosX "&$PosX &" PosY " &$PosY,50,50) If _IsPressed("01", $dll) Then Beep(100,100) ScreenShot (@ScriptDir & "\ScrnShot.jpg", 800, 400, $PosX,$PosY, 1) ExitLoop EndIf Sleep(10) WEnd $gui = GUICreate("Prospeed",800, 400, -1, -1,$WS_POPUP) GUISetState() $ScrnCap = LoadImage (@ScriptDir & "\ScrnShot.jpg", 0, 0, 1) Grey ($ScrnCap, 0, 0, 1) ;blur($ScrnCap, 0,0,20,1) While 1 Sleep(10) WEnd Func _exit() DllClose($dll) Exit EndFunc Edited January 19, 2007 by Lakes 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Lakes Posted January 19, 2007 Share Posted January 19, 2007 I think this should work... expandcollapse popup#include <prospeed.au3> #include <GUIConstants.au3> $r = GUICreate("My GUI", 400, 400, 300, 300) ; will create a dialog box that when displayed is centered $b = GUICtrlCreateButton("close", 10, 10, 100, 30) GUISetState(@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $b Then $gui = _GreyBackground(0, 1, 1) Sleep(500) GUIDelete($r) Sleep(500) GUIDelete($gui) Exit(0) EndIf WEnd Func _GreyBackground($iBlur = 0, $iFade = 0, $onTop = 1) ControlFocus("Program Manager","","SysListView321") ScreenShot (@ScriptDir & "\Desktop.jpg", @DesktopWidth, @DesktopHeight, 0, 0, 1) Local $iGui = GUICreate("Prospeed", @DesktopWidth, @DesktopHeight, 0, 0, -2147483648, 128);$WS_POPUP, $WS_EX_TOOLWINDOW If $onTop Then WinSetOnTop($iGui, "", 1) WinSetTrans($iGui, "", 1) GUISetState() $dsktop = LoadImage (@ScriptDir & "\Desktop.jpg", 0, 0, 1) Grey ($dsktop, 0, 0, 1) If $iFade Then For $i = 1 To 255 Step 5 WinSetTrans($iGui, "", $i) Next WinSetTrans($iGui, "", 255) Else ;WinSetTrans($iGui, "", 254) WinSetTrans($iGui, "", 255) EndIf If $iBlur Then blur ($dsktop, 0, 0, 30, 1) Return $iGui EndFunc ;==>_GreyBackground 2015 - Still no flying cars, instead blankets with sleeves. Link to comment Share on other sites More sharing options...
Xenobiologist Posted January 20, 2007 Author Share Posted January 20, 2007 Hi, thanks! So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times 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