if sometable ~=nil then 
    print(string.format('Closest contact %s @ %.2f nm,  altitude: %.2f ft', tostring(sometable.contactname), sometable.range, tostring(sometable.contactwrap.altitude*3.2808)));
    if sometable.contactwrap.typed==0 or sometable.contactwrap.typed == 1 then --"Air" or "Missile" might want to have others here.
    -- retval = ScenEdit_AssignUnitAsTarget(sometable.contactguid,"SomeAirInterceptMission")
    --Samples to attack the contact right away with the unit doing the range checking.
    -- retval = ScenEdit_AttackContact(u.guid,sometable.contactguid,sampleAttackTypes[1]) --automatic [like f1] use system logic
    retval = ScenEdit_AttackContact(u.guid,sometable.contactguid,sampleAttackTypes[2]); print(string.format('%s targeted, %s engaging', tostring(sometable.contactname), tostring(u.name))); --manual [like shift-f1] using loadout wpns
    else --ship,mobile or fixed facility do something else? 
      retval = ScenEdit_AssignUnitAsTarget(sometable.contactguid,"SomeStrikeMission")
    --Samples to attack the contact right away with the unit doing the range checking.
    --retval = ScenEdit_AttackContact(u.guid,sometable.contactguid,sampleAttackTypes[5]) --manual [like shift-f1] launched from specific mount and with a course specified.
    --retval = ScenEdit_AttackContact(u.guid,"BOL",sampleAttackTypes[3]) --BOL manual [like ctrl-f1] using loadout wpns.
    --retval = ScenEdit_AttackContact(u.guid,"BOL",sampleAttackTypes[4]) --BOL manual [like ctrl-f1] launched from specific mount and with a course specified.
    end
else
  print("Something went very wrong.");
end;