Alan 2004-07-04 17:54
Hey Christian, Folks,
Setup: UltraMon 2.5(2.5.22.0) 3 Monitors Monitor 1 - 1280x1024 Video card: Nvidia GeForce FX 5700 Monitor 2 - 1024x768 Video card: Nvidia GeForce2 MX 100/200 Monitor 3 - 640x480 (Its a TV using the VIVO) Video card: Nvidia GeForce FX5700
First off, Christian, thank you again for your software! Beats the crap out of the problems I've had with the Nvidia code.
OK. Nvidia management is off. Icon auto arrange is off, align to grid is on.
To display the BeyondTV3(www.snapstream.com really cool!) TV software properly, I've setup UltraMon Display Profiles (in concert with Nvidia) so that the primary display changes from (DVI flat panel + TV) to (TV + DVI flat panel). I save the UltraMon Display profile for each setup as a Quick Launch button (Christian, your great).
When I switch (DVI + TV) to (TV + DVI), all is dandy and all desktop icons on the DVI remain in place. However, when I switch (TV + DVI) back to (DVI + TV) all the icons on the DVI get repositioned in the upper left corner of the screen and I have to Desktop Icons->Restore Position to get them back in place.
Although I have looked through the FAQ some, I did not see any talk about such a situation. If I missed the answer, forgive me.
I guess what I'm looking for is when I press the Quick Launch icon for the switch back to (DVI + TV) a call is made to Restore the icon positions. If I have not missed the answer in this forum, is there a current way to do this? Perhaps by adding a command to the Display Profile? Or is this something that needs to be added to the code?
Christian, thank you. Alan
|
Christian Studer 2004-07-05 01:26
This can't be done directly through a profile, but would be possible with a custom script.
I have uploaded a sample script, ApplyProfileAndRestoreIcons. You'll need to adjust the first 3 lines of the script for your system (UltraMon installation directory, profile directory and profile name).
To edit the script, right-click it in Windows Explorer and select Edit from the menu.
You could then create a shortcut to the script and place it on the Quick Launch bar.
Christian Studer - www.realtimesoft.com
|
Alan 2004-07-05 08:50
Thanks for the script Christian. However, it did not solve the problem. The icons are still scrunched up in the upper left corner.
I vi'ed the file like you said:
Const ULTRAMON_DIR = "C:\Program Files\UltraMon" Const PROFILE_DIR = "C:\Documents and Settings\Administrator\Application Data\Realtime Soft\UltraMon\Profiles" Const PROFILE = "Back+TV+Kitchen"
Const POS_ICONS = 2 Set sh = CreateObject("WScript.Shell") sh.Run """" & ULTRAMON_DIR & "\UltraMonShortcuts.exe"" /l " & PROFILE_DIR & "\" & PROFILE & ".umprofile",, True Set sys = CreateObject("UltraMon.System") sys.RestorePositions POS_ICONS
The profile switch happens, but no icon reposition happens. I even duplicated the sys.RetorePositions POS_ICONS to a second call thinking there is a time lag but that didn't work either.
By the way, should I have say a Mozilla-Firebird window open on the DVI and do the Profile switch, that window and any other open become smaller as if a resolution change. Not sure if this is the Nvidia code or yours.
Other suggestions? Thanks. Alan
|
Christian Studer 2004-07-06 03:29
Might be a timing issue as you said, if the display settings haven't been changed by the time the icons get positioned there would be a problem.
To delay the icon positioning, add the following line before sys.RestorePositions:
WScript.Sleep 2000
This delays script execution for 2 seconds (= 2000 milliseconds).
I don't know why the windows would get resized, normally shouldn't happen when changing display settings.
You could use UltraMon to save/restore window positions:
Save window positions:
Const POS_WINDOWS = 1 sys.SavePositions POS_WINDOWS
Restore icon and window positions:
sys.RestorePositions POS_ICONS Or POS_WINDOWS
Christian Studer - www.realtimesoft.com
|
Alan 2004-07-06 12:21
Thanks Christian. Almost there. I think I have a little syntax error. I duplicated the script to allow me to DVI+TV+Kitchen and TV+DVI+Kitchen. Both work with the delay and restore the icons Yeah! but when I use the DVI+TV+Kitchen script, any open windows are sent to the 3rd monitor in the kitchen. Here are my scripts:
DVI+TV+Kitchen Const ULTRAMON_DIR = "C:\Program Files\UltraMon" Const PROFILE_DIR = "C:\Documents and Settings\Administrator\Application Data\Realtime Soft\UltraMon\Profiles" Const PROFILE = "Back+TV+Kitchen"
Const POS_ICONS = 2 Const POS_WINDOWS = 1 Set sh = CreateObject("WScript.Shell") sh.Run """" & ULTRAMON_DIR & "\UltraMonShortcuts.exe"" /l " & PROFILE_DIR & "\" & PROFILE & ".umprofile",, True Set sys = CreateObject("UltraMon.System") WScript.Sleep 1000 sys.RestorePositions POS_WINDOWS WScript.Sleep 1000 sys.RestorePositions POS_ICONS
TV+DVI+Kitchen -------------- Const ULTRAMON_DIR = "C:\Program Files\UltraMon" Const PROFILE_DIR = "C:\Documents and Settings\Administrator\Application Data\Realtime Soft\UltraMon\Profiles" Const PROFILE = "TV+Back+Kitchen"
Const POS_ICONS = 2 Const POS_WINDOWS = 1 Set sh = CreateObject("WScript.Shell") sh.Run """" & ULTRAMON_DIR & "\UltraMonShortcuts.exe"" /l " & PROFILE_DIR & "\" & PROFILE & ".umprofile",, True Set sys = CreateObject("UltraMon.System") sys.SavePositions POS_WINDOWS WScript.Sleep 1000
As you can see in my logic, I think I have to SavePositions POS_WINDOWS before I make the switch. And then when I switch back using the DVI+TV+Kitchen, I use the RestorePositions POS_WINDOWS. Perhaps you can set me right with these.
Thank again for all the help. Alan
|
Christian Studer 2004-07-07 01:02
In the TV+DVI+Kitchen script, try saving the window positions before applying the profile, otherwise depending on the new display settings, the wrong window positions will be saved.
To do this, just put the lines
Set sys = CreateObject("UltraMon.System") sys.SavePositions POS_WINDOWS
above the line with sh.Run.
Christian Studer - www.realtimesoft.com
|
Alan 2004-07-07 15:12
That worked! Thanks Christian. Eeewww, vbs. I don't know how you stand it. I've been doing csh and C and awk for a long time. Now a little python. Never thought I would have to do any vbs.
Any whoooo, thank you again for your time on this. I think a great feature in the next version of UltraMon would be to add these types of delays with icon restore as a one button option in the DisplayManager and ProfileManager sections. Perhaps under an Advanced tab or something.
Cheers. Till the next time... Alan
|
Christian Studer 2004-07-07 20:46
I normally use C++, but actually like using VBS for scripting :)
The issue with icon positions should improve in UltraMon 3, the idea is to have icon positions saved for each desktop configuration, and profiles could then restore icon positions whenever they get applied.
Christian Studer - www.realtimesoft.com
|
solvalou 2009-01-02 14:49
Hi.
I edited this script and added a "load wallpaper" option but it's not working.
What I wanted to do is:
1 - Apply a profile 2 - Load walpaper 3 - Restore Icons
All 3 actions on same script. Can you check my code and see whats wrong ? Thanks a lot
Const ULTRAMON_DIR = "C:\Program Files\UltraMon"
Const PROFILE_DIR = "C:\Users\Adriano\AppData\Roaming\Realtime Soft\UltraMon\3.0.3\Profiles\TV.umprofile"
Const WALLPAPER_DIR = "C:\Users\Adriano\AppData\Roaming\Realtime Soft\UltraMon\3.0.3\Wallpapers\TV.wallpaper"
Const POS_ICONS = 2
Set sh = CreateObject("WScript.Shell")
sh.Run """" & ULTRAMON_DIR & "\UltraMonShortcuts.exe"" /l " & PROFILE_DIR,, True
sh.Run """" & ULTRAMON_DIR & "\UltraMonDesktop.exe"" /load " & WALLPAPER_DIR
Set sys = CreateObject("UltraMon.System")
sys.RestorePositions POS_ICONS
|
Christian Studer 2009-01-03 09:39
Looks good to me, does nothing work or only the wallpaper part?
Christian Studer - www.realtimesoft.com
|
solvalou 2009-01-04 05:30
Ok. I figured out a way to make it work but it's kinda weird. Let me explain.
Using the same script shown above what I need to do to make it work is actually invert the wallpapers profiles. What I mean is the TV.wallpapers actually has the desktop image I use in my Monitor and the Monitor.wallpaper has the image I use on TV.
Do you have any idea why this is happening ? Maybe to make it clear how I setup my system here is the information.
Display profiles: I have a LCD TV 1920x1080 and a LCD monitor 1280x1024. Each profile (TV and Monitor) disables secondary monitor so that when I switch to TV my Monitor is off and when I switch back to my monitor the TV is off.
Wallpaper profiles: Just like the above profiles, I made 2 wallpapers profiles. TV and Monitor. The TV one has a 1920x1080 image as background and the monitor one has a 1280x1024 image as background.
Hope you can figure out why I need to put the TV background image in the Monitor.wallpaper and the monitor background image in the TV.wallpaper.
Thanks
|
solvalou 2009-01-04 05:32
Just a little correction to my earlier post.
Actually the TV.wallpapers need to have the 1280x1024 image (altho my TV is 1920x1080) and the Monitor.wallpaper has the 1920x1080 image (although my monitor is 1280x1024).
This is the only way to make it work. Inverting the images on the wallpaper profiles.
|
Christian Studer 2009-01-04 09:05
Might happen if the monitor numbers change when you load a different display profile.
Christian Studer - www.realtimesoft.com
|