bshellenbaum Posted January 20, 2006 Share Posted January 20, 2006 I've got a doctor client that would like to attach a second monitor to one workstation, facing the other way so patients can see the screen as he shows before/after photos to them. That part is easy. What they need is a program that will bring the second monitor up, duplicate the desktop to show the pictures and when they exit the pictures, shut off the second monitor so the patient info isn't left on the screen for anyone else to see. Can autoit be scripted to this level 1) start up the second monitor, duplicating the desktop 2)Start up Irfanview 3)When Irfanview is exited, shut down the second monitor Thanks Bruce Link to comment Share on other sites More sharing options...
seandisanti Posted January 20, 2006 Share Posted January 20, 2006 I've got a doctor client that would like to attach a second monitor to one workstation, facing the other way so patients can see the screen as he shows before/after photos to them. That part is easy.What they need is a program that will bring the second monitor up, duplicate the desktop to show the pictures and when they exit the pictures, shut off the second monitor so the patient info isn't left on the screen for anyone else to see.Can autoit be scripted to this level1) start up the second monitor, duplicating the desktop2)Start up Irfanview3)When Irfanview is exited, shut down the second monitorThanksBruceyes it can, i remember about 7 months ago maybe, someone posted a script to turn off a monitor as an example of dll usage. I'll see if i can't find it and post the code. then you'd just have to put the rest of the script around it, setting the on/off condition Link to comment Share on other sites More sharing options...
seandisanti Posted January 20, 2006 Share Posted January 20, 2006 yes it can, i remember about 7 months ago maybe, someone posted a script to turn off a monitor as an example of dll usage. I'll see if i can't find it and post the code. then you'd just have to put the rest of the script around it, setting the on/off conditionFound it. the part of the code that you'll need is const $WM_SYSCommand = 274,$SC_MonitorPower = 61808,$Power_On = -1,$Power_Off = 2 $HWND=WinGetHandle(WinGetTitle("","")) Func MonitorOff() DllCall("user32.dll","int","SendMessage","hwnd",$HWND,"int",$WM_SYSCommand,"int",$SC_MonitorPower,"int",$Power_Off) EndFunc Func MonitorOn() DllCall("user32.dll","int","SendMessage","hwnd",$HWND,"int",$WM_SYSCommand,"int",$SC_MonitorPower,"int",$Power_On) EndFunc Link to comment Share on other sites More sharing options...
bshellenbaum Posted January 21, 2006 Author Share Posted January 21, 2006 Thanks, I'll give it a look. Bruce 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