File: test.tcl

package info (click to toggle)
snack 2.2.9-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,628 kB
  • ctags: 3,536
  • sloc: ansic: 35,290; sh: 8,950; tcl: 1,037; python: 701; makefile: 490
file content (21 lines) | stat: -rwxr-xr-x 386 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# the next line restarts using wish \
exec wish8.4 "$0" "$@"

# 'info sharedlibext' returns '.dll' on Windows and '.so' on most Unix systems

load libsquare[info sharedlibext]

# Create a sound object

snack::sound s

# Set its length to 10000 samples

s length 10000

# Apply the command defined in the square package

s square

pack [button .b -text Play -command {s play}]