Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing Web Browser from TCL

Status
Not open for further replies.

mbitzko

Programmer
Apr 5, 2005
13
US
I'm able to execute a program such as Excel by:

set excelPath "C:/Program Files/Microsoft Office/Office/Excel.exe"
exec $excelPath $fileName &


But surely there is a better "standard practices" way to invoke a known executable such as IE6 web browser by executing a function with the known file type (.htm). Any hints?

Thanks
 
This is an example procedure that I use to execute a browser app on Windows (Where errorfile is an html file that is created by Tcl/Tk):

#==========================================================================
# DISPLAY_ERRORFILE_FUNCTION
#==========================================================================
proc display_errorfile_function {} {

global env
global errorfile

set nativeerrorfile [ file nativename ${errorfile} ]
if {[file exists $env(COMSPEC)]} {
exec $env(COMSPEC) /c start ${nativeerrorfile} &
}

}
#==========================================================================
# END_OF_DISPLAY_ERRORFILE_FUNCTION
#==========================================================================

David L. Heim
Rockwell Collins, Inc.
Cedar Rapids, Iowa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top