Updates to sendemtiny.exe

in #utopian-io7 years ago

Repository

https://github.com/quole/sendemtiny

send em tiny quick guide

Previous post: https://steemit.com/utopian-io/@quoll/send-em-tiny-exe-rename-me-to-choose-which-unicode-character-to-send (creation of project)

send em tiny extends mouse and keyboard drivers to allow you to send a Unicode character where that option was not previously available.

Note / before you ask: Razer Synapse 2 does not allow sending of parameters to an executable, so the sendemtiny.exe file must be renamed in order to change its behavior. Sending parameters to an executable is simply not an option. There must be multiple executables to allow multiple target behaviors. To create multiple behaviors, the user can duplicate the executable file. The file is under 20kb. Additionally, Logitech SetPoint, Asus Strix Software and probably others do not allow setting of parameters for executable targets. It is not an option.

New Features

I have now extended send em tiny to allow a number of other functions:

  • multiple literal codes now supported. For example, rename sendemtiny.exe toan emoji pirate flag U+1F3F4 U+200D U+2620 U+FE0F.exeNote: the text before the first code or keyword ("an emoji pirate flag") is ignored and serves only as a comment. This Unicode sequence is via Unicode's Recommended Emoji ZWJ Sequences. This example sends "🏴‍☠️", which may display as one emoji or two depending on your platform.
  • web entities: right arrow →.exe sends a "→" (the text "right arrow" is treated as a comment and ignored)
  • new say command for a longer string: say ⊂(◉‿◉)つ.exe or say Dear Sir/Madam,.exe
  • new type command to send the text found in a text file in the same directory. For example,type greeting.txt.exe will send the contents of greeting.txt. Note: As a security precaution, this will not allow typing of files in a higher directory.
  • pauses (new). For example: thinking U+1F914 850ms U+1F4A1.exe will send "🤔" then pause for 0.85s, then send "💡". Milliseconds and seconds are supported with ms and s . While pauses can be inserted before, after or between "literal codes", currently they can only be placed before say and typecommands.

Kept and renamed the original: send em micro

I wanted to keep the simplicity of the original, delibrately minimal program which was only around 5kb and had a very simple parser. Most lines of code also had a comment to help anyone check the code being run in these security conscious times. It also relied on few external libraries. So I have kept this version largely unchanged, as a separate project in the same repository. It is now called send em micro (sendemmicro.exe). I've complicated it slightly to make its parsing more flexible. It now allows an optional "plus" symbol. For example: U2014.exe and U+2014.exe are both supported now. (The 'U' must be capital).

If only a single Unicode character needs to be sent, then sendemmicro.exe gives optimal speed, security and simplicity.

Future plans

  • a more complex command parser which allows combining of actions and input types
  • more commands: paste text; send keystrokes (for example: separate key up and key down events)
  • a menu option to select from multiple commands or Unicode characters

Source code

Since I've restructured the project, simple diffs are difficult to generate. The main is still in a single file:

License

  • MIT (open source)

GitHub Account

https://github.com/quole

Sort:  

Thank you for your contribution. It is really hard to understand your post, please try to make it little understandable as because not everyone knows about the work you are doing, so it's always better to explain little deep. Commenting on the code is always good because it benefits the developers who are reading your code, to understand more about the project.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

I've written a lengthy readme visible on the github project page which details what the project is for, how it works, a tutorial with many screenshots, and the "quick guide" image at the top of this post, which I hoped would quickly give the concept. I've also updated the readme with the updates given here. If you have a specific question, please ask here or on the Discord (pengo)

The initial version had every single functional line commented as well as having a lengthy readme with many screenshots and still received a Utopian comment score of "Very low - the added comments provide no value or are not present at all." I have had feedback from users who have no problem using the tool, so I'm at a loss for how to provide adequate documentation for the utopian project.

I have seen you have commented on your code but what I mean is that some of the complex logic is still missing the documentation or comment. Let's say for example, you have written a regex, which is quite big,

var regex = new Regex(@"[Uu][+-]?(?<hex>[0-9A-Fa-f]{2,})|say\W(?<say>.*)|type\W(?<type>.*)|(?<entity>&(?:[a-z\d]+|#\d+|#x[a-f\d]+);)|(?<time>(?<num>\d+(?:\.\d+)?)\W*(?<unit>s|ms))");

Now if I am a newbie in the project I will not understand what exactly this Regex does, so explaining it would be highly appreciated. Thus we say that commenting and explaining the complex logic is necessary for open source project because that helps the people who will be using your code.

Fair enough. I'll definitely break that up and/or comment it more when I next have a chance to work on it.

Hey @quoll
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Congratulations @quoll! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

Click here to view your Board

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @quoll! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!