Olli,<br><br>You cannot write a Lua script to read a response from the radio.  You can issue an "IF;" command to the K3, but you cannot read the results.<br><br>Maybe the problem is that once you switch VFO B, the frequency in the band map changes, so Ctrl-Up is going to start from a new place.<br>

<br>One approach that may work better than swapping VFOs is to :<br><br><span style="font-family: courier new,monospace;">-- Save current VFO A frequency<br>local VFOAfreq = wtRadio:GetFreq(WT_RADIO_VFOA)<br><br>-- Press Ctrl-Up to move VFO A to new freq<br>

wtApp:SendKeyCode(294, WT_KEY_CTRL)<br><br>-- Set VFO B freq to current VFO A freq<br>wtRadio:SetFreqSubVfo( wtRadio:GetFreq(WT_RADIO_VFOA) )<br><br>-- Restore original VFO A freq<br>wtRadio:SetFreq(VFOAfreq, WT_RADIO_VFOA)<br>

<br>-- No further keystrokes<br>return -1<br></span><br>You may have to add a wtApp:Sleep(100) to allow the radio to switch frequencies.<br><br>On a K3 you could issue a command to do A->B directly (SWT13;).<br><br>I have not tested it, please report results.<br>

<br>73,<br>Bob, N6TV<br><br><div class="gmail_quote">On Fri, Nov 19, 2010 at 5:18 PM, Oliver Grossmann <span dir="ltr"><<a href="mailto:oliver.grossmann@bretzi.de">oliver.grossmann@bretzi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">




  

<div bgcolor="#ffffff" text="#000000">
<tt>Hello,<br>
I tried some stuff, but nothing seems to work. The cat command for the
TRX works just fine for switching.<br>
The problem seems to be in time gap between setting TRX to 2nd VFO and
WinTest getting confirmation of switching VFO from the radio.<br>
<br>
If I'm placing a wtApp:Sleep(n) the Programm will do nothing in this
time, even not checking if TRX status has changed.<br>
<br>
I think i will try to get the status from the TS-850 by interpreting
the return value of the IF command, or implement an delay from system
time without stopping the WinTest Application.<br>
<br>
If someone has anymore hints i will be looking for this.<br>
<br>
Olli<br>
<br>
</tt><div class="im">
<div>

<hr size="2" width="100%"><font face="Arial">  Oliver Grossmann
  |   DH2WQ   |   <a href="mailto:oliver.grossmann@bretzi.de" target="_blank">oliver.grossmann@bretzi.de</a></font><br>
</div>
<br></div><div><div></div><div class="h5">
On 19.11.2010 20:00, Laurent HAAS - F6FVY wrote:
<blockquote type="cite">
  <pre>Hi

Le 19/11/2010 19:44, Bob Wilson, N6TV a écrit :

  </pre>
  <blockquote type="cite">
    <pre>If I could figure out how to send up arrow and down arrow commands (key
code?) from Lua
    </pre>
  </blockquote>
  <pre>Try

wtApp:SendKeyCode(294. 4) for the Ctrl-Up key
wtApp:SendKeyCode(296, 4) for the Ctrl-Down key

Not deeply tested.

73

Larry - F6FVY
_______________________________________________
Support mailing list
<a href="mailto:Support@win-test.com" target="_blank">Support@win-test.com</a>
<a href="http://www.f5mzn.org/cgi-bin/mailman/listinfo/support" target="_blank">http://www.f5mzn.org/cgi-bin/mailman/listinfo/support</a>
  </pre>
</blockquote>
</div></div></div>

<br>_______________________________________________<br>
Support mailing list<br>
<a href="mailto:Support@win-test.com">Support@win-test.com</a><br>
<a href="http://www.f5mzn.org/cgi-bin/mailman/listinfo/support" target="_blank">http://www.f5mzn.org/cgi-bin/mailman/listinfo/support</a><br>
<br></blockquote></div><br>