Author Topic: Paste a multi-line entry into a chat window? Load contents from a file?  (Read 5158 times)

NeilF

  • Guest
So I can do this...



So I'm opeing up the chat (C) and pasting in one line at a time, and pressing Enter, over and over...


But isn't there a way to instead:-
Set Windows clipboard to 'This is line 1[CR]This is line 2" so multiple lines can be entered/pasted in all at once?

Note we're dealing with Elite Dangerous here where Enter ultimately submits the chat... So I couldn't do (if this is correct):-
Set Windows clipboard to 'This is line 1[ENTER]This is line 2"

And I'm right in saying VA cannot load the text to enter/paste in from a text file?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
VoiceAttack can do it:
Code: [Select]
Set Text [TextFromFile] to [C:\voiceattack multiple lines.txt]
Set Windows clipboard to '{TXT:TextFromFile}'
Press Left Ctrl+V keys and hold for 0,06 seconds and release

However, Elite:Dangerous' chat feature does need to support multiline input; If pressing enter submits the text, it may not.

NeilF

  • Guest
VoiceAttack can do it:
Code: [Select]
Set Text [TextFromFile] to [C:\voiceattack multiple lines.txt]
Set Windows clipboard to '{TXT:TextFromFile}'
Press Left Ctrl+V keys and hold for 0,06 seconds and release

However, Elite:Dangerous' chat feature does need to support multiline input; If pressing enter submits the text, it may not.

That looks promising! THanks!

I looked over and over (even in the manual) for something like that TextFromFile and couldn't find anything...

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
I didn't know this was possible either! I checked out the options for the "Set a Text Value" action and indeed there is some information related to this on page 61 ('Value from file/URI').

Thanks for pointing this out Pfeil! :)
« Last Edit: June 08, 2017, 09:36:03 AM by Exergist »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
I looked over and over (even in the manual) for something like that TextFromFile and couldn't find anything...
To clarify, "TextFromFile" is just a name for the variable, I'm using the "Value from file/URI" option of the "Set a Text Value" action.

NeilF

  • Guest
Half works :(

Alas when pasting it in, Elite only pastes in to the first line feed and stops...

So although the clipboard contains:-
This is line 1
This is line 2
This is line 3

When I CTRL-V, only "This is line 1" goes in :(


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Elite only pastes in to the first line feed and stops...

That's why I said
Quote
Elite:Dangerous' chat feature does need to support multiline input

Few games do.

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Maybe it's possible to have VA search through the stored clipboard content for the "new line" character and perform some additional processing to break up the text into individual lines that get looped through by VA and pasted automatically?

Also check out the VAExtensions plugin by Antaniserse. VAExtensions provides functionality for reading different types of files into VA and I know that the CSV reader can go line by line.