You are not logged in.
1) Something like
ExecuteProgram('http://www.den4b.com', false); or even
ExecuteProgram('iexplore http://www.den4b.com', false);
doesn't seem to work (though the latter command works under Windows). So is there any way to directly launch a URL in the default system browser using PascalScript?
2) Is there any way to display multiple lines separated by newlines with the interactive dialog functions, such as ShowMessage(), WideShowMessage(), DialogYesNo(), WideDialogYesNo(), InputBox(), InputQuery(), WideInputBox() or WideInputQuery()?
For example, none of the following seem to work:
WideShowMessage('Line 1\rLine 2');
WideShowMessage('Line 1\nLine 2');
WideShowMessage('Line 1\r\nLine 2');
Last edited by Andrew (2008-12-18 09:12)
Offline
1) At the moment, the only way to open URL is to use this command:
ExecuteProgram('"C:\Program Files\Internet Explorer\iexplore.exe" "http://www.den4b.com"', false);
I will add OpenFile() function which will open any file with an associated program, and it will also open URL addresses with default browser.
2) Yes, you can insert new lines, here is how:
WideShowMessage('Line'#13#10'Line 2');
WideShowMessage('Line'#13'Line 2');
Offline
I will add OpenFile() function which will open any file with an associated program, and it will also open URL addresses with default browser.
An OpenFile() function will be simply fantastic, Denis! As you can well imagine, the current solution is extremely limited...
Yes, you can insert new lines, here is how:
WideShowMessage('Line'#13#10'Line 2');
WideShowMessage('Line'#13'Line 2');
Cool. I guess #13 = \r = CR, and #10 = \n = LF? But are both required? Just #13 seems to do the same job as #13#10 combined?
Also, even though the above works, shouldn't the correct syntax be:
WideShowMessage('Line' + #13 + 'Line 2');?
Offline
I've added ShellOpenFile function, try it out. You can do these:
ShellOpenFile('http://www.den4b.com/');
ShellOpenFile('www.den4b.com');
ShellOpenFile('C:\Document.doc');
You guessed right about meaning of #13 and #10. In the dialogs, you can use just #13, without #10.
Also, you don't have to put "+" sign between string and the #XX character code, it is a little Delphi trick.
Offline
Well, the ShellOpenFile() function seems to work quite well as far as I have tested it. No problems so far...
This is a great function, Denis. Thanks!
Offline