Page 1 of 1
Using non default browser
Posted: Mon Jun 30, 2014 11:36 am
by Nick
Is it possible to set a different browser for the View>In Web Browser command so that it does not use the default browser? If so, how?
Posted: Wed Jul 02, 2014 6:41 pm
by SteveW
You could change the default browser itself in windows control panel.Other than that though you could set any other browser as a "tool" in TextPad.
You can do this by going to Configure > Preferences > Tools > Add > Program... and navigating to the application file of the browser ( ending in *.exe and usually found in a folder under "Program Files" for example internet explorer would be C:\Program Files\Internet Explorer\iexplore.exe). Then click "Apply".
Go to the specific tools settings(found by clicking the "+" next to tools) and tick the "Save All documents first" checkbox.
After you have changed all the settings you want, press OK and the browser should be found under the tools menu and can be more quickly accessed by the keyboard shortcut it displays on the menu
Posted: Wed Jul 02, 2014 7:10 pm
by Nick
Thanks, I hadn't thought of that. I've now done this, but with php files it displays the text of the php file, whereas "In Web Browser" displays the page as served by Apache. Not sure how to set the parameters to achieve this.
Posted: Wed Jul 02, 2014 7:55 pm
by SteveW
Does the web address in the browser look different?
Maybe adding something in front of $FileName in the parameters would solve the problem. I see in this locally hosted version of apache it has "localhost:8082":
http://blog.cloudfoundry.com/wp-content ... 7Local.png
Posted: Wed Jul 02, 2014 9:36 pm
by ben_josephs
How about (since you are using PHP) something like this:
Command: C:\PHP\php.exe
Parameters: C:\path\to\viewinbrowser.php $File
Initial folder:
[X] Run minimized
[X] Closee DOS window on exit
where
C:\path\to\viewinbrowser.php is (with details changed as appropriate)
Code: Select all
<?php
$url = preg_replace ( '/.*\\\\htdocs\\\\/', 'localhost\\', $argv[ 1 ] ) ;
system ( "\"C:/Program Files (x86)/Mozilla Firefox/firefox.exe\" \"$url\"" ) ;
?>
Posted: Sun Feb 01, 2015 9:25 am
by Nick
Gave up on the idea and set a tool to launch the browser with the $URL parameter. Works fine. I would have just found it more convenient to be able to set the 'View in web browser' button to a different browser than the default one.