$::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: | 741 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 85:50:57 |
| Calls: | 12,454 |
| Calls today: | 4 |
| Files: | 15,195 |
| Messages: | 6,537,805 |