• Support
  • Articles
  • Resources
  • Products

Autoit script to insert clipboard contents into VT session

Moderator: boris

2 postsPage 1 of 1

necod
Newbie

Posts:
7
Joined: Wed Apr 15, 2009 11:08 am
by necod » Thu May 07, 2009 9:26 am
Sometimes "paste" menú option don't work correctly.
It need a Teraterm macro to launch autoit executable.


TERATERM MACRO LAUNCHER
======================
exec 'c:\Archivos de Programa\teraterm\inserta_portapapeles.exe'

AUTOIT SCRIPT (compile and move to c:\Archivos de Programa\teraterm\inserta_portapapeles.exe)
===========================

Code: Select all

  1. $file="c:\portapapeles.txt"
  2.  
  3. $clipboard = ClipGet()
  4. FileOpen ($file, 2)
  5. FileWrite($file, $clipboard)
  6. FileClose ($file)
  7.  
  8. FileOpen ($file, 0)
  9. $i = 0
  10. While 1
  11.     $i = $i + 1
  12.     $line = FileReadLine($file, $i)
  13.     If @error = -1 Then ExitLoop
  14.     ; ConsoleWrite($line & @LF)
  15.     Send($line & "{Enter}")
  16. Wend
  17. FileClose($file)
  18.  
  19. FileDelete($file)
boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1618
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Thu May 07, 2009 1:50 pm
All:

While posting Autoit scripts please surround them with Code style to improve readability and add syntax highlighting.
To add Autoit Code style select the code inside the editor and click on 'Code' button above the editor. It will add opening and closing tags around selected text: [code] [/code]. Then replace opening tag with [code=autoit].

Snippents written on many other programming languages can be highlighed the same way. By default Code highlighter is set to TeraTerm macro, i.e. [code] is the same as [code=ttl]
Thanks.
Best regards,
Boris
Display posts from previous:
Sort by:

2 postsPage 1 of 1

Users browsing this forum: No registered users
cron