File: _multi_screenshot.tcl

package info (click to toggle)
openmsx 20.0%2Bdfsg-1.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,544 kB
  • sloc: cpp: 236,922; xml: 49,948; tcl: 15,056; python: 5,385; perl: 281; sh: 77; makefile: 53
file content (30 lines) | stat: -rw-r--r-- 578 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
namespace eval multi_screenshot {

set_help_text multi_screenshot \
{Take multiple screenshots

Usage:
 multi_screenshot <num> [<base>]
}

proc multi_screenshot {num {base ""}} {
	multi_screenshot_helper 1 $num $base
	return ""
}

proc multi_screenshot_helper {acc max {base ""}} {
	if {$acc <= $max} {
		if {$base eq ""} {
			screenshot
		} else {
			screenshot -prefix $base
		}
		after frame "[namespace code multi_screenshot_helper] [expr {$acc + 1}] $max $base"
	}
}

namespace export multi_screenshot

} ;# namespace multi_screenshot

namespace import multi_screenshot::*