rakudave Posted May 8, 2006 Share Posted May 8, 2006 awsome! (both of them) Pangaea Ruler new, UDF: _GUICtrlCreateContainer(), Pangaea Desktops, Pangaea Notepad, SuDoku, UDF: Table Link to comment Share on other sites More sharing options...
Zedna Posted May 14, 2006 Share Posted May 14, 2006 (edited) Great work Lazycat and Blindwig Here is my improvment: As true screensaver it should end itself at any mouse/keyboard activity (also mouse click). So this kode in main loop do this: $keys = _Keys() While not $gDone ... Sleep(50 - $gSpeed) If _Keys() <> $keys Then $gDone = 1 WEnd Func _Keys() $struct = DllStructCreate ("byte[256]") DllCall("user32.dll", "int", "GetKeyboardState", "ptr", DllStructGetPtr ($struct)) $ret = '' For $i = 0 to 256 $ret &= DLLStructGetData($struct,1,$i) Next Return $ret EndFunc Only problem is with starting: it's so quick that keybord state of mouse click/Enter after start is not released yet and app is ended immediatelly. So there should be some time delay after start before testing KeyboardState. Edited May 14, 2006 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
blindwig Posted May 15, 2006 Share Posted May 15, 2006 Only problem is with starting: it's so quick that keybord state of mouse click/Enter after start is not released yet and app is ended immediatelly. So there should be some time delay after start before testing KeyboardState.I've written program that had that issue before. Instead of a static delay, wait until there is no input: Pseudo-code: ;Wait for no movement While MouseMovement() or KeysPressed() Sleep(50) Wend ;Main Loop, until movement While Not MouseMovement() or KeysPressed() ... Wend My UDF Threads:Pseudo-Hash: Binary Trees, Flat TablesFiles: Filter by Attribute, Tree List, Recursive Find, Recursive Folders Size, exported to XMLArrays: Nested, Pull Common Elements, Display 2dSystem: Expand Environment Strings, List Drives, List USB DrivesMisc: Multi-Layer Progress Bars, Binary FlagsStrings: Find Char(s) in String, Find String in SetOther UDF Threads I Participated:Base64 Conversions 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