Welcome, Guest
Username: Password: Remember me
CodeTyphon Linux OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

Executing URLs on Linux 12 years 1 month ago #1696

  • Gintas
  • Gintas's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Graphics Designer/Developer
  • Posts: 32
  • Thank you received: 3
I can't open links with '&' sign,it gets cut before this sign.
I am using procedure ShowHTMLUrl() from GLCrossPlatform unit in GLScene:
procedure ShowHTMLUrl(Url: string);
begin
{$IFDEF MSWINDOWS}
  ShellExecute(0, 'open', PChar(Url), nil, nil, SW_SHOW);
{$ENDIF}
{$IFDEF UNIX}
  fpSystem(PChar('env xdg-open ' + Url));
{$ENDIF}
end;

Maybe xdg-open doesn't support all symbols?

Please Log in or Create an account to join the conversation.

Re: Executing URLs on Linux 12 years 1 month ago #1702

  • ExDatis
  • ExDatis's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
Why not:
uses
LCLIntf; //there you have function openURL(string);
...
example:
procedure ...;
const
home_page : String = 'www.exdatis.net';
begin
{open exdatis home page}
Screen.Cursor:= crHourGlass;
try
OpenURL(home_page);
finally
Screen.Cursor:= crDefault;
end;
end;...
Works fine (linux - windows) :)

Please Log in or Create an account to join the conversation.

Re: Executing URLs on Linux 12 years 1 month ago #1703

  • ExDatis
  • ExDatis's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
Also function mail to works fine
example:
url_string : String = 'mailto:info@exdatis.net'//or 'mailto:info@exdatis.net?subject=Hello'

Please Log in or Create an account to join the conversation.

Re: Executing URLs on Linux 12 years 1 month ago #1707

  • Gintas
  • Gintas's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Graphics Designer/Developer
  • Posts: 32
  • Thank you received: 3
I will check that when boot into Linux.
The short URLs are okay,but I need to execute:

www.blogger.com/share-post.g?blogID=5428...94613&target=twitter


Update:
Works like a charm since this function looks for default browser on installed OS.

Please Log in or Create an account to join the conversation.

Last edit: by Gintas. Reason: Tested on Linux

Re: Executing URLs on Linux 12 years 6 days ago #1841

  • ExDatis
  • ExDatis's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 110
  • Thank you received: 9
On another forum I found this:
ShellExecute(Application.Handle, PChar('open'), PChar('www.site.com/user.php?nick=<"Dan">'), nil, nil, SW_SHOWNORMAL) //does not work
But, encoded address:
ShellExecute(Application.Handle, PChar('open'), PChar('www.site.com/user.php?nick=<%22Dan%22>'), nil, nil, SW_SHOWNORMAL);//it's work
May be helpful. :(
The following user(s) said Thank You: Gintas

Please Log in or Create an account to join the conversation.

  • Page:
  • 1