I’m apologizing in advance on how stupid the question sounds!
I am currently trying to automate a label making process where I can have the application press a series of numbers and then print the label out. I unfortunately have to print about 1000 labels and doing it by hand seems tedious. I figured there might be a way to automate this process. The application is on an android platform and has a combination of four numbers that leads to a product which needs to be printed right away.
I am thinking if I can lay out a program on top which would allow the system to utilize the keyboard function in order to type in the 4 digit numbers followed by the print key.
If I can get any help or direction that would be great! Thank you!
I know on desktop computers, you can use any number of languages to “automate” the input of keys/mouse inputs. Its very brittle, as something as simple as clicking on the wrong place on the page will break the process, but it’s easy to setup and use.
However I’m not sure what is available for Android platforms, but I’d assume there is something you could possibly find if you search hard enough.
You’d essentially create a script that takes control of your keyboard+mouse that runs through a list of commands to execute. Again it’s a very brittle approach, but will work without getting into any complex API’s or anything, and can work with essentially anything. However, as I mentioned earlier I’m not sure about doing this on Android specifically, as its a much more sandboxed environment, making such automation more difficult.
The core issue is computers are incredibly dumb. The fact they can do anything useful at all is usually due to a lot of work in preparing them to do a specific set of tasks, and leveraging the fact they can perform some tasks very fast.
Even something as simple as “recognize a series of numbers” requires leveraging other people’s work to get the computer to understand what a number even is. If you need your program to recognize images, it’s still possible as Image recognition libraries are out there for you to use, but it requires you setting up your program to interact with these libraries to solve your problem.
Imagine telling a young child these sets of instructions. Odds are you will have to help them a little so they can figure out what you mean and execute the job at hand without any guidance.
Now image that child executes the job super fast (maybe its kid Flash?), but also gets instantly stuck the moment something happens it doesn’t expect as they lost all their intuition and reasoning. That’s basically your computer executing this task.
Your only choice is to explicitly manage everything ahead of time so this computer/kid-flash can handle anything that comes up during the process. Those “explicit commands” are your script/program. The problem might be simple, but the way your solving it via programming is actually telling the computer to solve it for you. So you are “a step or two away” from the problem itself.
It’s very possible to write a script to do what you want, assuming you can remove as many extra steps as possible. Like figuring out how to run the script on an Android device, which again can be secured against scripts reading what’s on your screen all the time due to security concerns.
It just might time some time to figure out how to “communicate” to your machine on how to execute what you want, and leveraging tools it can use (libraries) to execute the task your already performing as a human manually. If learning how to do that, then debugging your script/program until it works might take more time than doing the task manually, but once you learn how to program tasks such as these, you can easily carry over this knowledge to the next 1 thousand… or 1 million, which is why automation can be useful once its setup properly.