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.
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.
Move taskbar to second monitor
-
ThePianistop66
- Posts: 7
- Joined: Sun Apr 26, 2015 2:30 am
Move taskbar to second monitor
Hi!
I have a graphics card that can't support more than 2 monitors at the same time (AMD HD6670 2 Go DDR3). The thing is I often plug my TV to watch movies (which means there are sometimes 3 monitors at the same time). I already did a macro that automatically duplicates the main monitor on my TV and disables the second monitor when the TV is plugged in and another macro that does the opposite when my TV is unplugged (I extend the display on my second monitor). The thing is, I like to keep my taskbar on the second monitor, but when I plus and unplug the TV, the taskbar gets on the main monitor. It doesn't take a lot of time to slide it to the right place, but it would be cooler if it was done by itself.
I already did a lot of research and can't seem to find an answer. I searched the taskbar position key in regedit, but I don't understand the values to be able to edit it (HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/StuckRects2).
Value of the key when the taskbar is on my main monitor (HP 23xi IPS LED Backlit Monitor 1920 x 1080): Value of the key when the taskbar is on my second monitor (DELL E173FP 1280 x 1024 ): If it can help you, this link explains what is StuckRects2. I honestly don't understand why the values change after reading this website: http://www.dabcc.com/article.aspx?id=9724
I think I could just put the value of the second monitor when I unplug the TV, but I'm really not comfortable with registry editing and I don't understand all the value types. This is the reason I am asking on the forum, to see if there is a better way to do what I'm looking for. If you need more info to help me don't hesitate to tell me!
Thanks in advance!
Eventghost 0.4.1.r1700
Windows 8.1
I have a graphics card that can't support more than 2 monitors at the same time (AMD HD6670 2 Go DDR3). The thing is I often plug my TV to watch movies (which means there are sometimes 3 monitors at the same time). I already did a macro that automatically duplicates the main monitor on my TV and disables the second monitor when the TV is plugged in and another macro that does the opposite when my TV is unplugged (I extend the display on my second monitor). The thing is, I like to keep my taskbar on the second monitor, but when I plus and unplug the TV, the taskbar gets on the main monitor. It doesn't take a lot of time to slide it to the right place, but it would be cooler if it was done by itself.
I already did a lot of research and can't seem to find an answer. I searched the taskbar position key in regedit, but I don't understand the values to be able to edit it (HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/StuckRects2).
Value of the key when the taskbar is on my main monitor (HP 23xi IPS LED Backlit Monitor 1920 x 1080): Value of the key when the taskbar is on my second monitor (DELL E173FP 1280 x 1024 ): If it can help you, this link explains what is StuckRects2. I honestly don't understand why the values change after reading this website: http://www.dabcc.com/article.aspx?id=9724
I think I could just put the value of the second monitor when I unplug the TV, but I'm really not comfortable with registry editing and I don't understand all the value types. This is the reason I am asking on the forum, to see if there is a better way to do what I'm looking for. If you need more info to help me don't hesitate to tell me!
Thanks in advance!
Eventghost 0.4.1.r1700
Windows 8.1
- Luca Brasi
- Experienced User
- Posts: 262
- Joined: Sat Oct 11, 2008 12:39 pm
Re: Move taskbar to second monitor
Sorry, don't know about the reg hacks but you could try http://www.nirsoft.net/utils/multi_monitor_tool.html and control it via command line from eg.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi
-
ThePianistop66
- Posts: 7
- Joined: Sun Apr 26, 2015 2:30 am
Re: Move taskbar to second monitor
Thanks for your answer.
I'm already using this tool to activate/deactivate monitors, but I read the possible commands and I can't find one to move the taskbar. I don't necessarily want to edit my registry (I would even prefer to avoid doing this), but I posted what I found with my research to help people so they don't need to do the same thing
I'm already using this tool to activate/deactivate monitors, but I read the possible commands and I can't find one to move the taskbar. I don't necessarily want to edit my registry (I would even prefer to avoid doing this), but I posted what I found with my research to help people so they don't need to do the same thing
- Luca Brasi
- Experienced User
- Posts: 262
- Joined: Sat Oct 11, 2008 12:39 pm
Re: Move taskbar to second monitor
I was assuming that the /setprimary would come with bringing the task bar to that display?
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi
-
ThePianistop66
- Posts: 7
- Joined: Sun Apr 26, 2015 2:30 am
Re: Move taskbar to second monitor
I tested it and yes, the taskbar does get to the Dell display, but the problem is that if I set it to primary monitor all my programs open by default on it and I want the programs to open on my HP monitor. I use my dell monitor as a notification and control center with rainmeter on it.
- Luca Brasi
- Experienced User
- Posts: 262
- Joined: Sat Oct 11, 2008 12:39 pm
Re: Move taskbar to second monitor
Puh man... Sounds like you have some very special ideas. Guess I can't help
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi
-
ThePianistop66
- Posts: 7
- Joined: Sun Apr 26, 2015 2:30 am
Re: Move taskbar to second monitor
Yes I do have lol! Thank you very much for taking your time to try to help me!
Re: Move taskbar to second monitor
You might take a look here for some ideas about how to change where your apps open.ThePianistop66 wrote:I tested it and yes, the taskbar does get to the Dell display, but the problem is that if I set it to primary monitor all my programs open by default on it and I want the programs to open on my HP monitor. I use my dell monitor as a notification and control center with rainmeter on it.
-
ThePianistop66
- Posts: 7
- Joined: Sun Apr 26, 2015 2:30 am
Re: Move taskbar to second monitor
I'm currently in my finals week but I'll take a look at the link you gave me when I finish. Thank you!
-
ThePianistop66
- Posts: 7
- Joined: Sun Apr 26, 2015 2:30 am
Re: Move taskbar to second monitor
I have made a huge progress after learning some python. I used this script and it succesfully moves the taskbar:
When I run this script alone it works. But if I put it in my macro that reactivates my second monitor, it doesn't work. When I unplug my tv, I have a macro that enables my second monitor and sets a display preset. Every action that is after the set display preset won't start. I tried with my python script and with a show osd and none of them work. I even tried to jump to a different macro and it doesn't work. Here is the code of the whole project:
Code: Select all
import win32api,time,ctypes
eg.plugins.Window.SendKeys(u'{Win+T}', False)
win32api.SetCursorPos((1000,1080))
time.sleep(0.5)
ctypes.windll.user32.mouse_event(2, 0, 0, 0,0) # left down
time.sleep(0.5)
win32api.SetCursorPos((-500,1080))
time.sleep(0.5)
win32api.SetCursorPos((-500,1000))
time.sleep(0.5)
ctypes.windll.user32.mouse_event(4, 0, 0, 0,0) #left up
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1700">
<Macro Name="Detect device attached">
<Event Name="System.DeviceAttached" />
<Action>
EventGhost.PythonCommand(u'eg.TriggerEvent(eg.event.payload[0][8:25], prefix = eg.event.suffix)')
</Action>
</Macro>
</EventGhost>
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1700">
<Macro Name="Detect device removed" Expanded="True">
<Event Name="System.DeviceRemoved" />
<Action>
EventGhost.PythonCommand(u'eg.TriggerEvent(eg.event.payload[0][8:25], prefix = eg.event.suffix)')
</Action>
</Macro>
</EventGhost>
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1700">
<Macro Name="Tv plugged in" Expanded="True">
<Event Name="System.DeviceAttached.System.GSM0001" />
<Action>
System.Command(u'C:\\Users\\Tony\\MultiMonitorTool.exe /disable 3', True, False, u'', True, False, False)
</Action>
<Action>
System.SetDisplayPreset((u'\\\\.\\DISPLAY1', 0, 0, 0L, 0L, 0L, 0L, False, False, 0L), (u'\\\\.\\DISPLAY2', 0, 0, 1920L, 1080L, 60L, 32L, True, True, 0L), (u'\\\\.\\DISPLAY3', 0, 0, 1920L, 1080L, 60L, 32L, False, False, 0L))
</Action>
</Macro>
</EventGhost>
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1700">
<Macro Name="Tv unplugged" Expanded="True">
<Event Name="System.DeviceRemoved.GSM0001" />
<Action>
System.Command(u'C:\\Users\\Tony\\MultiMonitorTool.exe /enable 3', True, False, u'', True, False, False)
</Action>
<Action>
System.SetDisplayPreset((u'\\\\.\\DISPLAY1', 0, 0, 0L, 0L, 0L, 0L, False, False, 0L), (u'\\\\.\\DISPLAY2', 0, 0, 1920L, 1080L, 60L, 32L, True, True, 0L), (u'\\\\.\\DISPLAY3', -1280, 20, 1280L, 1024L, 60L, 32L, True, False, 0L))
</Action>
<Action>
EventGhost.Wait(3.0)
</Action>
<Action>
Window.SendKeys(u'{Win+T}', False)
</Action>
<Action>
EventGhost.PythonScript(u'import win32api,time,ctypes\nwin32api.SetCursorPos((1000,1080))\ntime.sleep(0.5)\nctypes.windll.user32.mouse_event(2, 0, 0, 0,0) # left down\ntime.sleep(0.5)\nwin32api.SetCursorPos((-500,1080))\ntime.sleep(0.5)\nwin32api.SetCursorPos((-500,1000))\ntime.sleep(0.5)\nctypes.windll.user32.mouse_event(4, 0, 0, 0,0) #left up
</Action>
</Macro>
</EventGhost>
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: Move taskbar to second monitor
I have been fighting that one for about a year now, I have yet to find a 100% successful way of moving the icons and taskbar but keeping my primary monitor I have a samsung TV with a 50 FT HDMI and when the TV powers on the voltage drop causes the edid (i think thats what it's called) wire drops and the computer thinks the monitor gets unplugged and then plugged back in. causes havoc.
the only sure fire way I have hear of is there is a box that is made that plugs into the HDMI on the computer and the TV and it records the edid information and keeps on transmitting to the computer even tho the TV is off or unplugged, that way windows doesn't remove the monitor and change the desktop all about.
only thing i know of that is sure fire and i thknk it's something like 60 beans.
K
the only sure fire way I have hear of is there is a box that is made that plugs into the HDMI on the computer and the TV and it records the edid information and keeps on transmitting to the computer even tho the TV is off or unplugged, that way windows doesn't remove the monitor and change the desktop all about.
only thing i know of that is sure fire and i thknk it's something like 60 beans.
K
