bafh Posted July 17, 2005 Share Posted July 17, 2005 (edited) Hello, can anyone explain this code to me??? like a short reference Opt('WinTitleMatchMode', 4) $hwnd = WinGetHandle('classname=Progman') DllCall('user32.dll', 'int', 'SendMessage', 'hwnd', $hwnd, 'int', 274, 'int', 61808, 'int', 2) Sleep(5000) Send ("{Up}") Its pretty cool, how do i make the screen stay off longer without doing the DllCall again? Thanks alot Edited July 17, 2005 by bafh Link to comment Share on other sites More sharing options...
FuryCell Posted July 17, 2005 Share Posted July 17, 2005 Hello, can anyone explain this code to me??? like a short referenceOpt('WinTitleMatchMode', 4) $hwnd = WinGetHandle('classname=Progman') DllCall('user32.dll', 'int', 'SendMessage', 'hwnd', $hwnd, 'int', 274, 'int', 61808, 'int', 2) Sleep(5000) Send ("{Up}")Its pretty cool, how do i make the screen stay off longer without doing the DllCall again?Thanks alot<{POST_SNAPBACK}>Change the Sleep. For example to blank for ten seconds change 5000 to 10000 (1000 ms = 1 sec)Opt('WinTitleMatchMode', 4) $hwnd = WinGetHandle('classname=Progman') DllCall('user32.dll', 'int', 'SendMessage', 'hwnd', $hwnd, 'int', 274, 'int', 61808, 'int', 2) Sleep(10000) Send ("{Up}") HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
bafh Posted July 19, 2005 Author Share Posted July 19, 2005 Hmm this seems to work very differently on different pcs! on mine i have to refresh it every half second or the screen will turn on. on a friends pc this does not have any effect at all. all on xp.... what to do? Link to comment Share on other sites More sharing options...
bafh Posted July 19, 2005 Author Share Posted July 19, 2005 Well: SC_MONITORPOWER Sets the state of the display. This command supports devices that have power-saving features, such as a battery-powered personal computer. The lParam parameter can have the following values: 1 - the display is going to low power 2 - the display is being shut off So my friend doesnt seem to have a monitor with powermenagement. how else could i turn off ANY monitor with autoit? Are there any conflicts with autoit and winxp sp2 known by the way? Link to comment Share on other sites More sharing options...
w0uter Posted July 19, 2005 Share Posted July 19, 2005 i use XP home SP2 and never had a singe problem. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
bafh Posted July 19, 2005 Author Share Posted July 19, 2005 Okay thank. But still, does anyone know how to turn off any screen using autoit? without using SC_MONITORPOWER Link to comment Share on other sites More sharing options...
w0uter Posted July 19, 2005 Share Posted July 19, 2005 other then setting the refresh rate so high that it explodes, i cant think of anything. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
/dev/null Posted July 19, 2005 Share Posted July 19, 2005 other then setting the refresh rate so high that it explodes, i cant think of anything.well, there are IP controlable power strips on the market. http://www.leunig.de/_en/_pro/remote-power-switch/eps.htm. This will definitely turn off the screen CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Helge Posted July 20, 2005 Share Posted July 20, 2005 Okay thank.But still, does anyone know how to turn off any screen using autoit?without using SC_MONITORPOWER<{POST_SNAPBACK}>You see that round button in the lower right corner of your monitor ?Try to press it.. always works for me If that doesn't work, then unplugging either the cable that goes to thewall or to the back of your computer should do it.. Good luck btw ! Link to comment Share on other sites More sharing options...
blindwig Posted July 20, 2005 Share Posted July 20, 2005 Turning the monitor off manually defeats the purpose of scripting it! /DEV/NULL has the best idea. I've never used that particular brand before, but I've used similiar products. They're great for when you need to remotely (or programatically) hard-boot a server or other equipment. I prefer the serial-based ones over the IP-based ones, because the serial ones you can plug a modem into and still be able to dial in if your IP infrastructure (switches/routers/firewall/etc) is what you need to boot. 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