Skip to content

Instantly share code, notes, and snippets.

@f4iey
Created August 1, 2024 11:40
Show Gist options
  • Save f4iey/285144d039bde82423dc533fb5ddc2f2 to your computer and use it in GitHub Desktop.
Save f4iey/285144d039bde82423dc533fb5ddc2f2 to your computer and use it in GitHub Desktop.
DXLog.net script to send ADIF to LoTW when program closes
//INCLUDE_ASSEMBLY System.dll
//INCLUDE_ASSEMBLY System.Windows.Forms.dll
using System;
using System.Windows.Forms;
namespace DXLog.net
{
public class ScriptLotw : ScriptClass
{
ContestData _cdata;
public void Initialize(FrmMain main)
{
_cdata = main.ContestDataProvider;
}
public void Deinitialize()
{
const callsign = _cdata.dalHeader.Callsign;
const logPath = "%userprofile%\Documents\" + callsign + ".adi";
if (MessageBox.Show("Send logs to LoTW now?", "LoTW Export", MessageBoxButtons.YesNo) == DialogResult.Yes){
// export adif to dest and upload to lotw
// Log.exportAdif(logPath);
System.Diagnostics.Process.Start("tqsl", "-a compliant -d -u -l", callsign, "-q", logPath);
}
}
public void Main(FrmMain main, ContestData cdata, COMMain comMain)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment