Page 1 of 1

Plugin - On-Screen Keyboard / Calculator

PostPosted: Tue Jul 18, 2017 9:17 pm
by dezsoe
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 19527 times


osk2.png


osk0.png

Re: Plugin - On-Screen Keyboard / Calculator

PostPosted: Tue Jul 18, 2017 9:50 pm
by Robertspark
nice plugin, thanks :D

Re: Plugin - On-Screen Keyboard / Calculator

PostPosted: Sun Sep 03, 2017 3:20 pm
by gabi68
Hi,

How is this plugin supposed to wok? I install it and it does the calculation required, but the machine does not move on the new location. What I am doing wrong?

Gabi

Re: Plugin - On-Screen Keyboard / Calculator

PostPosted: Mon Sep 04, 2017 9:44 am
by dezsoe
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.

Re: Plugin - On-Screen Keyboard / Calculator

PostPosted: Tue Jul 17, 2018 9:02 am
by dezsoe
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");