Re: "SelectionData" and palettes
- To: mathgroup at smc.vnet.net
- Subject: [mg99915] Re: "SelectionData" and palettes
- From: ragfield <ragfield at gmail.com>
- Date: Tue, 19 May 2009 06:45:15 -0400 (EDT)
- References: <guqvcd$a8k$1@smc.vnet.net>
On May 18, 1:31 am, meitnik <meit... at gmail.com> wrote: > With[ {p = ToExpression[CurrentValue[InputNotebook[], > "SelectionData"]]}, > PresentTmpls[p] > > I found a similar code fragment on MathGroup. I wanted to use it in my > palette. However, once the palette is standalone it fails to work; > otherwise within a current session of a notebook it works fine. Is > there a more stable way to grab a text selection so it can be used for > further use in code? Thanks. InputNotebook[] refers to the notebook which would currently receive keyboard input. This is likely not the same as your palette. Which notebook are you trying to reference here? -Rob