<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hello Bob,<br>
this script works great. But I for me the 2nd line is reading from the
radio.<br>
What do you mean by <br>
<br>
</tt><tt>"You cannot write a Lua script to read a response from the
radio"?<br>
I'm new to LUA, i'm more in C and C++, but i will read the LUA manual
to get a better understanding. <br>
<br>
I will change the script so it is working either with VFO A and VFO B.<br>
<br>
thanks Olli</tt><br>
<div class="moz-signature">
<title></title>
<hr size="2" width="100%"><font face="Arial">  Oliver Grossmann
  |   DH2WQ   |   <a class="moz-txt-link-abbreviated" href="mailto:oliver.grossmann@bretzi.de">oliver.grossmann@bretzi.de</a></font><br>
</div>
<br>
On 20.11.2010 02:55, Bob Wilson, N6TV wrote:
<blockquote
 cite="mid:AANLkTin3k5RLvJTSi4TRz6PkHXvvdsO9oLL7EkUstqcH@mail.gmail.com"
 type="cite">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 moz-do-not-send="true"
 href="mailto:oliver.grossmann@bretzi.de">oliver.grossmann@bretzi.de</a>></span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; 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 moz-do-not-send="true"
 href="mailto:oliver.grossmann@bretzi.de" target="_blank">oliver.grossmann@bretzi.de</a></font><br>
    </div>
    <br>
    </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 moz-do-not-send="true" href="mailto:Support@win-test.com"
 target="_blank">Support@win-test.com</a>
<a moz-do-not-send="true"
 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 moz-do-not-send="true" href="mailto:Support@win-test.com">Support@win-test.com</a><br>
    <a moz-do-not-send="true"
 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>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Support mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Support@win-test.com">Support@win-test.com</a>
<a class="moz-txt-link-freetext" href="http://www.f5mzn.org/cgi-bin/mailman/listinfo/support">http://www.f5mzn.org/cgi-bin/mailman/listinfo/support</a>
  </pre>
</blockquote>
</body>
</html>