input devices

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
Forum rules
This is a sub-forum for things specific to MicroMacro.

This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
Post Reply
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

input devices

#1 Post by lisa » Mon Jan 27, 2014 1:18 am

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: input devices

#2 Post by Administrator » Mon Jan 27, 2014 1:56 am

Sounds like just opening a file on the device and reading it. Or am I misunderstanding something?

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: input devices

#3 Post by lisa » Mon Jan 27, 2014 2:24 am

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: input devices

#4 Post by lisa » Mon Jan 27, 2014 3:00 am

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: input devices

#5 Post by rock5 » Mon Jan 27, 2014 3:22 am

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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: input devices

#6 Post by lisa » Mon Jan 27, 2014 3:26 am

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: input devices

#7 Post by lisa » Mon Feb 17, 2014 10:45 pm

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: input devices

#8 Post by rock5 » Tue Feb 18, 2014 6:18 am

Cool, I predicted correctly on both counts. :ugeek:
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: input devices

#9 Post by lisa » Tue Feb 18, 2014 7:43 am

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: input devices

#10 Post by rock5 » Tue Feb 18, 2014 9:22 am

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?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: input devices

#11 Post by Lamkefyned » Tue Feb 18, 2014 4:56 pm

if I understand correctly you are saying something about android.

It can not be THROUGH server?
If you think something is right just because everyone else believes,you're not thinking.

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: input devices

#12 Post by lisa » Tue Feb 18, 2014 8:13 pm

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: input devices

#13 Post by lisa » Wed Mar 12, 2014 8:53 am

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.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: input devices

#14 Post by Lamkefyned » Sun Mar 30, 2014 2:37 pm

Whether there is any application?
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: input devices

#15 Post by Lamkefyned » Wed Jun 04, 2014 5:52 pm

Posible MM?
Attachments
Screenshot_2014-06-05-00-48-40.png
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: input devices

#16 Post by Administrator » Wed Jun 04, 2014 7:23 pm

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.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: input devices

#17 Post by Lamkefyned » Thu Jun 05, 2014 1:24 am

But you can connect to the windows micromacro?
If you think something is right just because everyone else believes,you're not thinking.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: input devices

#18 Post by Administrator » Thu Jun 05, 2014 11:30 am

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.

User avatar
Lamkefyned
Posts: 348
Joined: Thu May 23, 2013 11:38 am
Location: Spain

Re: input devices

#19 Post by Lamkefyned » Thu Jun 05, 2014 12:45 pm

good idea it add a connector in micromacro 2 support
If you think something is right just because everyone else believes,you're not thinking.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests