Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Set Display Preset Windows 7 64 bit, Nvidia Cards

Found a bug in EventGhost? Report it here.
Post Reply
jook
Posts: 2
Joined: Sat Oct 03, 2009 9:28 am

Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by jook »

Hi, my setup is this :

I have
* an onboard nvidia graphics card - GeForce 6100 nForce 405 with an analogue VGA output
* a GeForce 8400 GS with a DVI and a VGA output
* nvidia 190.62 drivers installed.
* Windows 7 Ultimate 64 bit, with UAC disabled
* EventGhost 0.3.7.r1194

I have my plasma connected to the GeForce 6100 and two computer monitors connected to the GeForce 8400 GS.

I wasn't too sure whether to post this in Bug Reports or in Support, but seeing as this setup previously worked for me in Vista Ultimate 64 bit I figured that this was the right forum. Apologies if it is not.

When I had Vista Ultimate 64 bit I successfully had Eventghost turning the displays for the computers off, and the display for the plasma on (making the plasma display the primary monitor as well). And then with another macro turning the plasma display back off and the computer displays back on resetting the primary display.

Since trying this out with Windows 7 Ultimate 64 bit I have been struggling to get it to work. I can get the plasma display turned on but not back off again. I am not sure if the problem is with the nVidia drivers, Windows 7 or Eventghost.

I have included below a macro that I am trying which should just be turning on the plasma and making it primary (DISPLAY4) and leaving the computer monitors on, and then after 5 seconds turning the plasma off and making the computer display (DISPLAY2) primary. The primary switching works, but the plasma display does not disconnect.

Has anyone else had any similar problems? Any suggestions for getting this to work. Thanks.

<Macro Name="Test Display" Expanded="True">
<Action Name="Set Display Preset - Plasma">
System.SetDisplayPreset((u'\\\\.\\DISPLAY2', -2560, -256, 1280L, 1024L, 75L, 32L, True, False, 0L), (u'\\\\.\\DISPLAY3', -1280, -256, 1280L, 1024L, 60L, 32L, True, False, 0L), (u'\\\\.\\DISPLAY4', 0, 0, 1280L, 768L, 85L, 32L, True, True, 0L), (u'\\\\.\\DISPLAY1', 0, 0, 1280L, 768L, 85L, 32L, False, False, 0L))
</Action>
<Action>
EventGhost.Wait(5.0)
</Action>
<Action Name="Set Display Preset - Computer - Turn Off Plasma">
System.SetDisplayPreset((u'\\\\.\\DISPLAY2', 0, 0, 1280L, 1024L, 75L, 32L, True, True, 0L), (u'\\\\.\\DISPLAY3', 1280, 0, 1280L, 1024L, 60L, 32L, True, False, 0L), (u'\\\\.\\DISPLAY4', 1280, 0, 1280L, 1024L, 60L, 32L, False, False, 0L), (u'\\\\.\\DISPLAY1', 1280, 0, 1280L, 1024L, 60L, 32L, False, False, 0L))
</Action>
</Macro>
jook
Posts: 2
Joined: Sat Oct 03, 2009 9:28 am

Re: Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by jook »

Does this forum not get looked at by any developers any more? Its been a week since I posted and I was hoping for a response.
Bartman
Plugin Developer
Posts: 881
Joined: Sun Feb 12, 2006 9:03 am

Re: Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by Bartman »

Bitmonster silently fixes some bugs. You can check the svn log from time to time.
clemon79
Posts: 8
Joined: Wed Apr 22, 2009 8:44 pm

Re: Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by clemon79 »

I can verify that this problem also exists with an ATI Radeon 4850 running under Win7 Ultimate 64-bit. A Set Display Preset that ACTIVATES and extends the desktop to a secondary monitor works like a champ, but when it's time to deactivate it and return the extended desktop to the primary monitor, nothing happens.

(Oh, I'm running EG version 0.3.7r1194.)

Pleeeeeeeeez help? I'd be happy to do whatever I can to help test a fix....this is the last thing in between me and getting XBMC up and working perfectly on the new Win7 install.

Thanks much!
koolman007
Posts: 5
Joined: Fri Sep 18, 2009 10:56 am

Re: Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by koolman007 »

Hi All. I think I have figured this out. Its a bit crude but it works.

It's all to do with using the Keyboard emulation under eventghost, and the new keyboard shortcuts under windows 7.

First things first, make sure that you have all your resolutions set correctly for your different displays. Do this in the "screen resolutions" menu option when you right click on the desktop. Use the "multiple displays" option to change where the desktop will be and then set the correct resolutions. When finished make sure you go back to your main monitor.

Here's the fun part. Press "Windows key+P" on your keyboard. A window will pop up with 4 box's/options to choose from. The one's you will be playing with is the one on the most left and the one on the most right. Now if your setup is like mine, it thinks my main monitor is the "projector" and my TV is the "Computer Monitor", yours maybe around the other way, I hope this wont be to confusing.

From this you can navigate using the "tab" or "shift+tab" keys, and the "enter" key for selection. By using the "keyboard Emulation" action under event ghost, you can make a sequence of keys that will switch the monitors and then load say XBMC, and then do the reverse to close XBMC and switch monitors back.

Here is the XML code for this section for both open and close of XBMC:

Start :

<Folder Name="Start" id="12" Expanded="True">
<Macro Name="Change Primary Display to Samsung TV & load XBMC.exe" Expanded="True">
<Event Name="MceRemote.Power" />
<Action>
Window.SendKeys(u'{Win+P}', False)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Return}', False)
</Action>
<Action>
System.Execute(u'C:\\Program Files (x86)\\XBMC\\XBMC.exe', u'-fs -p', 0, False, 2, u'')
</Action>
<Action>
EventGhost.EnableItem(XmlIdLink(23))
</Action>
<Action>
EventGhost.DisableItem(XmlIdLink(12))
</Action>
</Macro>
</Folder>


Stop :

<Folder Name="Stop" id="23" Enabled="False" Expanded="True">
<Macro Name="Emulate Keystrokes: {s}" Expanded="True">
<Event Name="MceRemote.Power" />
<Action>
Window.SendKeys(u'{Alt+F4}', False)
</Action>
<Action>
Window.SendKeys(u'{Win+P}', False)
</Action>
<Action>
Window.SendKeys(u'{Shift+Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Return}', False)
</Action>
<Action>
EventGhost.EnableItem(XmlIdLink(12))
</Action>
<Action>
EventGhost.DisableItem(XmlIdLink(23))
</Action>
<Action Name="Change Primary Display to PC Monitor & Quit XBMC.exe">
EventGhost.Comment()
</Action>
</Macro>
</Folder>

I hope you get the idea. Have a play.

Cheers
Koolman007
koolman007
Posts: 5
Joined: Fri Sep 18, 2009 10:56 am

Re: Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by koolman007 »

Hi All,

I have changed my Config again as I see there is a bug in the Ati Drivers that has issues with Audio over HDMI in some extened Display Modes. And guess what, this is one of them. So I have change my config to reflec and new and even more crude way of switching displays successfuly in windows 7 with HDMI audio.

This config use the rundll32.exe command to bring up the "Display Resolutions" windows under windows 7. Then use a few key strokes to do the actually change.

Here is my new start, stop config.

<Folder Name="Start" id="12" Expanded="True">
<Macro Name="Change Primary Display to Samsung TV & load XBMC.exe" Expanded="True">
<Event Name="MceRemote.Power" />
<Action Name="Open Desktop Change Window">
System.Execute(u'C:\\Windows\\System32\\rundll32.exe', u'shell32.dll,Control_RunDLL desk.cpl', 0, False, 2, u'')
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Up}', False)
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Return}', False)
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Left}', False)
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Return}', False)
</Action>
<Action>
System.Execute(u'C:\\Program Files (x86)\\XBMC\\XBMC.exe', u'-fs -p', 0, False, 2, u'')
</Action>
<Action>
EventGhost.EnableItem(XmlIdLink(22))
</Action>
<Action>
EventGhost.DisableItem(XmlIdLink(12))
</Action>
</Macro>
</Folder>
<Folder Name="Stop" id="22" Enabled="False" Expanded="True">
<Macro Name="Emulate Keystrokes: {s}" Expanded="True">
<Event Name="MceRemote.Power" />
<Action Name="Change Primary Display to PC Monitor & Quit XBMC.exe">
EventGhost.Comment()
</Action>
<Action>
Window.SendKeys(u'{Alt+F4}', False)
</Action>
<Action Name="Open Desktop Change Window">
System.Execute(u'C:\\Windows\\System32\\rundll32.exe', u'shell32.dll,Control_RunDLL desk.cpl', 0, False, 2, u'')
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Tabulator}', False)
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Down}', False)
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Return}', False)
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Left}', False)
</Action>
<Action>
EventGhost.Wait(0.25)
</Action>
<Action>
Window.SendKeys(u'{Return}', False)
</Action>
<Action>
EventGhost.EnableItem(XmlIdLink(12))
</Action>
<Action>
EventGhost.DisableItem(XmlIdLink(22))
</Action>
</Macro>
</Folder>
shimh
Posts: 9
Joined: Wed Nov 25, 2009 3:33 pm

Re: Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by shimh »

hmm... for enable 2nd monitor sort of things, Windows 7 has direct command line:

displayswitch.exe /internal or /external or /extend or /clone.

You don't have to emulate win+P then tab.


I confirm that the bug is still there in 1262. What's more, I found it does not support 2560x1600 monitor properly. When I excute the preset to enable monitor extend mode (2560x1080 primary, 1920x1080 secondary), both monitors go to 1920x1080.
clemon79
Posts: 8
Joined: Wed Apr 22, 2009 8:44 pm

Re: Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by clemon79 »

WAY delayed, but thanks for this! This enabled me to get my Boxee setup that much closer to being bulletproof. :)
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Set Display Preset Windows 7 64 bit, Nvidia Cards

Post by stisev »

I know this is an old thread, but I have to thank shimh for his help.

I didn't know about Windows 7 + displayswitch. This tip helped me immensely! No more dealing with Set Display Preset! :D
Post Reply