Re: Wouldn't it be neat...

2016-08-23 Thread Richard Gaskin
Bob Sneidar wrote: > On Aug 22, 2016, at 16:39 , Roger Guay wrote: >> >> Clicking a button should only deselect text when the button's >> traversalOn property is true. > > This is not true for me. I have a field and a popup menu, largely > because I could not get popup menus to work the way they

Re: Wouldn't it be neat...

2016-08-23 Thread Bob Sneidar
This is not true for me. I have a field and a popup menu, largely because I could not get popup menus to work the way they did in LC6 (I never used 7). When I select text in the field, then popup the menu, it deselects the text in the field. More specifically, it sets the insertion point after

Re: Wouldn't it be neat...

2016-08-23 Thread Richard Gaskin
Roger Guay wrote: > What I discovered is that a field (used for another feature) in my > rTools general catchall plugin butts in and prevents this code from > seeing the selectedText of the topStack. Indeed, if a paste a field > in your TextToolBar stack (which I love, BTW), your stack fails as

Re: Wouldn't it be neat...

2016-08-23 Thread Roger Guay
What I discovered is that a field (used for another feature) in my rTools general catchall plugin butts in and prevents this code from seeing the selectedText of the topStack. Indeed, if a paste a field in your TextToolBar stack (which I love, BTW), your stack fails as well. And the solution .

Re: Wouldn't it be neat...

2016-08-22 Thread Roger Guay
No, mine is indeed set to palette yet does not work and your’s works just fine. I’ll report back when I figure out why. Thanks for your patience > On Aug 22, 2016, at 8:42 PM, Richard Gaskin > wrote: > > Roger wrote: > > > I take it back. I thought I had it

Re: Wouldn't it be neat...

2016-08-22 Thread Richard Gaskin
Roger wrote: > I take it back. I thought I had it working but alas, not so much. > I can’t make it work for a button in a palette stack (a plugin) > and selectedText from the Script Editor of the topStack. Here is > my button script: > > on mouseUp >set the defaultstack to the topstack >

Re: Wouldn't it be neat...

2016-08-22 Thread Roger Guay
Nope! > On Aug 22, 2016, at 7:36 PM, Mike Bonner wrote: > > does it work if you put it into the selectedchunk instead of the > selectedtext? > > On Mon, Aug 22, 2016 at 8:22 PM, Roger Guay wrote: > >> Hi Richard, >> >> I take it back. I thought I had it

Re: Wouldn't it be neat...

2016-08-22 Thread Mike Bonner
does it work if you put it into the selectedchunk instead of the selectedtext? On Mon, Aug 22, 2016 at 8:22 PM, Roger Guay wrote: > Hi Richard, > > I take it back. I thought I had it working but alas, not so much. I can’t > make it work for a button in a palette stack (a plugin)

Re: Wouldn't it be neat...

2016-08-22 Thread Roger Guay
Hi Richard, I take it back. I thought I had it working but alas, not so much. I can’t make it work for a button in a palette stack (a plugin) and selectedText from the Script Editor of the topStack. Here is my button script: on mouseUp set the defaultstack to the topstack put

Re: Wouldn't it be neat...

2016-08-22 Thread Roger Guay
How right you are! Thanks! > On Aug 22, 2016, at 7:39 AM, Richard Gaskin > wrote: > > Clicking a button should only deselect text when the button's traversalOn > property is true. > > If that were not the case it would not be possible to make toolbars that act

Re: Wouldn't it be neat...

2016-08-22 Thread Mike Kerner
Add this to a long script editor wishlist. On Mon, Aug 22, 2016 at 3:07 PM, J. Landman Gay wrote: > On 8/22/2016 1:43 AM, m...@jerrydaniels.com wrote: > >> If you use the clipboarddata to alter your scripts, you get undo to work >> again. >> > > Yeah, though there's a

Re: Wouldn't it be neat...

2016-08-22 Thread J. Landman Gay
On 8/22/2016 1:43 AM, m...@jerrydaniels.com wrote: If you use the clipboarddata to alter your scripts, you get undo to work again. Yeah, though there's a better way to do it that doesn't wipe the user's clipboard. But that isn't my work so I didn't include it here. It's all moot though now

Re: Wouldn't it be neat...

2016-08-22 Thread Richard Gaskin
Mike Bonner wrote: > If you're on a mac, and click a button while text is selected.. does > it de-select the chunk? I seem to remember something like this in > the past, but am not at my mac right now so I can't try it. Clicking a button should only deselect text when the button's traversalOn

Re: Wouldn't it be neat...

2016-08-22 Thread me
If you use the clipboarddata to alter your scripts, you get undo to work again. On Aug 22, 2016, 12:53 AM -0500, J. Landman Gay , wrote: > Here's my original, which does mess up "undo", but it's a start. I use > Command-Shift- to trigger the actions. Cmd-Shift-space,

Re: Wouldn't it be neat...

2016-08-21 Thread J. Landman Gay
Here's my original, which does mess up "undo", but it's a start. I use Command-Shift- to trigger the actions. Cmd-Shift-space, for example, picks up the text under the mouse and puts it into the current selection. I use that almost exclusively instead of copy/paste to enter variable names

Re: Wouldn't it be neat...

2016-08-21 Thread Peter Bogdanoff
Yes, it deselects the text AFTER it gets the selectedChunk: char x to z of field y, so you could reselect that same text. Peter Bogdanoff > On Aug 21, 2016, at 8:35 PM, Roger Guay wrote: > > Yes, the selected text is deselected when clicking a button on the Mac. Too > bad . . .

Re: wouldn't it be neat...

2016-08-21 Thread Roger Guay
Thanks for this, Peter, I’m going to give it a try… > On Aug 21, 2016, at 9:26 AM, Peter M. Brigham wrote: > > Sorry, forgot to include the little utility script q(): > > on q tString > return quote and tString and quote > end q > > The full frontscript then is: > >

Re: Wouldn't it be neat...

2016-08-21 Thread Roger Guay
Yes, the selected text is deselected when clicking a button on the Mac. Too bad . . . I really like the simplicity of your idea. > On Aug 21, 2016, at 4:36 AM, Mike Bonner wrote: > > Do as monty suggested and hilite the chunk you want to quote and click the > button.

Re: Wouldn't it be neat...

2016-08-21 Thread Dr. Hawkins
On Sat, Aug 20, 2016 at 8:29 PM, Mike Bonner wrote: > Made a button with this.. > on mouseUp > I'd actually go with popping up a script on mouseDown . . . I have somewhat more elaborate code from mouseover popups in my application, on mouseDown btNo switch case (btNo =2)

Re: wouldn't it be neat...

2016-08-21 Thread Peter M. Brigham
Sorry, forgot to include the little utility script q(): on q tString return quote and tString and quote end q The full frontscript then is: --- on controlkeydown whichKey -- put this in a frontscript universally available in LC put the long name of the target into tarName put the

Re: Wouldn't it be neat...

2016-08-21 Thread Peter M. Brigham
On Aug 21, 2016, at 10:24 AM, m...@jerrydaniels.com wrote: > Trapping the commankeydown message is the easiest way to automate quoting. > Rather than altering the script field behavior, I'd recommend using a front > script. Just make sure you pass the keys you're not using! Here's my version

Re: Wouldn't it be neat...

2016-08-21 Thread me
Trapping the commankeydown message is the easiest way to automate quoting. Rather than altering the script field behavior, I'd recommend using a front script. Just make sure you pass the keys you're not using! On Aug 21, 2016, 6:37 AM -0500, Mike Bonner , wrote: > Do as

Re: Wouldn't it be neat...

2016-08-21 Thread Mike Bonner
Do as monty suggested and hilite the chunk you want to quote and click the button. Though it just popped into my head.. If you're on a mac, and click a button while text is selected.. does it de-select the chunk? I seem to remember something like this in the past, but am not at my mac right now

Re: Wouldn't it be neat...

2016-08-20 Thread Roger Guay
Thanks Jacque, Monty, Peter and Mike. Mike, I tried a similar script in plugin, but I don’t know how to make it interact with the Script Editor. What am I missing? > On Aug 20, 2016, at 8:29 PM, Mike Bonner wrote: > > I like this idea, so I made a quick and dirty method.

Re: Wouldn't it be neat...

2016-08-20 Thread Mike Bonner
I like this idea, so I made a quick and dirty method. Made a button with this.. on mouseUp put the selectedtext into tText if the first char of tText is not quote then put quote before tText if the last char of tText is not quote then put quote after tText put tText into the

Re: Wouldn't it be neat...

2016-08-20 Thread Peter Haworth
Thanks to Jacque for allowing me to use her code as the basis of doing this in lcstackbrowser... But then you have to pay so would be much better in the script editor as would many other editing features. I've recently been using NetBeans for html and php script editing and really like its

Re: Wouldn't it be neat...

2016-08-20 Thread J. Landman Gay
Yes, and add parentheses, curly brackets and square brackets too. Right now I'm doing these with a frontscript, which I can post when I'm back at the computer unless Pete does it first. My version screws up undo and his doesn't. But I'd rather have it built into the editor. Jacqueline

Re: Wouldn't it be neat...

2016-08-20 Thread Monte Goulding
Wouldn't it be better if typing quote when you have more than an insertion point quoted around the selection? Sent from my iPhone > On 21 Aug 2016, at 12:38 PM, Roger Guay wrote: > > If one could double-click a word in the script editor and then simply click a > button to put

Wouldn't it be neat...

2016-08-20 Thread Roger Guay
If one could double-click a word in the script editor and then simply click a button to put it in quotes? Has anyone already done this? Yes, I know I can do Find and Replace, but this would definitely be the cat’s meow! Roger ___ use-livecode