Plugin - On-Screen Keyboard / Calculator

Here is where you can drop off Examples of WORKING macros,plugins,Gcode programs , macro Wizards etc.
Please give a brief description of what it is and how it works.

Plugin - On-Screen Keyboard / Calculator

Postby dezsoe » Tue Jul 18, 2017 9:17 pm

This plugin helps entering numbers into input fields. Enable the plugin (Call startup not needed), then click into any input field: you get a calculator-style on-screen keyboard, and it is really a calculator. You can do the following:

    * type any numbers
    * use g-code functions (abs[], etc.)
    * use actual #nnn variables
    * use special variables as x, y, z, etc.
    * write/read/clear memory

Check attached pictures, download, use!

(The missing two buttons will have their functions in version 2.0 some weeks later.)

Requirement: UCCNC version 1.2029 or higher.

Download link 1
Download link 2

osk1.png
osk1.png (8.64 KiB) Viewed 20733 times


osk2.png


osk0.png
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Plugin - On-Screen Keyboard / Calculator

Postby Robertspark » Tue Jul 18, 2017 9:50 pm

nice plugin, thanks :D
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Plugin - On-Screen Keyboard / Calculator

Postby dezsoe » Mon Sep 04, 2017 9:44 am

Hi,

The machine won't move to the new position if you enter a coordinate, so if you enter it with the help of this plugin, it still won't move. This plugin is for helping the input with on-screen keys (using only mouse or touchscreen) and, if needed, calculation and/or memory etc.

If you need some fields to set a movement, you need to program it. Put fields on the screen and write a macro which reads these fields and moves to that position.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Plugin - On-Screen Keyboard / Calculator

Postby dezsoe » Tue Jul 17, 2018 9:02 am

The new version of OSK is now available on the original download links in the first post. Also included in test version 1.2106.

- now supports MDI input with history and 3 keyboard layout (QWERTY, QWERTZ, AZERTY) for MDI supported characters. Also, OSK can be switched to 75% opacity
- can be called from macros/plugins

Sample/test macro:

Code: Select all
object Returnvalue;

double? result;
string mystring;

// test0 - check if plugin is enabled

Returnvalue = exec.Informplugin("UCCNC_OSK.dll", (object)null);

bool isrunning = false;

if (Returnvalue is bool) isrunning = (bool)Returnvalue;
if (!isrunning)
{
  exec.AddStatusmessage("On-Screen Keyboard plugin not enabled!");
  return;
}

// test1 - numeric input with default value

Returnvalue = exec.Informplugin("UCCNC_OSK.dll", (object)"calc:1.23");

result = null;

if (Returnvalue is double?)
{
  result = (double?)Returnvalue;
  if (result != null)
    exec.AddStatusmessage("Result: " + result.ToString());
  else
    exec.AddStatusmessage("Result: none");
}
else
    exec.AddStatusmessage("Result: not double?");

// test2 - numeric input

Returnvalue = exec.Informplugin("UCCNC_OSK.dll", (object)"calc");

result = null;

if (Returnvalue is double?)
{
  result = (double?)Returnvalue;
  if (result != null)
    exec.AddStatusmessage("Result: " + result.ToString());
  else
    exec.AddStatusmessage("Result: none");
}
else
    exec.AddStatusmessage("Result: not double?");

// test3 - string input with default value

Returnvalue = exec.Informplugin("UCCNC_OSK.dll", (object)"text:blabla");

mystring = "";

if (Returnvalue is string)
{
  mystring = (string)Returnvalue;
  exec.AddStatusmessage("Result: '" + mystring + "'");
}
else
    exec.AddStatusmessage("Result: not string");

// test4 - string input

Returnvalue = exec.Informplugin("UCCNC_OSK.dll", (object)"text");

mystring = "";

if (Returnvalue is string)
{
  mystring = (string)Returnvalue;
  exec.AddStatusmessage("Result: '" + mystring + "'");
}
else
    exec.AddStatusmessage("Result: not string");
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary


Return to UCCNC TOOL BOX

Who is online

Users browsing this forum: No registered users and 3 guests