AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Secondary Monitor
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
buckrice
Guest





PostPosted: Fri Feb 06, 2009 7:37 am    Post subject: so close Reply with quote

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?
Back to top
Superfraggle



Joined: 02 Nov 2004
Posts: 1019
Location: London, UK

PostPosted: Fri Feb 06, 2009 9:38 am    Post subject: Reply with quote

are you using the original or updated code posted by myself?
_________________
Steve F AKA Superfraggle

http://r.yuwie.com/superfraggle
Back to top
View user's profile Send private message MSN Messenger
buckrice
Guest





PostPosted: Fri Feb 06, 2009 5:14 pm    Post subject: so close Reply with quote

Superfraggle wrote:
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)
Back to top
Superfraggle



Joined: 02 Nov 2004
Posts: 1019
Location: London, UK

PostPosted: Fri Feb 06, 2009 5:52 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
buckrice
Guest





PostPosted: Sat Feb 07, 2009 2:42 am    Post subject: Reply with quote

I use extended desktop, 2nd monitor to the right.
Back to top
Superfraggle



Joined: 02 Nov 2004
Posts: 1019
Location: London, UK

PostPosted: Mon Feb 09, 2009 12:26 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
buckrice
Guest





PostPosted: Mon Feb 09, 2009 12:43 pm    Post subject: Reply with quote

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)
Back to top
raveolution
Guest





PostPosted: Sat Feb 28, 2009 12:53 am    Post subject: Reply with quote

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!
Back to top
sainsdy
Guest





PostPosted: Wed Jun 10, 2009 12:35 pm    Post subject: Clone viewing Reply with quote

Hi There,

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

Cheers for your help
Back to top
Jacko Boy
Guest





PostPosted: Sun Sep 13, 2009 7:27 pm    Post subject: Reply with quote

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?
Back to top
socd



Joined: 22 Nov 2009
Posts: 6

PostPosted: Sun Nov 22, 2009 5:27 pm    Post subject: Is switch to TV and back to Computer Monitor Reply with quote

This code makes it easy to switch from your computer monitor to your TV and then back to your computer monitor.

Code:
^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
Back to top
View user's profile Send private message
Gauss



Joined: 10 Sep 2009
Posts: 166

PostPosted: Wed Nov 25, 2009 9:14 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
socd



Joined: 22 Nov 2009
Posts: 6

PostPosted: Wed Nov 25, 2009 11:05 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
socd



Joined: 22 Nov 2009
Posts: 6

PostPosted: Thu Nov 26, 2009 10:24 pm    Post subject: got the sound switch to work Reply with quote

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.

Code:
^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 Razz
_________________
System: Windows 7 64 Bit, 8GB Ram, GTX 260, Raptor Raid
Back to top
View user's profile Send private message
Gauss



Joined: 10 Sep 2009
Posts: 166

PostPosted: Tue Dec 01, 2009 9:26 am    Post subject: Reply with quote

socd,
Seems to work fine.. Thanks for sharing
Whats the SoundPlay, *-1 for?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group