Author Topic: Pasting text (newbie)  (Read 4358 times)

bcman

  • Guest
Pasting text (newbie)
« 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!

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Pasting text (newbie)
« Reply #1 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

bcman

  • Guest
Re: Pasting text (newbie)
« Reply #2 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

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Pasting text (newbie)
« Reply #3 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")?

bcman

  • Guest
Re: Pasting text (newbie)
« Reply #4 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

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Pasting text (newbie)
« Reply #5 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.

bcman

  • Guest
Re: Pasting text (newbie)
« Reply #6 on: December 08, 2018, 10:04:53 AM »
I have to learn a lot! Thanks it is working the way I had in mind!