<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Hi Bob,<br>
thanks for reply, so i understand more and more the API.<br>
Maybe there will be some improvement for the wtRadio:Send() command in
the future, it would support better homemade equipment and future rigs.<br>
<br>
For the InactiveVfo feature, this would help if you are working on the
2nd VFO and you want to switch 1st VFO to next spot, but this isn't so
important.<br>
But if the command isn't working like the name says, it should be
removed from the API or should be fixed. It would help for implementing
some Radio features.<br>
<br>
I will check this with my K3 after the CQWW next weekend.<br>
<br>
Thanks for all<br>
Olli<br>
 <br>
</tt>
<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 19:45, Bob Wilson, N6TV wrote:
<blockquote
 cite="mid:AANLkTimxfeDvbmYVOx8LUOtsy6k0kP=4Qtcp9rQQqcTr@mail.gmail.com"
 type="cite">
  <div class="gmail_quote">On Sat, Nov 20, 2010 at 1:21 AM, 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;"><tt>What
do you mean by <br>
    <br>
    </tt><tt>"You cannot write a Lua script to read a response from the
radio"?</tt></blockquote>
  <div><br>
What I mean is that the Win-Test Lua API does not allow you to send
your own CAT command and receive the response.  This is not a Lua
limitation, this is a limitation of the Win-Test API.<br>
  <br>
The GetFreq API is there to let you read the radio frequency.  <br>
  </div>
  </div>
  <br>
  <div class="gmail_quote">On Sat, Nov 20, 2010 at 3:14 AM, 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>1) if I'm sending a
command with wtRadio:Send(), will the answer be
captured by Win-Test?</tt></div>
  </blockquote>
  <div><br>
No, whatever reply Win-Test gets from the radio, it cannot be forwarded
to your Lua script due to internal Win-Test implementation restrictions.<br>
 <br>
  </div>
  <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> I tried RadioState =
wtRadio:Send("IF;"), but it
wasn't possible to display the variable. <br>
    </tt></div>
  </blockquote>
  <div><br>
Correct, as I was saying, you cannot send your own CAT command to the
radio and expect the answer to be returned.  You need to use the
GetFreq API instead.<br>
 <br>
  </div>
  <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>2) To be able to use this
also on a VFO on a different Band i changed
the script to:<br>
    <br>
    -- Save current Active VFO frequency<br>
    local ActiveVFOfreq = wtRadio:GetFreq()<br>
    <br>
    -- Work on <br>
    wtRadio:SetFreq( wtRadio:GetFreqInactiveVfo() )<br>
    <br>
    -- Press Ctrl-Up to move active VFO to new freq
    <div class="im"><br>
    wtApp:SendKeyCode(294, WT_KEY_CTRL)<br>
    <br>
    -- Set VFO B freq to current VFO A freq<br>
    </div>
    wtRadio:SetFreqInactiveVfo( wtRadio:GetFreq() )
    <div class="im"><br>
    <br>
    -- Restore original VFO A freq<br>
    </div>
    wtRadio:SetFreq(ActiveVFOfreq)<br>
    <br>
    -- No further keystrokes<br>
    return -1#<br>
    <br>
For my understanding Set/Get FreqInactiveVfo should work on the non
active VFO, but for my TS-850, the commands were send always to VFO B,
even if active VFO is B (VFO B iy yellow in Bandmap).</tt></div>
  </blockquote>
  <div><br>
Don't worry about active / inactive.  If you want to get/set the
frequency of VFO B, just do:<br>
  <br>
  <span style="font-family: courier new,monospace;">VFOBfreq =
wtRadio:GetFreq(WT_RADIO_VFOB)</span><span
 style="font-family: courier new,monospace;"><br>
  <br style="font-family: courier new,monospace;">
wtRadio:SetFreq(VFOBFreq, WT_RADIO_VFOB)<br>
  <br>
  <span style="font-family: arial,helvetica,sans-serif;">See <a
 moz-do-not-send="true" href="http://download.win-test.com/v4/lua">http://download.win-test.com/v4/lua</a>
for the complete Lua API documentation (Wiki has not been able to keep
up).<br>
  <br>
I will be busy with a domestic contest this weekend and unable to
response further until Monday.<br>
  <br>
73,</span><br style="font-family: arial,helvetica,sans-serif;">
  <span style="font-family: arial,helvetica,sans-serif;">Bob, N6TV</span></span><br>
  </div>
  </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>