Post Reply

Forums -> UltraMon™ SDK -> placing screens with script
Sarah   2012-04-12 23:24
hello

currently upgraded from xp to windows 7 ultra addition and upgraded to ultramon 3.1.0 64bit additon it appears as though my multi monitor functiong has been going haywire the code im using is this

Const SHOWSTATE_HIDDEN = 0
Const SHOWSTATE_MINIMIZED = 1
Const SHOWSTATE_NORMAL = 2
Const SHOWSTATE_MAXIMIZED = 3
Const SHOWSTATE_MAXIMIZED_DESKTOP = 4

Set util = CreateObject("UltraMon.Utility")
If util.Run("C:\ColdFusion8\wwwroot\Dev\PlayerLocal.exe") = True Then
Set wnd = CreateObject("UltraMon.Window")
If wnd.Find("", "", 0, util.ProcessID, 5000) = True Then
wnd.Monitor = 2
wnd.ShowState = SHOWSTATE_MAXIMIZED
wnd.ApplyChanges 0
End If
End If

Set util = CreateObject("UltraMon.Utility")
If util.Run("C:\ColdFusion8\wwwroot\Dev\Menu.exe") = True Then
Set wnd = CreateObject("UltraMon.Window")
If wnd.Find("", "", 0, util.ProcessID, 5000) = True Then
wnd.Monitor = 1
wnd.ShowState = SHOWSTATE_MAXIMIZED
wnd.ApplyChanges 0
End If
End If


i need the menu.exe on monitor 1 and the playerlocal.exe on monitor 2 but they both appear to be going to the same monitor which is monitor 1
this script works in xp but i cant seem to get it to work in windows 7 any tips

thanks in advance
Sarah
Christian Studer   2012-04-13 08:32
Your call to wnd.Find will return the first window created by the process, this could also be something like the window used for the UltraMon buttons. I would recommend using the GetAppMainWindow method instead, like this:If wnd.GetAppMainWindow(util.ProcessID, 5000) = True ThenIf that doesn't work with this specific application let me know.

If you were using version 2 of UltraMon on XP, my guess would be that the issue is due to the UltraMon window buttons. Version 2 painted those directly onto the window's title bar, while version 3 creates a separate window for them.

Christian Studer - www.realtimesoft.com
Sarah   2012-04-14 01:10
Hi Christian thanks for your reply

I just tried replacing the if wnd.find with your sugestion
If wnd.GetAppMainWindow

i dont know if making a basic error here but i get this in return

script: c:Coldfusion9\wwwroot\dev\openplayerlocal.vbs

error: wrong number of arguments or invalid property assignment

code 800A02C2

SOURCE: Microsoft VBscript runtime err

it appears to send the player to the window 2 but the menu which is a virtual keyboard app doesnt load at all and the error above comes up

the apps are flash fmprojector files which are applications that have thier own windows

basically the app is a media pleyer i designed for a club and i need the keyboard to come on the touch screen and the player to load up on the tv as i say no probs in xp so this its stumping me and im not too erxperienced at coding

Cheers
Sarah
Christian Studer   2012-04-14 06:27
My guess would be an issue with the script, if possible please send me the script to support@realtimesoft.com and I'll take a look at it.

Christian Studer - www.realtimesoft.com
Sarah   2012-04-15 03:00
Thanks for for your help Chris not in the office at the Moment but will send the script to you tomorrow its really the same as the one i posted above but will send it along with a description of the apps if you want i could send the apps as well as their not large again thanks for your help

Sarah
foodle online   2025-11-25 23:15
There are two rounds to the word-guessing game foodle. In round 1, the "questioner" is the one describing the food, while the "answerer" is the one attempting to guess.
AriaBdGames23   2026-02-26 19:07
Ah, ein Klassiker – der Wechsel von XP zu Windows 7 und plötzlich funktionieren Dinge nicht mehr, die jahrelang einwandfrei liefen. Das kommt mir bekannt vor. Dein Problem ist eigentlich klar beschrieben: Das Skript soll Playerlocal.exe auf Monitor 2 und Menu.exe auf Monitor 1 platzieren, aber beide landen auf Monitor 1.

Schauen wir mal, woran das liegen könnte. Der Code selbst sieht auf den ersten Blick korrekt aus, du hast die Monitor-Zuweisung klar definiert mit wnd.Monitor = 2 für Playerlocal und wnd.Monitor = 1 für Menu. Also muss es an den Rahmenbedingungen liegen.

Ein häufiges Problem beim Umstieg auf Windows 7 ist, dass sich die Art geändert hat, wie Windows mit mehreren Monitoren umgeht. Die Monitor-Nummerierung kann anders sein als unter XP. Unter Windows 7 wird manchmal der Hauptmonitor anders identifiziert. Versuch mal, die Monitor-Zuweisung zu tauschen – also Playerlocal auf Monitor 1 und Menu auf Monitor 2. Wenn dann beide auf Monitor 2 landen, weißt du, dass die Zählung nicht deiner Erwartung entspricht.

Ein weiterer Punkt: Die UltraMon-Version 3.1.0 für 64-Bit solltest du prüfen, ob sie wirklich vollständig mit Windows 7 kompatibel ist. Es gab damals https://sgcasino-deutschland.de/ einige Probleme mit der 64-Bit-Unterstützung. Vielleicht fehlen Treiber oder die Installation ist nicht ganz sauber.

Auch die Prozess-ID könnte ein Thema sein. Unter Windows 7 kann es vorkommen, dass der Find-Aufruf den Prozess nicht richtig erwischt, besonders wenn die Exe länger zum Laden braucht. Dein Timeout von 5000 Millisekunden ist eigentlich großzügig, aber manchmal hilft es, das Fenster erstmal kurz schlafen zu legen, bevor du es verschiebst.
dhuaa   2026-03-08 19:30
geometry dash meltdown is addictive because every failure feels like “just one more try.”
Forums -> UltraMon™ SDK -> placing screens with script

Post Reply