[jawsscripts] Re: Deleting clipboard programatically in JAWS

  • From: Csaba Godo <arpadhazi68.jawsul@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Wed, 13 Nov 2013 03:05:05 +0100

Hi Dough,

The program, I'm working on is feeded from an user.ini file, where the 
user can declare various predefined plain or parametered text lines. 
These text blocks are listed in a listbox displayed with the 
DlgSelectItemInList() function. Here can user select one and it will be 
inserted. But if the text wanted to be inserted contains more than 1 
line I need the line feeding for begining a new line.

So looks a section in the user.ini file:

[Insertions:1]
Type=4 ;Insert Line (plain text)
LineCount=2
Line1=This is the first line of the inserted multilined plain text.
Line2=This text contains no parameters, just demonstrates the simply 
text insertion process. At the end will be a new line inserted.
NewLineAtEnd=1 ; If this key is missing then assumed that user wants no 
new line at the end of lines.

The code block for reading ini file is wrapped into a While ... EndWhile 
iteration. In the first version - its code do you have seen,- I tried to 
play with AppendToClipboard() function, but since then I rewrote the 
code and I cummulate the lines in a sTemp variable and if new line is 
wanted, then all lines are ended with the "\R\N" (return and new line) 
codes. And at the end of the iteration the whole text contained in the 
sTemp variable will be inserted with the folloving code:

CopyToClipboard (sText)
PerformScript PasteFromCccclipboard(),

That is what I have written in my previous mail addressed to Paul.

Csaba

2013.11.12. 10:54 keltezéssel, Doug Lee írta:
> Wonder if I'm missing something, but why would you need the append at
> all?
>
> void Function InsertText (string TextToInsert)
> ; Inserts the passed string into the document
> CopyToClipboard (TextToInsert)
> PerformScript PasteFromClipboard ()
> EndFunction
>
>
> On Tue, Nov 12, 2013 at 04:30:39AM +0100, Csaba Godo wrote:
> Thanks for the replies. The combination of the two recomended thing
> solved <my problem. The following code clears the clipboard and appends
> the desired text to it and from there inserts into the user's document:
>
> void Function InsertText (string TextToInsert)
> ; Inserts the passed string into the document
> CopyToClipboard(" ") ; A space char is copied as deletion
> AppendToClipboard (TextToInsert, FALSE)
> PerformScript PasteFromClipboard ()
> EndFunction
>
> This code appends the desired text into the user's document. The space
> character will be placed at the end of the inserted text where oterwise
> would be required a space character. So it is perfect!
>
> Thanks,
>
> Csaba
> 2013.11.11. 23:09 keltez??ssel, Jim Bauer ??rta:
>> 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

Other related posts: