Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[MOD][XPOSED] Macro / Text Expansion

OP mikmitch

28th August 2014, 10:40 PM   |  #1  
OP Member
Flag Tallahassee
Thanks Meter: 132
 
71 posts
Join Date:Joined: Jul 2008
More
Automatically expand text sequences in any text box in (almost) all apps!

Featured on XDA-portal. Thanks to @Will Verduzco (willverduzco) for the article!

This is an Android Xposed module to perform Macro / Text expansion. The module allows short key sequences to be transformed into other, usually more time-consuming, sequences of keystrokes. This means that frequently used or repetitive sequences of keystrokes can easily be automated. Since it uses Xposed and operates at the text widget level, it works with all factory and third party keyboards, and can be added to user dictionaries for even faster use.

After creating my fun I am Groot module, I thought I'd do something more practical with run-time text processing using Xposed.

Screenshots





Requirements
Instructions
  • Download apk from Xposed Module Repository
  • Install module as a normal apk
  • Open Xposed Installer and click checkbox to enable
  • Reboot device to activate module

Download
v1.2 - Xposed Module Repository


Tips & Hints
It's best to set the macro phrase to a term that is not normally used in conversation, since all instances of this phrase will be replaced.
For example, using the macro 'address' to denote your home address would be a poor choice, since this would change a statement like 'enter your email address' into 'enter your email '123 xyz street'
A better choice is to add a symbol and set the alias to something like '@addr' to prevent inadvertent text expansion.
Changes to macro list require reboot to activate.


AutoHotKey import file notes
  • Import macro lines that match ::macro::expansion
  • Does not yet handle AutoHotKey wildcards/regular expressions
  • Lines containing non-ASCII characters are also ignored
  • Enable import/restore debug logging to troubleshoot missed macro issues
Any AutoHotKey text file should be importable without modification.
If the module is not able to handle the macro (yet) it will simply ignore the line.
The module does not have an upper limit on the number of macros that can be entered/imported, but performance will degrade on significantly large lists, especially on older devices.


Known Issues
FC issue with MultiAutoCompleteTextViews; temporarily disabled
Not yet working in web browsers & WebViews; work in progress
Macros should be functional with these browsers: Atlas, Dolphin, Now Browser Extended
Limited/no function with these browsers: AOSP, Chrome, Chrome Beta, Now Browser Pro
Support for these in progress


Disclaimer
I try my best to thoroughly test everything I publish, but given the staggering number of devices, ROMs, and apps I cannot make any guarantee that something will go wrong. Use at your own risk!


Source code
This module is open source software, available on my Github page, licensed under the Apache 2.0 license
If you are a developer and want to contribute, fork the repo and submit a pull request.


Credits
Problems/feedback
  • If you find this useful, click thanks!
  • If something is broken, let me know and I'll try my best to fix it!
  • If a feature is missing, suggest it and I'll try to add it!
Last edited by mikmitch; 12th September 2014 at 03:52 AM. Reason: add notes for autohotkey import
The Following 59 Users Say Thank You to mikmitch For This Useful Post: [ View ]
28th August 2014, 10:44 PM   |  #2  
OP Member
Flag Tallahassee
Thanks Meter: 132
 
71 posts
Join Date:Joined: Jul 2008
More
Changelog

Version 1.2 (current)
  • Backup/export & restore/import macro list in AutoHotKey & JSON formats
  • Support for MultiAutoCompleteTextView boxes
  • Option to disable macro expansion in password boxes
  • Option to make macro expansion case insensitive
  • In-app about/support/donation links

Version 1.1
  • Removed the regular expression restriction from macros
  • Update minimum SDK for ICS support (API Level: 14 and up)

Version 1.0
  • Initial release
Last edited by mikmitch; 12th September 2014 at 03:41 AM. Reason: update changelog
28th August 2014, 10:54 PM   |  #3  
chavocarlos's Avatar
Senior Member
Flag Guayaquil
Thanks Meter: 100
 
386 posts
Join Date:Joined: Mar 2011
Mmmm good work, but I will pass, I prefer to fight with my lazyness instead to save sensible data in the phone or third app with root access. Anyways good work dude!.
29th August 2014, 12:18 AM   |  #4  
-V-O-Y-A-G-E-R-'s Avatar
Senior Member
Flag \dev\null -yu
Thanks Meter: 43
 
205 posts
Join Date:Joined: Jun 2006
More
I was sooo happy when I saw this module tonight, but soon realized that it's not really usable for me. Just because those chars that are forbidden because reg exp.

I use similar app on OS X and BlackBerry has it natively. I replace m@ with my email and a number of Skype smiles (cch becomes (chuckle)), but because of those limitations, none of the above examples cannot be actually used.

Could you please explain more in detail what exactly seems to be the problem with those banned chars? Could there be an option to switch them if user needs them?
29th August 2014, 03:52 AM   |  #5  
OP Member
Flag Tallahassee
Thanks Meter: 132
 
71 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by -V-O-Y-A-G-E-R-

I was sooo happy when I saw this module tonight, but soon realized that it's not really usable for me. Just because those chars that are forbidden because reg exp.

Thanks for the feedback. I've been able to correct the issue and have removed the regular expression restriction. The updated module has been pushed to the Xposed Module Repository. Let me know if you have any more issues!
The Following 2 Users Say Thank You to mikmitch For This Useful Post: [ View ]
29th August 2014, 04:02 AM   |  #6  
DrRuckingFetard's Avatar
Member
Flag Sydney
Thanks Meter: 11
 
95 posts
Join Date:Joined: Sep 2013
More
I was looking for a way to get the look of disapproval --> ಠ_ಠ into a keyboard emoticon list but now with this mod i can insert it via a macro shortcut.. probably not really the purpose of the module but until I can think of something more productive to add in there it's just for that haha

good work!
The Following User Says Thank You to DrRuckingFetard For This Useful Post: [ View ]
29th August 2014, 04:19 AM   |  #7  
Senior Member
Flag Bharuch
Thanks Meter: 116
 
281 posts
Join Date:Joined: Jul 2012
More
Smile
Nice module and thamxxx for sharing but whatsapp+ is crashing. ☺
29th August 2014, 05:33 AM   |  #8  
undaclazz's Avatar
Senior Member
Yogyakarta
Thanks Meter: 52
 
162 posts
Join Date:Joined: Oct 2011
Nice, Now I can make shortcut on Swiftkey... but it requires reboot everytime I add new shortcut? Would be nice if we can add on the fly ...
29th August 2014, 05:57 AM   |  #9  
OP Member
Flag Tallahassee
Thanks Meter: 132
 
71 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by is0l4ted

Nice module and thamxxx for sharing but whatsapp+ is crashing. ☺

Can you PM me your Xposed logs so I can get this issue fixed?
The Following User Says Thank You to mikmitch For This Useful Post: [ View ]
29th August 2014, 06:00 AM   |  #10  
OP Member
Flag Tallahassee
Thanks Meter: 132
 
71 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by undaclazz

Nice, Now I can make shortcut on Swiftkey... but it requires reboot everytime I add new shortcut? Would be nice if we can add on the fly ...

Thanks for the feedback. I'll see if I can remove the reboot requirement!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes