$::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: | 797 |
| Nodes: | 16 (3 / 13) |
| Uptime: | 187:54:42 |
| Calls: | 13,205 |
| Calls today: | 4 |
| Files: | 15,490 |
| Messages: | 6,579,555 |