Page 1 of 1
run app with an outer link?
Posted: Fri Nov 22, 2024 6:59 am
by coater
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!
Re: run app with an outer link?
Posted: Fri Nov 22, 2024 11:41 am
by salvadordf
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
Re: run app with an outer link?
Posted: Fri Nov 22, 2024 1:43 pm
by coater
If the appliccation is running, how to get the clicked url outside, thank you!
Re: run app with an outer link?
Posted: Sat Nov 23, 2024 10:16 am
by coater
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;
Re: run app with an outer link?
Posted: Mon Nov 25, 2024 8:05 am
by salvadordf
coater wrote: Fri Nov 22, 2024 1:43 pm
If the appliccation is running, how to get the clicked url outside, thank you!
If your app is the default web browser it will be executed by windows and the URL will be in ParamStr.
Re: run app with an outer link?
Posted: Mon Nov 25, 2024 8:06 am
by salvadordf
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;
Read the information in these links for all the details and how to fix it :
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?
Posted: Mon Nov 25, 2024 4:00 pm
by coater
salvadordf wrote: Mon Nov 25, 2024 8:06 am
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;
Read the information in these links for all the details and how to fix it :
https://www.briskbard.com/forum/viewtopic.php?t=2208
https://stackoverflow.com/questions/78652092/cef4delphi-application-cant-run-two-instances/78652679#78652679
Thank you!
Thank you!