Post Reply

Forums -> UltraMon™ SDK -> UltraMon shortcuts for two applications @ one time
Roy   2001-05-09 11:34
Hey guys,
as we know, the shortcut program for creating shortcuts(to run and position applications in desired locations), only does one application per shortcut.

How would you create a shortcut that would open 2 or more applications and position them accordingly?

Thanks
Christian Studer   2001-05-10 07:42

Here's a VBScript example to do this. It opens 2 GIF images in Internet Explorer, the first on monitor 1, the second on monitor 2.
Internet Explorer is a special case, that's why there is a special LaunchIE function. For other applications, use the RunCmd function.

For more information on programming UltraMon, download the UltraMon SDK from the Downloads page.

Const SHOWSTATE_MAXIMIZED = 3 Set g_util = CreateObject("UltraMon.Utility") Set g_wnd = CreateObject("UltraMon.Window") LaunchIE "C:\WINDOWS\Desktop\top7.gif", 1 LaunchIE "C:\WINDOWS\Desktop\hotmail.gif", 2 Sub LaunchIE(file, monitor) set IEShell = WScript.CreateObject("InternetExplorer.Application") IEShell.Visible = TRUE IEShell.Navigate(File) g_wnd.HWnd = IEShell.HWnd g_wnd.Monitor = monitor g_wnd.ShowState = SHOWSTATE_MAXIMIZED g_wnd.ApplyChanges 0 End Sub Sub RunCmd(cmd, monitor, showState) If g_util.Run(cmd) = True Then If g_wnd.Find("", "", 0, g_util.ProcessId, 5000) = True Then g_wnd.Monitor = monitor g_wnd.ShowState = showState g_wnd.ApplyChanges 0 End If End If End Sub

Christian Studer
www.realtimesoft.com
Forums -> UltraMon™ SDK -> UltraMon shortcuts for two applications @ one time

Post Reply