View Full Version : Suppress warning for (already installed) web browser plugin
BluesmanI 07-19-2008, 07:35 AM Hi guys,
since the internal web browser was removed with version 8 it was 'replaced' with a browser plugin.
Here's my current situation. I want to launch a html-file via mel-code. It's kind of a help file for the user interface I created.
For example:
window -wh 300 300 win_testWin;
columnLayout;
webBrowser -url $str_TEST;
showWindow win_testWin;
$str_TEST contains the destination of the html-file on the hard disk.
Everytime I execute this statement, I get a hint to install the web browser plugin within the window that pops up. Well, I already did install the plugin, mozilla starts and the page shows up with no errors.
So, how can I get rid of this annoying message? Is there another solution than calling the webBrowser-command?
cheers
Blues
|
|
greatPumpkin
07-19-2008, 10:11 AM
the webbrowser plugin is obsolete, so you're probably better off using the system command to call your browser and desired URL, i.e.:
system("C:/applicationPath/firefox.exe " + $url)
BluesmanI
07-19-2008, 05:20 PM
Thanx for your reply.
I tried your code but it doesn't work. In my case it's:
system("C:/Program Files (x86)/Internet Explorer/iexplore.exe" + $str_helpFile);
The space between 'Program' and 'Files' forces to an error. Well I could just throw the path into different strings and concatenate them but the path should be relative and also work on another machine.
So I guess the web browser is the right choice, I don't have to launch the application (e.g. firefox), only give the specified url.
Btw, if you use notepad for editing, it can be started with the command:
system ("start notepad.exe $str_helpFile");
On the other hand with the statement 'start iexplore.exe' nothing happens. Any idea of that? Is it because notepad.exe is stored at the Windows folder while iexplore.exe is not?
cheers
Blues
NaughtyNathan
07-21-2008, 09:23 AM
system("C:/Program Files (x86)/Internet Explorer/iexplore.exe" + $str_helpFile);
The space between 'Program' and 'Files' forces to an error.
This is the same error you would get if you typed the same thing manually into your dos shell... you get around it by putting "doublequotes" around your path:
"C:/Program Files (x86)/Internet Explorer/iexplore.exe" "f:\apps\Maya 8.5\docs\index.html"
is how it would look for example on the DOS cmd line.. so, to encode that into a string you just need to escape the " quotes like so: \"
system("\"C:/Program Files (x86)/Internet Explorer/iexplore.exe\" \"" + $str_helpFile + "\"");
(you may not need the quotes around the target url filename, but I've added them just in case)
:nathaN
BluesmanI
07-25-2008, 06:40 PM
Again, many thanx for all you help. I tried the new version, but still the same.
Here's the result I get from Maya:
// Result: 'C:/Program' is not recognized as an internal or external command,
operable program or batch file.
have you tried just doing this?
system("start "+$sFileName);
that will open the file in whatever is associated with the file extension.
CGTalk Moderation
07-25-2008, 09:31 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.