Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening web link
Message
De
11/11/2020 14:33:52
 
 
À
11/11/2020 11:40:30
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01677106
Message ID:
01677113
Vues:
76
>There is no way to figure this out.

Astrid would not have given up this early ;-))
Basic task needs to be broken down to FB open in 1 Tab.
Can be done with any process giving access to Browser DOM.
As you mention, Shellexecute potentially calling up ANY browser set active on machine problematic.
Needs to install common solution similar to GreaseMonkey on all browsers - was there for Firefox and Chrome.

Better: create special Exe hosting WebBrowser / WebView, start that one and .Navigate().
Rick has several GREAT articles about IE WebBrowser, on Youtube very new video from Virtual FoxFest by Christoph on using CefSharp (in the video also mentioned expensive solution via COM) - he mentions bridging via JS, which would be my first try as well.

Also possible: Automating Selenium, there you can pick browser, so identify started browser from Shellexecute (or read Registry...) and automate that one via Selenium...

certainly doable, but too much work for benefit of such a task

regards
thomas

>The first problem is, what program is called by ShellExecute? There is a variety of browsers out there, but it must not be a browser at all.
>The second is, how to ask this program? There is no interface standardized.
>
>>Dear Sir,
>>
>>I am using these codes to open whatsapp
>>
>>
>>Declare  Integer FindWindow In WIN32API String , String
>>Declare  Integer SetForegroundWindow In WIN32API Integer
>>Declare  Integer  ShowWindow  In WIN32API Integer , Integer
>>Declare Integer ShellExecute In shell32.Dll ;
>>	INTEGER hndWin, ;
>>	STRING cAction, ;
>>	STRING cFileName, ;
>>	STRING cParams, ;
>>	STRING cDir, ;
>>	INTEGER nShowWin
>>
>>
>>cmd='https://web.whatsapp.com'
>>
>>=ShellExecute(0, 'open', cmd,'', '', 1)
>>
>>
>>https://web.whatsapp.com/ opens perfectly. No issue
>>
>>If I run above codes again then a new instance opens
>>How to know https://web.whatsapp.com/ is already opened?
>>If found opened already then codes must not open a new instance but go focus to previously opened website.
>>
>>Regards
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform