Hi All,
I would like to open a web browser on a file with a parameter. The big picture is I want to add an HTML based help system to some of my VA Smalltalk GUI (Windows) programs. The web is not involved here just the users default web browser is used to view the help file. I further want to pass a parameter to the browser like "?www-xxx-yyy-zzz" where some JavaScript code run onload can find and display the give section. I am playing with two variations on how to launch the browser.
1) OSHwnd>shellExecute:lpFile:lpParameters:lpDirectory:nShowCmd: This works if the filename includes the path and parms and directory are nil. It opens the browser very quickly but the parm doesn't work so the JavaScript code doesn't know where to go. I can put the parm in the clipboard but it seems not all browsers can or will let you read the clipboard. I can create a small .htm file with the URL/parm in it (and I may end up doing this) but I'm not sure windows will always find the file after it is created as it seems put files where it wants to sometimes for security reasons. If anyone has any other ideas around this method I would appreciate it as I like that it opens the users default browser and it is fast.
2) Lookup the default web browser in the windows registry and run it with a program starter. This works with the parm because program starter is and always has been happy running programs with parameters. The trouble here is, it is unbelievably slow. I mean really slow. Finding the default browser in the registry and building the command is done in a snap. But once the program starter is called it takes forever to open the browser. I have no idea why:(( I'm also not too fond of this method because there is more than one location for the users default browser in the registry. I think I have chosen a good one but it is a guess. Changing your default browser (depending on which one and how you do it) may or may not change this value. I think I can live with this if it wasn't so slow.
Any other ideas or solutions are very welcome.
Lou
--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
[hidden email].
To post to this group, send email to
[hidden email].
Visit this group at
http://groups.google.com/group/va-smalltalk?hl=en.
For more options, visit
https://groups.google.com/groups/opt_out.