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
Forums -> UltraMon™ SDK -> placing screens with script

Post Reply