gm_url.tcl
来自「算断裂的」· TCL 代码 · 共 70 行
TCL
70 行
proc gm_url {browser filename} { ## gm_url $browser $url ## sends a signal to a browser via DDE or via netscape-remote ## to open a new URL. Used by gmviz to reload the file. upvar #0 tcl_platform tcl_platform set windows 0 if {[string compare $tcl_platform(platform) windows] == 0} { set windows 1 } if {$windows} { set str \\\\ regsub -all $str $filename / filename } if {[string first :// $filename] >= 0} { set url $filename } else { if {$windows} { if {[string first :/ $filename] == -1} { set absfile [pwd] append absfile / append absfile $filename } else { set absfile $filename } if {[string compare $browser iexplore] == 0} { set url file:// } else { set url file://Localhost/ } append url $absfile } else { if {[string compare [string range $filename 0 0] /] == 0} { set absfile $filename } else { set absfile [pwd] append absfile / append absfile $filename } if {[string compare $browser iexplore] == 0} { set url file:// } else { set url file://Localhost } append url $absfile } } if {$windows} { dde_openurl $browser $url } else { if {[string compare $browser netscape] != 0} { error "Only netscape remote supported under unix" } else { exec netscape -remote "openURL($url)" } }} # ------------------------------------------------------------------# Copyright (c) 1999 by Cornell University. All rights reserved# See the accompanying file 'Copyright' for authorship information,# the terms of the license governing this software, and disclaimers# concerning this software.# ------------------------------------------------------------------# This file is part of the QMG software. # Version 2.0 of QMG, release date September 3, 1999# ------------------------------------------------------------------
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?