How to click a outer link, and it will open the application to open the link.
How to deliver a url string to the application and it will be opened by the app ?
Thank you!
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
run app with an outer link?
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: run app with an outer link?
If you click on a HTTP/HTTPS link then you need to set your application as the default web browser in that computer.
Then get URL from the parameter using ParamStr :
https://www.delphibasics.co.uk/RTL.php?Name=ParamStr
Then get URL from the parameter using ParamStr :
https://www.delphibasics.co.uk/RTL.php?Name=ParamStr
Re: run app with an outer link?
If the appliccation is running, how to get the clicked url outside, thank you!
Re: run app with an outer link?
There is another problem, I cannot use single app. May be because the CreateGlobalCEFApp?
var
hMutex: THandle;
begin
hMutex := CreateMutex(nil, False, 'TheStandard');
if GetLastError = ERROR_ALREADY_EXISTS then
begin
CloseHandle(hMutex);
MessageBox(0,'You can not run a second copy of this App','',mb_OK);
application.Terminate;
end;
var
hMutex: THandle;
begin
hMutex := CreateMutex(nil, False, 'TheStandard');
if GetLastError = ERROR_ALREADY_EXISTS then
begin
CloseHandle(hMutex);
MessageBox(0,'You can not run a second copy of this App','',mb_OK);
application.Terminate;
end;
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: run app with an outer link?
If your app is the default web browser it will be executed by windows and the URL will be in ParamStr.coater wrote: Fri Nov 22, 2024 1:43 pm If the appliccation is running, how to get the clicked url outside, thank you!
- salvadordf
- Posts: 4620
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: run app with an outer link?
Read the information in these links for all the details and how to fix it :coater wrote: Sat Nov 23, 2024 10:16 am There is another problem, I cannot use single app. May be because the CreateGlobalCEFApp?
var
hMutex: THandle;
begin
hMutex := CreateMutex(nil, False, 'TheStandard');
if GetLastError = ERROR_ALREADY_EXISTS then
begin
CloseHandle(hMutex);
MessageBox(0,'You can not run a second copy of this App','',mb_OK);
application.Terminate;
end;
https://www.briskbard.com/forum/viewtopic.php?t=2208
https://stackoverflow.com/questions/78652092/cef4delphi-application-cant-run-two-instances/78652679#78652679
Re: run app with an outer link?
Thank you!salvadordf wrote: Mon Nov 25, 2024 8:06 amRead the information in these links for all the details and how to fix it :coater wrote: Sat Nov 23, 2024 10:16 am There is another problem, I cannot use single app. May be because the CreateGlobalCEFApp?
var
hMutex: THandle;
begin
hMutex := CreateMutex(nil, False, 'TheStandard');
if GetLastError = ERROR_ALREADY_EXISTS then
begin
CloseHandle(hMutex);
MessageBox(0,'You can not run a second copy of this App','',mb_OK);
application.Terminate;
end;
https://www.briskbard.com/forum/viewtopic.php?t=2208
https://stackoverflow.com/questions/78652092/cef4delphi-application-cant-run-two-instances/78652679#78652679
Thank you!