Re: [Clip] How to clear ^&
- At 6/14/2012 07:53 AM, Axel wrote:
>Yes. Let me start with a preliminary. Let's have an autorun clip calledThat is strange.
>"<0a" and containing
>"^!InsertText something^P^&". You invoke it by typing "<0a ". With ^&
>that last space does nothing, without it you end up with
><newline><space>. So I always use ^!Insert with ^&
I have used this throughout my library but instead of ^P I used ^%nl%
and have never seen an extra space following the ^%nl%.
Do you see the same behavior using ^%nl%?
Are you running NTS or NTP? Which version?
- --- In firstname.lastname@example.org, Axel Berger <Axel-Berger@...> wrote:
> The very next things I want to do is delete the selection andIn NT 7.0, you could use the new '^!DeleteSelection' command.
> clear the ^&. The first can be done through ^!Keyboard DELETE,
> although I'd like a better and more specific way, and the second
> I don't know how to do at all.
IMHO, '^&' is nothing that could be "cleared" like a variable. NT sticks to the string that has been selected when starting the clip. Neither removing that string nor executing '^!Select 0' can "clear" the '^&' token. If I'm not mistaken, it's "empty" only if you start another clip (no subclip!) without having selected anything.
As Sheri once put it: '^&' is "a shorthand for preselected text (preselected prior to executing your clip)" (3.3.2007, #16164). Also: "The '^&' is not an argument pass-er, it is the argument pass-ed" (1.12.2008, #18759). Consequently, it's just a side effect that -- on certain conditions -- '^&' seems to be able to "position the cursor".
> The label ^& fulfils two functions. It saves and inserts what'^&' also works as a parameter string without selecting anything. Example: If you run...
> was selected before running the clip and it positions the cursor.
; Start clip
^!Clip Names Otto
; Subclip 'Names'
^!Info His name was ^&
...the name 'Otto' will be displayed in an info box without selecting any text.
P.S. BTW, where is Sheri? I strongly miss her expertise!
- Art Kocsis wrote:
> Are you running NTS or NTP? Which version?Pro, version 6.2. And the behaviour described is documented in the main
"Note that if the Clip contains the cursor-positioning code ^&, the
activating key is automatically discarded. You can also use the
activating key in Clip code through the new predefined variable
Reversing that: no ^& means no discard of the last character typed. Have
you tried my minimal example?
- "flo.gehrke" wrote:
> Consequently, it's just a side effect that -- on certainThat's bad. Whenever a wizard inserts a more or less complicated
> conditions -- '^&' seems to be able to "position the cursor".
environment the cursor should be placed in some specific spot right in
the middle and whenever marking up an ASCII source selecting smething to
run a clip on is often desirable. It can
a) save an extra <Ctrl><C> and <Ctrl><V> inside the wizard and
b) I can highlight one thing and paste another.
In my link wizard I highlight the text that is to become the link and
paste the destination.
By the way:
> In NT 7.0,Must get around to going over. Any known gotchas, stuff that won't work