when I lounch a program (file run) after a few seconds the window containing that program goes behind AMS window (I use Kiosk - but not "always in top option")??????
Window order problem
Collapse
X
-
Originally posted by Eagledoes it do the same if you don't use kiosk..just to check it is not something else,perhaps something the launched program is doing..Last edited by adivin; 10-30-2005, 08:27 AM.
Comment
-
-
what window mode paramater are you setting for file.run(also waitforreturn true\false) and window mode for file.open. Does seem strange it would be doing this when Not running in kiosk mode. You are of course not doing any
z order coding yourself anywhere ? Any Window 'set mask' stuff ?
Comment
-
-
Originally posted by Eaglewhat window mode paramater are you setting for file.run(also waitforreturn true\false) and window mode for file.open. Does seem strange it would be doing this when Not running in kiosk mode. You are of course not doing any
z order coding yourself anywhere ? Any Window 'set mask' stuff ?
Comment
-
-
This may help... I am using the .dll I recently compiled, and shared here, to achieve what I believe you need to have done in your project.
Here are the files:
Project (.apz)
Example (.exe)
Here is the code chunks from the On Show and On Timer event areas:
On Show
Code:File.Run(_SystemFolder.."\\notepad.exe", "", "", SW_SHOWNORMAL) Application.Sleep(1000) dll_ActiveWinHandle = DLL.CallFunction("AutoPlay\\Docs\\DLLActiveWindow.dll", "ACTIVEWINDOWHANDLE", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL) Page.StartTimer(500)
On Timer
Code:Window.SetOrder(dll_ActiveWinHandle, HWND_TOPMOST)
Intrigued
Comment
-
-
Originally posted by IntriguedThis may help... I am using the .dll I recently compiled, and shared here, to achieve what I believe you need to have done in your project.
Here are the files:
Project (.apz)
Example (.exe)
Here is the code chunks from the On Show and On Timer event areas:
On Show
Code:File.Run(_SystemFolder.."\\notepad.exe", "", "", SW_SHOWNORMAL) Application.Sleep(1000) dll_ActiveWinHandle = DLL.CallFunction("AutoPlay\\Docs\\DLLActiveWindow.dll", "ACTIVEWINDOWHANDLE", "", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL) Page.StartTimer(500)
On Timer
Code:Window.SetOrder(dll_ActiveWinHandle, HWND_TOPMOST)
and I want to lounch the program by clicking on a Button on page and not on Page.On Show
Comment
-
-
I just downloaded the file I posted (.apz) and opened it and it works for me. I'm not sure in your case, other than you need to have AMS 6 (not 5) to open such. You may want to reinstalled AMS 6 if you do have it. Just a thought.
And as for the Button... just copy and past the On Show code into the On Click event (area) of said Button object.
:yesLast edited by Intrigued; 10-31-2005, 04:20 PM.Intrigued
Comment
-
-
This might solve my problem too, but...??
Ok - I too have an issue with the AMS Kiosk application popping back in front of the other applications that I am running - but in my case, it is usually because the touch screen has just a scrap of the kiosk menu showing and the user hits it in a moving ambulance (our kiosk program runs on a toughbook in our ambulances).
What I need is a way to get the Kiosk Application to recognize the fact that an application is already running, and simply revert back to that 'open' incidence of the application if the button is pressed again.
Can you help with that?
Comment
-
-
Have you tryed useing:
Code:Window.SetOrder(Application.GetWndHandle(), HWND_BOTTOM);
just a tought
What I need is a way to get the Kiosk Application to recognize the fact that an application is already running, and simply revert back to that 'open' incidence of the application if the button is pressed again.
try this: (example useing notepad)
Code:IsRun = File.IsInUse(_WindowsFolder.."\\NOTEPAD.exe"); if IsRun then windows = Window.EnumerateTitles(); window_name = "Notepad"; for handle, title in windows do result = String.Find(title, window_name, 1, false); if (result ~= -1) then Window.SetOrder(handle, HWND_TOP); end end else result = File.Run(_WindowsFolder.."\\NOTEPAD.exe", "", "", SW_SHOWNORMAL, false); end
Last edited by RizlaUK; 06-22-2007, 03:05 PM.Embrace change in your life, you never know, it could all work out for the best
Comment
-
-
heres the same code in function form (for ease of use)
place this in global functions
Code:function CheckRunningApp(Path, Title) IsRun = File.IsInUse(Path); if IsRun then windows = Window.EnumerateTitles(); for handle, title in windows do result = String.Find(title, Title, 1, false); if (result ~= -1) then Window.SetOrder(handle, HWND_TOP); end end else result = File.Run(Path, "", "", SW_SHOWNORMAL, false); end end
Code:CheckRunningApp(_WindowsFolder.."\\NOTEPAD.exe", "Notepad")
Embrace change in your life, you never know, it could all work out for the best
Comment
-
-
Perfect!!! (almost!)
Seems to work, but I need to add command line arguments to the executable to enable the GPS option... where do I fit them in? My former button command looked like this:
result = File.Run("C:\\Program Files\\MOH Locator Application\\MOH_Locator.exe", "gps", "", SW_MAXIMIZE, false);
I placed the global variable script on the application and then changed the button to this:
result = CheckRunningApp(_ProgramFilesFolder.."\\MOH Locator Application\\MOH_Locator.exe", "MOH Locator Application")
But I need it to have the "gps" command line argument?
Comment
-
Comment