Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if {$hera} { set path /user/bin/a/hera/x } else { set path /user/bin/a/herb/x }
exec $path
set here [expr {$hera ? "hera" : "herb"}]
exec /user/bin/a/$here/x
set ::execs {
{exec1 /usr/path1/exec1}
{exec2 /usr/path2/exec2}
}
pack [listbox .lb]
foreach item $execs { .lb insert end [lindex $item 0] }
bind .lb <<ListboxSelect>> { launch }
proc launch {} {
set selected [lindex [.lb curselection] 0]
if {$selected == ""} { return }
set item [lindex $::execs $selected]
foreach {name path} $item break
toplevel .top
wm title .top $name
label .top.l -text "launching..." -fg blue
pack .top.l -padx 50 -pady 50
update
if {[catch { exec $path & } msg]} { # error
wm title .top error
.top.l config -text $msg -fg red
after 5000 destroy .top
} else { # all ok
after 5000 exit
}
}
set ::execs {
{exec1 /usr/path1/exec1 {-opt1 -opt2}}
{exec2 /usr/path2/exec2 {-opt3}}
}
pack [listbox .lb]
foreach item $execs { .lb insert end [lindex $item 0] }
bind .lb <<ListboxSelect>> { launch }
proc launch {} {
set selected [lindex [.lb curselection] 0]
if {$selected == ""} { return }
set item [lindex $::execs $selected]
foreach {name path options} $item break
toplevel .top
wm title .top $name
label .top.l -text "launching $path $options..." -fg blue
pack .top.l -padx 50 -pady 50
update
if {[catch { eval exec $path $options & } msg]} { # error
wm title .top error
.top.l config -text $msg -fg red
after 5000 destroy .top
} else { # all ok
after 5000 exit
}
}
foreach {name path options} $item break
set ::execs {
{exec1 "/usr/path1/exec1 -opt1 -opt2"}
{exec2 "/usr/path2/exec2 -opt3"}
}