Bring a programm window on top of the screen

I have a floating toolbar with some buttons to open different databases with the database program MemoMaster. If MemoMaster is not open the button starts MemoMaster and opens the database linked with the button. It is only a command like "E:\Databases\Data1.mnr". (The system knows the extension ".mnr"). If I klick on the other buttons to open other databases the program window stays behind the other open program windows which I work with. How to force Dopus to bring the program window of MemoMaster on top of the screen?

If the program you are running does not bring itself to the front (it should, really), you can bring it to the front using VBScript or JScript, which have a function for doing so.

The function takes all or part of the window title to know which window to activate.

e.g.

var WshShell = new ActiveXObject("WScript.Shell");
WshShell.AppActivate("TextPad");
Dim WshShell 
Set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate "TextPad"

For a script in a button, which launches E:\Databases\Data1.mnr and then brings a window with TextPad in its name to the front:

function OnClick(clickData)
{
	var cmd = clickData.func.command;
	cmd.deselect = false;
	cmd.ClearFiles();

	cmd.RunCommand("E:\\Databases\\Data1.mnr"); // Double backslashes in JScript code.

	var WshShell = new ActiveXObject("WScript.Shell");
	WshShell.AppActivate("TextPad");
}

Replace TextPad with something appropriate to the app you're working with.

Bringing the window to the front will probably only work if Opus is currently the active window itself.

Leo, thank you very much. I will see how it works. Beleive me, there are som circumstances when the program MemoMaster does not itself comes to top. As usual for a database programm every entry will be saved after changing to the next entry. If I work in a data field and change the program all is fine when I come back with the Windows task bar. But if I try to open another database file the program force me to save the changes wich I made in the rcent database and shows a dialog window for it. But both, the program window and the dialog window stays in the background, both are not visible, when I try to open the database file with the help of Dopus. Only by using the Windows taskbar I get both on top. I think, this behavour comes from MemoMaster, because If I change from MemoMatser to other programs like Photoshop or AuutCAD all floating toolbars of these two programs are not visible until I click to the title bar of these programs. It sounds bizarre, but this is a known issue of MemoMaster. I´m in contact with the support of the company and they say, that this is caused by some Windows API, which they have no influence to. But as I love MemoMaster (jbsoftware.net) I have to live with it.