VoiceAttack

Profiles, Commands and Plugins => Profile and Command Discussions => Topic started by: bcman on December 07, 2018, 01:39:06 PM

Title: Pasting text (newbie)
Post by: bcman on December 07, 2018, 01:39:06 PM
Hi

After a long search on the forum and manual I can't find any direction how to:

Paste text based on when I say commando

Ideally I would like to depend the text based on the time of the day (morning/evening/night)

can someone give me some direction?

thanks!
Title: Re: Pasting text (newbie)
Post by: Pfeil on December 07, 2018, 02:30:48 PM
To paste text, first send it to the clipboard using the "Set a Text Value to the Windows Clipboard" action, then use a Ctrl-V keypress.

Checking the time of day is a little more involved:
Code: [Select]
Begin Text Compare : [{EXP: {TIMEHOUR24}{TIMEMINUTE}  >= 0600 And {TIMEHOUR24}{TIMEMINUTE}  <= 1600}] Equals '1'
    Set Windows clipboard to 'Morning'
Else If Text Compare : [{EXP: {TIMEHOUR24}{TIMEMINUTE}  >= 1601 And {TIMEHOUR24}{TIMEMINUTE}  <= 2300}] Equals '1'
    Set Windows clipboard to 'Evening'
Else If Text Compare : [{EXP: {TIMEHOUR24}{TIMEMINUTE}  >= 2301 And {TIMEHOUR24}{TIMEMINUTE}  <= 0559}] Equals '1'
    Set Windows clipboard to 'Night'
End Condition
Press Left Ctrl+V keys and hold for 0,06 seconds and release
Title: Re: Pasting text (newbie)
Post by: bcman on December 07, 2018, 04:22:52 PM
thanks I am doing something wrong

voice attack recognized the spoken command but
does not execute the ctrl v

do i miss something

pasting it under "Set a Text Value to the Windows Clipboard" as you mentioned

thanks
Title: Re: Pasting text (newbie)
Post by: Pfeil on December 07, 2018, 04:30:44 PM
What are you trying to paste to? Can you post the contents of your action list(right click it, click "Copy All as Text")?
Title: Re: Pasting text (newbie)
Post by: bcman on December 07, 2018, 05:05:37 PM
Code: [Select]
Set Windows clipboard to 'Begin Text Compare : [{EXP: {TIMEHOUR24}{TIMEMINUTE}  >= 0600 And {TIMEHOUR24}{TIMEMINUTE}  <= 1600}] Equals '1'
    Set Windows clipboard to 'Morning'
Else If Text Compare : [{EXP: {TIMEHOUR24}{TIMEMINUTE}  >= 1601 And {TIMEHOUR24}{TIMEMINUTE}  <= 2300}] Equals '1'
    Set Windows clipboard to 'Evening'
Else If Text Compare : [{EXP: {TIMEHOUR24}{TIMEMINUTE}  >= 2301 And {TIMEHOUR24}{TIMEMINUTE}  <= 0559}] Equals '1'
    Set Windows clipboard to 'Night'
End Condition
Press Left Ctrl+V keys and hold for 0,06 seconds and release'

selected send command to this target
compose (no subject) -------------- part of postbox

hope this helps to see what i am doing wrong
Title: Re: Pasting text (newbie)
Post by: Pfeil on December 08, 2018, 05:45:53 AM
...You can't just paste that into an action and expect it to work.

I've exported the command so you can import the .vap attached to this post.
Title: Re: Pasting text (newbie)
Post by: bcman on December 08, 2018, 10:04:53 AM
I have to learn a lot! Thanks it is working the way I had in mind!