Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Secondary Monitor


  • Please log in to reply
70 replies to this topic
buckrice
  • Guests
  • Last active:
  • Joined: --
This is so close to working perfectly, but I'm having the same problem a few others mentioned, which is I can disable my secondary display but cannot enable it. I am using the toggle action (-1), but it only toggles off. I tried both "\\.\DISPLAY2" and 2 for the first argument in EnableDisplayDevice(), but saw no difference. I also tried TheQwerty's suggestion to define the X,Y position using NumPut(), but that didn't work either.

It seems the secondary monitor is not being detected, but it can still be enabled as usual via Display Properties. When the secondary display is ENABLED EnumDisplayDevices.ahk outputs the following:
---------------------------
\\.\DISPLAY1 is the primary display device.
The desktop extends onto \\.\DISPLAY2.
\\.\DISPLAYV1 is a pseudo-device.
\\.\DISPLAYV2 is a pseudo-device.
---------------------------

However, after it has been disabled it shows:
---------------------------
\\.\DISPLAY1 is the primary display device.
\\.\DISPLAYV1 is a pseudo-device.
\\.\DISPLAYV2 is a pseudo-device.
---------------------------

I poked around in the config utility for my notebook's Intel GMA (Graphics Media Accelerator) driver, but could find nothing that seemed to help.
Any solutions out there?

Superfraggle
  • Members
  • 1019 posts
  • Last active: Sep 25 2011 01:06 AM
  • Joined: 02 Nov 2004
are you using the original or updated code posted by myself?
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle

buckrice
  • Guests
  • Last active:
  • Joined: --

are you using the original or updated code posted by myself?


The updated code, but these tweaks didn't seem to do the trick:
Numput(A_ScreenWidth + 1,Point)
Numput(&point,devmode,44)

Superfraggle
  • Members
  • 1019 posts
  • Last active: Sep 25 2011 01:06 AM
  • Joined: 02 Nov 2004
I have exactly the same graphics card and it iw working for me. Can I ask what display set up you use.

Extended desktop or clone. and do you have the second monitor on the left or right?
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle

buckrice
  • Guests
  • Last active:
  • Joined: --
I use extended desktop, 2nd monitor to the right.

Superfraggle
  • Members
  • 1019 posts
  • Last active: Sep 25 2011 01:06 AM
  • Joined: 02 Nov 2004
Sorry I forgot to ask, are both the monitors on the same resolution or they slightly different?

The code I posted works perfectly on my laptop (intel GMA) with both monitors on the same res.

I haven't had time to play around with this anymore recently. I shall have a look later tonight if I get a chance.
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle

buckrice
  • Guests
  • Last active:
  • Joined: --
I just found a solution to this problem, but unfortunately it does not use AHK at all. In the vendor's "graphics properties" dialog I can save different configurations, e.g. for single/multiple display, etc. After these have been saved they simply appear in the option menu when Rt-clicking on the desktop or somewhere.

Thank you for your help though! (the resolutions are different, by the way)

raveolution
  • Guests
  • Last active:
  • Joined: --
Hello @ all,

this script works great, when I want to extend my desktop to another monitor. But what do I have to change, if I just want to activate the second monitor and get the "clone mode"?

Thank you for your help!

sainsdy
  • Guests
  • Last active:
  • Joined: --
Hi There,

Just wondering if anyone has any idea on how to make this work to enable clone view?

Cheers for your help

Jacko Boy
  • Guests
  • Last active:
  • Joined: --
I'm brand new to AHK, I found it while searching for a way to make me keyboard buttons work with itunes even when it's not open. Then I searched through the forums and found this script but have no idea how to make it work. Can anyone help me?

socd
  • Members
  • 6 posts
  • Last active: Aug 14 2010 12:36 PM
  • Joined: 22 Nov 2009
This code makes it easy to switch from your computer monitor to your TV and then back to your computer monitor.

^F2:: ;Ctrl-F2 
{ 
run displayswitch /external 
} 
return
^F3:: ;Ctrl-F3 
{ 
run displayswitch /internal 
} 
return
Open a new text document paste in the above code and save file as TV.ahk (or anything you want instead of TV). Then just double click the file to add to your system tray. To switch to your TV hit Control and F2 Key. This moves everything to your TV. When you want to switch back to your Computer monitor just hit Control and F3 key.

If you want to clone your screens just change "/internal" to read "/clone". To have and extended desk top add switch "/extend"

I wanted a easy hot key to switch from my computer monitor to my TV. They are in different rooms. This does the trick.
System: Windows 7 64 Bit, 8GB Ram, GTX 260, Raptor Raid

Gauss
  • Members
  • 203 posts
  • Last active: Jan 27 2012 12:49 PM
  • Joined: 10 Sep 2009
socd, how did you come up with the code "/external.."? this is very nice
maybe we can have something like this to switch among audio devices.

Thanks alot for posting this

socd
  • Members
  • 6 posts
  • Last active: Aug 14 2010 12:36 PM
  • Joined: 22 Nov 2009
I opened the program DisplaySwitch.exe in notepad and went thru it line by line until I found the commands. Gave it a try and it worked.
System: Windows 7 64 Bit, 8GB Ram, GTX 260, Raptor Raid

socd
  • Members
  • 6 posts
  • Last active: Aug 14 2010 12:36 PM
  • Joined: 22 Nov 2009
The below code makes it when I hit Control + F4 change between my Digital (surround sound system) out and my analog (computer speakers). I just keep hitting the combination to go back and forth.

I got the code on another thread here.

^F4:: ;Ctrl-F4
Run, mmsys.cpl 
WinWait,Sound 
ControlSend,SysListView321,{Down} 
ControlGet, isEnabled, Enabled,,&Set Default 
if(!isEnabled) 
{ 
   ControlSend,SysListView321,{Down 2} 
} 
ControlClick,&Set Default 
ControlClick,OK 
WinWaitClose 
SoundPlay, *-1 
return

I'm using a Realtek on board audio.

Enjoy :p
System: Windows 7 64 Bit, 8GB Ram, GTX 260, Raptor Raid

Gauss
  • Members
  • 203 posts
  • Last active: Jan 27 2012 12:49 PM
  • Joined: 10 Sep 2009
socd,
Seems to work fine.. Thanks for sharing
Whats the SoundPlay, *-1 for?