PDA

View Full Version : Use an Alternate Source Viewer with Internet Explorer addition (W2K)


StarsInTheSky
01-15-2003, 07:43 AM
Hi, I am merely suggesting that someone makes an addition to this tweak as it only works if the editor of your choice accepts file names with spaces. As the html page viewed is stored in the "documents and settings" at least my favorite editor opens several tabs, recognizing each word as a file, which results in that "documents" get a tab, "and" another, then "settings"..etc.. instead of just opening the temporary internet file

one way to work around this is to make a fix ( Ive seen .vbs such) as a proxy between. it seems like Im not the only one having this problem, so this tweak seems incomplete.

for the record my favorite viewer is context.exe

ok here is a fix allowing context.exe and Vim.exe to work instead of notepad.exe. In addition to the existent tweak create a .vbs file with this content:

'--- viewSourceFix.vbs ---------

'function: Start alternate editor, combine multiple arguments to single file argument.

' Making variable declaration mandatory
option explicit

dim oWShell, sArg, sFile

' Create script object
set oWShell = CreateObject("WScript.Shell")

' Loop through arguments
for each sArg in wscript.arguments
' Add argument to filename
sFile = sFile & sArg & " "
next

' Remove excess space
sFile = Trim(sFile)

'execute editor
oWShell.Run _
"""C:\Program Files\ConTEXT\conTEXT.exe """ & _
"""" & sFile & """"

' Destroy script object
set oWShell = NOTHING

'----------------end of file


please change the path to your favorite editor on your machine. if you encounter an error message saying ''The system cannot find the file specified" then your path isn't right. When done change the registry pointer to location of this file instead of the editor of your choice directly.

if this all doeesnt make sense to you please read the "Use an Alternate Source Viewer with Internet Explorer" tweak first. It shows you how to change the pointer, but most likely your editor won't work without a fix like the one I've written here<P ID="edit"><FONT class="small">Edited by StarsInTheSky on 01/15/03 08:42.</FONT></P>

Nana
01-15-2003, 11:27 PM
If anyone is looking, here is the Use an Alternate Source Viewer with Internet Explorer (All Windows)</font color=blue> (http://www.winguides.com/registry/display.php/774/><font) tweak.

Also, if you're having difficulty with View Source in Internet Explorer, have a look at this WinGuides link for some other options to try:
View Source Not Working in Internet Explorer (All Windows)</font color=blue> (http://www.winguides.com/registry/display.php/1246/><font)

Good luck.
Nana /images/forums/icons/smile.gif

reghakr
01-16-2003, 05:50 PM
StarsInTheSky,

I believe it will work as long as the application has an entry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entVersion\App Paths, you need only provide the name.

So rather than typing the entire path with quotes like this:
"C:\Program Files\TextPad 4\TextPad.exe"

I just enter the word Textpad.

reghakr

StarsInTheSky
01-17-2003, 12:21 AM
Hi RegHakr,

Actually I would very much like such a fix, then the vbscript wouldn't be needed. I tested this however by changing the registry key for view source editor to just contTEXT.exe. I checked the registry and it already had the entry you mentioned. But I got the same behaviour as before. It finds the program even without the full path but the html source file path in the temporary directory is missinterpreted.

I then thought maybe I have missunderstood and changed the path in the vbscript but then it didnt find the program at all.

So I'm afraid the fix I've mentioned is the only I know of that fixes this problem at this time. I may be wrong but textpad probably doesn't accept several files to view and already interpretes the arguments as the source path like notepad does. then my solution above is obsolete. but some editors need this ( I know context and Vim does)

regards, Stars

reghakr
01-17-2003, 04:14 PM
StarsInTheSky,

Have you tried just entering the word ContTEXT or is that spelling correct? I believe it to be ConTEXT.

Have you tried allowing multiple instances?

I use Notetab Standard on my other machine ( a similar tabbed editor) and have no problem setting this up the same way as described above.

reghakr<P ID="edit"><FONT class="small">Edited by reghakr on 01/17/03 16:22.</FONT></P>

StarsInTheSky
01-22-2003, 06:27 AM
Hi,

sorry I just misspelled the name here in the forum. Very observant =)

I just tried multiple instances. Thanx I think I prefer several windows for view source.

However, my script is still needed. It didn't change context's behaviour.

/stars

reghakr
01-25-2003, 05:14 PM
StarsInTheSky,

Sorry, can't help with your script.

I've been trying to get Microsoft's Script Editor (Mse.exe) to do the same thing, but I can't find the correct switch. It's another excellent program that Bill thought we shouldn't see.

reghakr

StarsInTheSky
02-16-2003, 12:32 PM
no problem, the script works great.