Author Topic: Requesting help to make this command smoother  (Read 995 times)

jonsky7

  • Newbie
  • *
  • Posts: 14
Requesting help to make this command smoother
« on: February 15, 2021, 10:37:13 AM »
I have following command that looks at the Variable/Token whatever it is IDENT1, IDENT1 is not generated from anything, I just have a another command that writes one character to the IDENT1 variable and sends it here to be turned into a function in game, which is programming a GPS device that only has knobs to scroll through and select the text. 
 
Code: [Select]
Pause 0.02 seconds
.
.
Begin Text Compare : [IDENT1] Equals 'A'
    Execute command, 'A; Alpha; Alfa; AL FAH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'B'
    Execute command, 'B; Bravo; BRAH VOH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'C'
    Execute command, 'C; Charlie; CHAR LEE' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'D'
    Execute command, 'D; Delta; DELL TAH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'E'
    Execute command, 'E; Echo; ECK OH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'F'
    Execute command, 'F; Foxtrot; FOKS TROT' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'G'
    Execute command, 'G; Golf' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'H'
    Execute command, 'H; Hotel; HOH TELL' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'I'
    Execute command, 'I; India; IN DEE AH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'J'
    Execute command, 'J; Juliet; JEW LEE ETT; Jew-lee; jon' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'K'
    Execute command, 'K; Kilo; KEY LOH; Kevin' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'L'
    Execute command, 'L; Lima; LEE MAH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'M'
    Execute command, 'M; Mike' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'N'
    Execute command, 'N; Novemeber; NO VEMBER; Nancy' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'O'
    Execute command, 'O; Oscar; OSS CAH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'P'
    Execute command, 'P; Papa; PAH PAH; Peter' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'Q'
    Execute command, 'Q; Quebec; KEH BECK; Quad' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'R'
    Execute command, 'R; Romeo; ROW ME OH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'S'
    Execute command, 'S; Sierra; SEE AIRRAH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'T'
    Execute command, 'T; Tango; TANG OH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'U'
    Execute command, 'U; Uniform; YOU NEE FORM' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'V'
    Execute command, 'V; Victor; VIK TAH' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'W'
    Execute command, 'W; Whiskey; WISS KEY' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'X'
    Execute command, 'X; X-ray; ECKS RAY' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'Y'
    Execute command, 'Y; Yankee, YANG KEY' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals 'Z'
    Execute command, 'Z; ZED; Zulu; ZOO LOO; Zebra' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '1'
    Execute command, '1; one' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '2'
    Execute command, '2; two' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '3'
    Execute command, '3; three' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '4'
    Execute command, '4; four; for' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '5'
    Execute command, '5; five' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '6'
    Execute command, '6; six' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '7'
    Execute command, '7; seven' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '8'
    Execute command, '8; eight; ATE; EAT' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '9'
    Execute command, '9; nine' (and wait until it completes)
Else If Text Compare : [IDENT1] Equals '0'
    Execute command, '0; Zero' (and wait until it completes)
End Condition


I'm trying to record and send it LAT:Long DD.MM.SS so it rotates the knobs and pushes the buttons the right amount of times. I'm not sure where to start.

If anyone is willing I would appreciate it. 

Any help with that would be awesome  :-*
« Last Edit: February 15, 2021, 12:30:10 PM by jonsky7 »

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4759
  • RTFM
Re: Requesting help to make this command smoother
« Reply #1 on: February 15, 2021, 02:20:40 PM »
Not sure where to start with what?


If you're just looking to simplify what you've posted, that could look like this:
Code: [Select]
Pause 0.02 seconds
.
.
Execute command, '{TXT:IDENT1}' (by name) (and wait until it completes)

If there is a possibility that "IDENT1" does not equal a valid command phrase (E.G. it has not been set when you execute this command), you could add a condition before the "Execute Another Command" action that stops the command, if necessary.