$::bottomtextbox insert end "\n[$::HASFOCUS tag ranges sel]"
Type abcdef
Highlight. It prints:
1.0 1.6
So it doesn't give me the text. It gives me the indices of the
selection. OK then:
$::bottomtextbox insert end "\n[$::HASFOCUS get [$::HASFOCUS tag ranges sel]]"
Can't even type. It throws an error:
bad text index ""
while executing
"$::HASFOCUS get [$::HASFOCUS tag ranges sel]"
What am I doing wrong this time?The get requires 2 arguments and the 'tag ranges sel' returns a list of 2 items so you need the {*} operator to expand the list into 2 arguments
--
Luc
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 765 |
| Nodes: | 16 (1 / 15) |
| Uptime: | 03:00:12 |
| Calls: | 12,761 |
| Calls today: | 5 |
| Files: | 15,362 |
| Messages: | 6,557,014 |