[WT-support] N6TV esm.wts script

Bjorn LB1GB lb1gb at la8w.com
Fri Sep 30 23:33:44 CEST 2011


Hi Bob,

I've tried to change your ESM to behave like we want. I think I got it
right, but would like you to proofread it, please.

What we want is: when calling someone on the second radio(chasing mults);

First: call the station even if it a dupe in log(written warning is
there anyway)(don't ask :-))
Second: when we come back with our exchange(we already established a
contact) we log the QSO without the extra ENTER which is needed with
your version.

The QSO on second radio goes like this:

N6TV Moment1: CQ CONTEST N6TV
LN8W Moment2: LN8W (Enter)
N6TV Moment3: LN8W 5903
LN8W Moment4: 5914 (Enter: Sends report and QSO is logged)

Your version:
N6TV Moment1: CQ CONTEST N6TV
LN8W Moment2: LN8W (Enter)
N6TV Moment3: LN8W 5903
LN8W Moment4: 5914 (Enter)
LN8W Moment5: We hit enter again to log the QSO

Here is the modified script(remember I have no clue what I'm doing.
I'm used the trial and fail/success method.).

-- Based on N6TV ESM script

-- Send functions

function sendCq()
   wtQso:ResetExchangeSent();
   wtApp:SendFKey("F1");  -- Always use the function key
end;

function sendExchangeRun()
   wtApp:SendFKey(wtQso:IsModePhone() and "F2" or "INSERT"); -- Ternary Operator
   wtQso:SetExchangeSent();
end;

function sendExchangeAgain()
   if (wtQso:IsModePhone()) then
      wtApp:SendFKey("F2");
   else
      wtApp:SendFKey("F5"); -- $LOGGED
      wtApp:SendFKey("F7"); -- ?
   end;
end;

function sendTu()
   if wtQso:IsModePhone() then
      wtApp:SendFKey("F3")
      wtApp:SendCtrlKey("Plus")
   else
      wtApp:SendFKey("PLUS")
   end

   wtQso:ClearStatus();
end;

function sendQuestionMark()
   wtQso:ResetExchangeSent();
   wtApp:SendFKey("F7"); -- Again ?
end;

function sendMyCall()
   wtApp:SendFKey("F4"); -- My call
end;

function sendExchangeSAndP()
   wtApp:SendFKey("F2");
   wtQso:SetExchangeSent();
end;


-- ESM core code

-- Return 0 (or return nothing) if we want the CR
-- to be processed also by WT (ie log QSO) and -1 if not.

if (wtQso:IsOperatingModeRun()) then -- Run
   if (wtContest:IsExchangeRequired()) then -- Usual contests
      if (wtQso:IsExchangeEmpty() or not wtQso:IsQsoApproved()) then
         if (wtQso:IsCallsignEmpty()) then
            sendCq();
         else
            if (wtQso:IsCallsignRepeated()) then
               sendExchangeAgain();
            else
               sendExchangeRun();
            end;
         end;
      else
         if wtQso:IsExchangeSent() or wtQso:IsModePhone() then
            sendTu()
         else
            sendExchangeRun();
         end;
      end;
   else -- DXPed etc.
      if (not wtQso:IsQsoApproved()) then
         if (wtQso:IsCallsignEmpty()) then
            sendCq();
         else
            if (wtQso:IsCallsignRepeated()) then
               sendExchangeAgain();
            else
               sendExchangeRun();
            end;
         end;
      else
         if wtQso:IsExchangeSent() or wtQso:IsModePhone() then
            sendTu();
         else
            sendExchangeRun();
         end;
      end;
   end;
else -- S&P : The automatic exchange fill (if enabled) is disabled by WT
   if ( (wtQso:IsExchangeEmpty() and wtContest:IsExchangeRequired())
      or not wtQso:IsQsoApproved() ) then
      if (wtQso:IsCallsignEmpty()) then
         sendQuestionMark();
      else
      if (not wtQso:IsCallsignEmpty()) then
            sendMyCall();
         end;
      end;
   else
      if wtQso:IsExchangeSent() or wtQso:IsModePhone() then
         -- wtQso:ClearStatus();
         sendExchangeSAndP();
         return 1; -- Log it silently
      else
         if (not wtQso:IsDupe()) then -- Sent exchange only if not dupe
         end;
      end;
   end;
end;

return -1; -- This script overrides the Win-Test CR process


Best Regards Bjorn LB1GB/LN8W
http://la8w.com


More information about the Support mailing list