hveld wrote:Attached is a .vbs file that I wrote to test pages through a local http server.
Thanks very much for the script. I have created an updated version (attached below) with some minor changes and enhancements:
- Accepts the web site URL and www root path as command-line parameters, so a single copy of the script can be reused for multiple projects
- Default browser line-up changed to include IE, Firefox, Safari, Google Chrome and the latest version of Opera; Netscape Navigator deleted (good riddance)
- Minor code cleanup with expanded instructions and browser settings that are simpler for non-programmers to change
Most users will not need to edit the attached VBS file to use it.
The new command-line usage is as follows:
- Code: Select all
live_browser_test.vbs <url_prefix> <www_root_path> <file_path> [browser]
- Do not include a trailing forward slash after <url_prefix>
- Do not include a trailing backslash after <www_root_path>
- Valid options for [browser] are: ie, firefox, opera, safari, chrome (or the corresponding number you see in the VBS file). Naturally you must have the desired browser already installed. You can edit the VBS file to add additional browsers.
Example (launches http://dev.mysite.com/index.php in Firefox):
- Code: Select all
live_browser_test.vbs http://dev.mysite.com "C:\MySite\www" "C:\MySite\www\index.php" firefox
In UltraEdit, create the tool entry under Advanced -> (Project) Tool Configuration as in the original instructions, but with the following updated command line:
- Code: Select all
C:\PATH\live_browser_test.vbs http://dev.mysite.com "C:\MySite\www" "%f" [browser]
Replace
PATH with the location of the VBS file and
[browser] with the browser name of your choice (listed above).