WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Bitmaps and Clipboard

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Cutting and Pasting special characters

Keywords:      clipget()  ClipGetEx(7)

Question:

I'm trying to cut and paste french accented characters from one document to another using the following:
ClipData = ClipGet()
WinActivate("~Notepad")
SendKey(ClipData)
I have not been able to get this to work.

Answer:

Depends on the problem. What kind of problems are you getting?
  1. Try sending Ctrl-v instead to paste to the clipboard.
    ClipData = ClipGet()
    WinActivate("~Notepad")
    SendKey("^v")
    
  2. The major problem is the ANSI/ASCII character sets. You may need to convert the data between them. Maybe try the:
    ClipGetEx(7) 
    
    and see if that helps.

  3. Can't paste special characters ! + ^ { ~ %

    Try...

    ClipData = ClipGetEx(7)
    WinActivate("~Notepad")
    ClipData=StrReplace(ClipData, "{", "{{}")
    ClipData=StrReplace(ClipData, "+", "{+}")
    ClipData=StrReplace(ClipData, "!", "{!}")
    ClipData=StrReplace(ClipData, "^", "{^}")
    ClipData=StrReplace(ClipData, "~", "{~}")
    ClipData=StrReplace(ClipData, "%%", "%%%%")
    SendKey(ClipData)
    

Article ID:   W12746
Filename:   Pasting Special Chars from Clipboard.txt
File Created: 2006:12:21:16:02:14
Last Updated: 2006:12:21:16:02:14