Page 1 of 1

UCCNC argument for title

PostPosted: Sun Feb 09, 2020 10:15 am
by Fabien
Hello,
Is that possible to add a command argument to set UCCNC windows title (useful with multiple instances of UCCNC)

Re: UCCNC argument for title

PostPosted: Mon Feb 10, 2020 10:32 am
by dezsoe
Hello Fabien,

I use this macro as a macroloop with autostart to show the version, profile name, controller type and the opened file name in the title:

title.png
title.png (3.61 KiB) Viewed 4583 times

Code: Select all
// ================================================================================================
// System Info v1.1
// ================================================================================================

string header = "UCCNC - ";
string version = AS3.Getfield(902);
string profile = AS3.Getfield(900);
string device = AS3.Getfield(907);
string filename = exec.Getgcodefilename(); // AS3.Getfield(895);

profile = profile.Replace(":", ": ");

if (filename == "-") filename = "";

header += version + " - " + profile + " - " + device + " - File: " + filename;

if (++counter == 20)
{
  counter = 0;
  if (exec.mainform.Text != header)
    exec.mainform.Text = header;
}

// ================================================================================================

#Events

// ================================================================================================

int counter = 0;

// ================================================================================================

Re: UCCNC argument for title

PostPosted: Mon Feb 10, 2020 10:57 am
by Robertspark
nice macro :D