home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-08 | 1.8 KB | 78 lines | [TEXT/ALFA] |
- #================================================================================
- # QuickView¬ Toolbox Assistant Help
- #================================================================================
-
- proc toolboxRefMenu {} {}
-
- menu -m -n $toolboxRefMenu -p toolboxProc {
- "Goto Reference"
- "(-"
- "Display Trap Template"
- "Insert Trap Template"
- "/L<O<ULookup Trap"
- }
-
-
- proc toolboxProc {menu item} {
- switch $item {
- "Goto Reference" { gotoTBReference }
- "Display Trap Template" { displayTBTrapTemplate }
- "Insert Trap Template" { insertTBTrapTemplate }
- "Lookup Trap" { lookupTBTrap }
- }
- }
-
-
- set lastTrap {}
-
- proc insertTBTrapTemplate {} {
- global lastTrap
-
- if {![string length [checkRunning QuickView¬ ALTV tassPath]]} return
- set text [getSelect]
- if {![string length $text]} {
- if {[catch {prompt "Trap name:" $lastTrap} text]} return
- } else {
- deleteText [getPos] [selEnd]
- }
- set lastTrap $text
- set res [AEBuild -r {'ALTV'} DanR {TMPL} "----" "╥$text╙"]
- regexp {╥.*╙} $res one
- insertText [string trim $one {╥╙}]
- }
-
- proc displayTBTrapTemplate {} {
- global lastTrap
-
- if {![string length [checkRunning QuickView¬ ALTV tassPath]]} return
- set text {}
- catch {set text [getSelect]}
- if {![string length $text]} {
- if {[catch {prompt "Trap name:" $lastTrap} text]} return
- }
- set lastTrap $text
-
- set res [AEBuild -r {'ALTV'} DanR {TMPL} "----" "╥$text╙"]
- regexp {╥.*╙} $res one
- alertnote [string trim $one {╥╙}]
- }
-
- proc lookupTBTrap {} {
- global lastTrap
-
- if {![string length [checkRunning QuickView¬ ALTV tassPath]]} return
- set text {}
- catch {set text [getSelect]}
- if {![string length $text]} {
- if {[catch {prompt "Trap name:" $lastTrap} text]} return
- }
- set lastTrap $text
- AEBuild {'ALTV'} DanR {REF } "----" "╥$text╙"
- }
-
- proc gotoTBReference {} {
- catch {switchTo [checkRunning QuickView¬ ALTV tassPath]}
- }
-
-
-