Jump to content

Config help. Can't find the topic I found earlier...


Recommended Posts

I am currently working on a (small) project, which will set my pc screen blank for x seconds and then turn it back on. The code looks like this now (I've copied the blackscreen func and put some other variables in):

func BlackFor($time)
Global $untilback = $time
EndFunc


BlackFor(5000); Sets how long the screen should be black, in milliseconds.

func screenFlicker()
Opt("WinTitleMatchMode", 4)
$WM_SYSCommand = 274
$SC_MonitorPower = 61808
$Power_On = -1
$Power_Off = 2
$X = 1
$HWND = WinGetHandle("classname=Progman")
DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_Off)
Sleep($untilback)
DllCall("user32.dll", "int", "SendMessage", "hwnd", $HWND, "int", $WM_SYSCommand, "int", $SC_MonitorPower, "int", $Power_On)
endFunc


screenFlicker()

But, when I start a project and it works, I want to make it even better. So I thought about a GUI which sets the milliseconds to a config file. I understand the GUI part, but I need a solution of a config file. I saw a topic some months ago with a config script saver - which I can't find anymore. I've searched on Google, AutoIt forums.. can't find that excact one. It had functions like ConfgWrite and ConfgRead I think. :P I've looked into the AutoIt config systems, but I really want a config to be saved somewhere on a pc - easy to edit even without the editor I'll make for the script.

The reason I want this screen-flicker, is that it might come good in the future :3 Even though I know that there are lots of these already...

-CasterAnd

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...