[jawsscripts] Re: Deleting clipboard programatically in JAWS

  • From: Andrew Hart <ahart@xxxxxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Wed, 13 Nov 2013 00:18:21 -0300

I'm not Paul, but the escape codes such as \r for carriage return, \n
for newline (aka linefeed or lf), \t for tab, etc., are standard escape
sequences that have been interpreted by C compilers for 40 or so years
now and many other languages adopted them, since they're so handy.

Here's a Wikipedia article listing them:
http://en.wikipedia.org/wiki/Escape_sequences_in_C

I don't know if this list is complete or if JAWS supports all of them.
Also, for JAWS to correctly interpret hex notation, it seems you need to
write \0xhh, not just \xhh as shown in the table of common escapes in
the  Wikipedia article.  This is likely a JAWS variation.

Btw, \r is equivalent to \13 (decimal) or \015 (octal) while \n is
equivalent to \10 (decimal) or \012 (octal).  when you write three
digits after the backslash character, they should be interpreted using
octal notation, not the decimal notation we are generally accustomed to.

Hth,
Andrew.

On 12/11/2013 10:31 PM, Csaba Godo wrote:
> Hi Paul,
> 
> Could you tell me, how did you guess it, that \R is the code for 
> carriage return and \N is the code for new line feeding? Or is somewhere 
> on the net a list of these codes? Until reading your mail I known that 
> the ASCII code for new line is \013 and did not know, that it is equals 
> in JAWS Basic to the \N.
> 
> By the way, the code you and others sent working perfectly and I could 
> build my own one, which is the following:
> 
> void Function InsertText (string LineText)
> ; Inserts the text into the document at the current cursor position
> CopyToClipboard (LineText + "\R\N")
> PerformScript PasteFromClipboard ()
> EndFunction ; InsertText
> 
> This function clears the clipboard and places the LineText and the 
> needed carriage return and the neww line control characters to it and 
> pastes into the user's document. After paste the cursor is blinking at 
> the begining of the new line  below the inserted text. It is really, 
> what I wanted.
> 
> Thanks a lot!
> 
> Csaba
> 
> 
> 
> 2013.11.12. 13:43 keltezéssel, Paul Magill írta:
>> Hi Csaba,
>>
>> Jaws will not allow only the carriage return lineFeed pair to be copied to 
>> the clipboard, but if you follow it by a space, it is accepted as below:
>>
>> Script Test ()
>> CopyToClipboard ("\R\N ")
>> Pause ()
>> TypeKey (CksPaste) ; constant from common.jsm. was PerformScript 
>> PasteFromClipboard() , but this spoke 'pasted'.  used instead of TypeString 
>> to preserve CRLF in multi line items
>> EndScript
>>
>> This pastes a space on the line below where the key was pressed.
>>
>> Regards,
>> Paul from Australia
>>
>> -----Original Message-----
>> From: jawsscripts-bounce@xxxxxxxxxxxxx 
>> [mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Csaba Godo
>> Sent: Tuesday, 12 November 2013 3:52 PM
>> To: jawsscripts@xxxxxxxxxxxxx
>> Subject: [jawsscripts] Re: Deleting clipboard programatically in JAWS
>>
>>
>> An other question: how to insert to the clipboard a carriage return-line 
>> feed character (like enter) to the clipbaord? What is its ALT code?
>>
>> Thanks,
>>
>> Csaba
>>
>> 2013.11.11. 23:16 keltezéssel, Jonathan C. Cohn írta:
>>> What happens if you select a zero length string and then use keyboard copy 
>>> key? I am on my Apple platforms right now or I would try.
>>>
>>> Best wishes,
>>>
>>> Jonathan
>>>
>>>
>>>
>>> On Nov 11, 2013, at 5:09 PM, Jim Bauer wrote:
>>>
>>>> JAWS doesn't allow copying the null string to the clipboard. You
>>>> could use some other non-printable character ("\1" is what I tested),
>>>> but you'll always have clipboard text with a length of 1--even if
>>>> JAWS can't speak it. If that's "deleted" enough for your purposes, you're 
>>>> golden.
>>>>
>>>>
>>>>
>>>> On 11/11/2013 3:04 PM, Jackie McBride wrote:
>>>>> Well, copytoclipboard("") would certainly do that in short order.
>>>>>
>>>>> On 11/11/13, Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx> wrote:
>>>>>> Hi guys,
>>>>>>
>>>>>> Could somebody tell me how can I delete the content of the
>>>>>> clipboard programatically in JAWS Basic? I have found many
>>>>>> clipboard related commands in FSDN, but no one is for deleting the 
>>>>>> content. Just appending.
>>>>>>
>>>>>> Thanks in advance?
>>>>>>
>>>>>> Csaba
>>>>>> __________ďż˝
>>>>>>
>>>>>> View the list's information and change your settings at
>>>>>> http://www.freelists.org/list/jawsscripts
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> __________
>>>>
>>>> View the list's information and change your settings at
>>>> http://www.freelists.org/list/jawsscripts
>>>>
>>>
>>> __________
>>>
>>> View the list's information and change your settings at
>>> http://www.freelists.org/list/jawsscripts
>>>
>> __________
>>
>> View the list's information and change your settings at 
>> http://www.freelists.org/list/jawsscripts
>>
>> __________�
>>
>> View the list's information and change your settings at
>> http://www.freelists.org/list/jawsscripts
>>
> __________�
> 
> View the list's information and change your settings at 
> http://www.freelists.org/list/jawsscripts
> 
> 
> 


__________�

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: