How can you detect a Powerserver Web Application running in a browser (or any app, I need to see if our HELP files are already running in a browser)? If I have a web app running and a user try's to open a second instance in the same or different browser how can check to see if its already running.
- You are here:
- Home
- Q&A
- Q&A
- PowerServer 2020 or older (Obsolete)
- Detect if Web App already Running
- David Vasconcelos
- PowerServer 2020 or older (Obsolete)
- Tuesday, 18 June 2019 18:30 PM UTC
- Wednesday, 19 June 2019 01:19 AM UTC
- PowerServer 2020 or older (Obsolete)
- # 1
Hi David,
Please try solution below.
1 Using AppeonGetBrowserVersion function to get browser type.
https://www.appeon.com/support/documents/appeon_online_help/ps2019/workarounds_and_api_guide/ch01s03s02.html#AppeonGetBrowserVersion_function
2 Check and record the application name and browser type when application start, you can write it to registry or local file.
3 Update application information when exit application.
Regards,
ZhaoKai
- Thursday, 20 June 2019 10:22 AM UTC
- PowerServer 2020 or older (Obsolete)
- # 2
Your approach won't work if the app crashes and does not update the info in the registry.
- Friday, 21 June 2019 18:06 PM UTC
- PowerServer 2020 or older (Obsolete)
- # 3
Anyone have any ideas?
- Friday, 21 June 2019 18:44 PM UTC
- PowerServer 2020 or older (Obsolete)
- # 4
Hi David;
I just did a quick test with the MS-Edge browser and my framework test app (OrderEntry) and my PB Explorer utility for MS-Windows (native PB App) and the explorer can locate the PowerServer web App already running. I think that you should be able to do the same from within the PS Web app - but, have not tried to do that yet.
Regards ... Chris
- Friday, 21 June 2019 18:50 PM UTC
- PowerServer 2020 or older (Obsolete)
- # 5
where can I find your PB Explorer? or is it in part of your framework?
- Chris Pollach @Appeon
- Friday, 21 June 2019 18:57 PM UTC
Its just another example App built from my framework. I built it to show that any PB App can fully introspect the MS-Windows O/S it if they want to. ;-)
FYI: https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/WindowsExplorer
Regards ... Chris
-
Helpful Loading... Helpful 0
- Friday, 21 June 2019 19:02 PM UTC
- PowerServer 2020 or older (Obsolete)
- # 6
Hi David;
Here is what your PS Web App looks like from the IE perspective ...
HTH
Regards ... Chris
- Monday, 24 June 2019 14:29 PM UTC
- PowerServer 2020 or older (Obsolete)
- # 7
Hi David;
Update: I made some more progress over the weekend on web browser App instances. I am now able to detect IE Web browser based Apps trying to open multiple instances of itself. You can view the updated example code in my frameworks "OrderEntry" demo app. I just uploaded a new "beta" version last night that has this code ...
FYI: https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta/PB2017
Have a look at the "nc_app_controller_master" base object class in the "STD_FC_Base" PBL and in particular, the "of_is_application_instantiated" method.
I have not been able to get the multi-browser code working from the EDGE, FF, Chrome or Opera side. These Apps can see the IE side of the App, but not their web browser specific Apps. The multi-browser web plug-in that drives these web browsers is a different architecture though than IE's. I think that I just need a little more time to nail this aspect down. ;-)
Actual IE / Chrome test ...
HTH
Regards ... Chris
- Monday, 24 June 2019 16:23 PM UTC
- PowerServer 2020 or older (Obsolete)
- # 8
Thanks Chris, I am in the process of looking at the one you mentioned yesterday. I will also download this one later today.
Thanks again..
Dave V.
- Wednesday, 26 June 2019 20:54 PM UTC
- PowerServer 2020 or older (Obsolete)
- # 9
Hi David;
I worked on this problem some more last night and now this latest version of my framework "nails" any 2nd Web App instance from running! Either within the same web browser or across any combination of web browsers on the users entire PC! ;-)
I just updated a new version on SF of the OE Demo App with this new framework code for you to test: https://sourceforge.net/projects/stdfndclass/files/Applications/PowerBuilder/OrderEntry/Beta/PB2017
Have a look at the "nc_app_controller_master" base object class in the "STD_FC_Base" PBL and in particular, the updated code in the "of_is_application_instantiated" method.
Regards .... Chris
They can run but, they cannot hide (anymore) - LOL!
- David Vasconcelos
- Thursday, 27 June 2019 09:51 AM UTC
-
Helpful Loading... Helpful 0
- Chris Pollach @Appeon
- Thursday, 27 June 2019 19:07 PM UTC
-
Helpful Loading... Helpful 0
- Page :
- 1
However, you are not allowed to reply to this question.