Page 1 of 1

input devices

Posted: Mon Jan 27, 2014 1:18 am
by lisa
I know very little about this,
I have an idea for something but I want to know if MM can easily capture the input data from a USB device.
More specifically a USB contactless Proximity Smart Card Reader, it will always read a 10 digit number.
According to the documentation if you have an Excel sheet open when the device reads a card the info will be added to the excel.

I haven't recieved the device yet, looking at using it as a means for loyalty cards at my work.

Re: input devices

Posted: Mon Jan 27, 2014 1:56 am
by Administrator
Sounds like just opening a file on the device and reading it. Or am I misunderstanding something?

Re: input devices

Posted: Mon Jan 27, 2014 2:24 am
by lisa
no idea yet, According to the documentation for the device it sends a 10 digit number to excel or word (if just 1 is open) so it is printing to those programmes (i guess)

I have no idea if you can open a file on the device or not.

Did some browsing and came across this
When a card is scanned it output data in humna friendly numbers to any thing that accept typed input from the keyboard like notepad, textbox etc.
So from what I can tell it is acting as a keyboard and just "typing" the numbers, so if you have notepad open it types the numbers to notepad.

I'll know more about the device when it arrives, in a couple of weeks.

Re: input devices

Posted: Mon Jan 27, 2014 3:00 am
by lisa
It sounds like I will be able to just have MM as focus and use io.stdin:read(), so the number will be printed to MM directly and then just hit enter. I was hoping to make it so MM didn't need to be focus though.

I'll see how it goes when it arrives.

Re: input devices

Posted: Mon Jan 27, 2014 3:22 am
by rock5
Firstly if it is acting as a keyboard and just typing numbers, I assume it will output a number per line. So it most likely ends each number with a return, which is handy if trying to use MMs io.stdin:read().

Secondly, as you know MM is capable of intercepting all keypresses even if it's not the active window but the problem will be that whatever is active will receive the key presses anyway. So you will still have to have something open to receive the keypresses to avoid unexpected Windows behavior. In the end you probably will always need a dedicated pc for the purpose, even a low powered one would do.

Re: input devices

Posted: Mon Jan 27, 2014 3:26 am
by lisa
yeah if it works out nicely on my laptop I was going to look at buying a cheap little notebook for it, can get them for around $400 and just a 10inch screen. I suppose I could look at using a tablet aswell, just make up an app for it. hmm.

Re: input devices

Posted: Mon Feb 17, 2014 10:45 pm
by lisa
Ok the item arrived in mail today, yay

Verdict is that it comes up as a "USB input device" as expected and it types the numbers as if it was a keyboard as such into the focus window and also does the return at the end of the 10 numbers.

So next question
Is there a way to make the device ONLY print to MM even when not focus?

Ok so did some more testing.

The input comes up as kepressed and keyreleased and the numbers in the keyborad as opposed to numberpad and always ends in (13) enter.

MM does read the keypresses when not actually focus, even when there is nothing as focus.

Re: input devices

Posted: Tue Feb 18, 2014 6:18 am
by rock5
Cool, I predicted correctly on both counts. :ugeek:

Re: input devices

Posted: Tue Feb 18, 2014 7:43 am
by lisa
I am currently looking at doing something in an android app for this as opposed to MM.

I actually found the io input to not be "child proof" you could back space over anything that would have been printed before the string. Although that may just be the experimental MM I am playing with.
Regardless I will probably make an app as it can be more user friendly for brainless staff.

Re: input devices

Posted: Tue Feb 18, 2014 9:22 am
by rock5
lisa wrote:I actually found the io input to not be "child proof" you could back space over anything that would have been printed before the string.
I don't see how. I imagine the MM program would be sitting there with the io.stdin:read() prompt waiting for input. The reader would input the numbers and Enter almost instantaneously. I don't think there would be time to press backspace. It would then save the value and open the prompt again. Or if you are reading every key stroke using keypressed function then you wont be able to backspace anyway, it would only be accepting number presses and Enter.

Does your phone have a USB port?

Re: input devices

Posted: Tue Feb 18, 2014 4:56 pm
by Lamkefyned
if I understand correctly you are saying something about android.

It can not be THROUGH server?

Re: input devices

Posted: Tue Feb 18, 2014 8:13 pm
by lisa
ambolia wrote:if I understand correctly you are saying something about android.
Yeah I will probably look at doing it for android.
rock5 wrote:I don't see how. I imagine the MM program would be sitting there with the io.stdin:read() prompt waiting for input. The reader would input the numbers and Enter almost instantaneously.
The swipe is fine but the user input aftewards has issues but yeah like I said I think it is the new MM with windows that has the issue.

Re: input devices

Posted: Wed Mar 12, 2014 8:53 am
by lisa
As an update for this, I have decided at the moment to just go with MM and not android. Quite a bit of playing a round and tweaking it and I can more easily do that in LUA.
So yeah it is working nicely for now and just in normal MM.
I might post my code this weekend after a few more tweaks but basically it is just a database of customers and how much they spend is recorded and then converted into store credit to be used by the customer on their next visit.

I have been trying to work out a way to put an "expirey date" on the credits but it would just make things extremely complicated to track that sort of data, for now it is simple and works.

Re: input devices

Posted: Sun Mar 30, 2014 2:37 pm
by Lamkefyned
Whether there is any application?

Re: input devices

Posted: Wed Jun 04, 2014 5:52 pm
by Lamkefyned
Posible MM?

Re: input devices

Posted: Wed Jun 04, 2014 7:23 pm
by Administrator
I'm not entirely sure what you're asking, but no that has nothing to do with MicroMacro. It's just a standard console, and it looks to be from a mobile device. MicroMacro is Windows only and does not support any Apple garbage or Android.

Re: input devices

Posted: Thu Jun 05, 2014 1:24 am
by Lamkefyned
But you can connect to the windows micromacro?

Re: input devices

Posted: Thu Jun 05, 2014 11:30 am
by Administrator
It might be possible. I think I might add raw socket support into MicroMacro 2. That would allow you to more easily connect to MicroMacro on your PC and do whatever you want with it.

You can also use TeamViewer on Android and iOS to connect to your Windows PC. That might be more convenient for most people.

Re: input devices

Posted: Thu Jun 05, 2014 12:45 pm
by Lamkefyned
good idea it add a connector in micromacro 2 support