Is there any way in Autohotkey to mimic multiple cursors like in sublime. I need a hotkey that sends and couple of text lines and leaves me with multiple cursors so I don't have to type the same text over and over. Like in the gif below.
Thanks xD.
I need a hotkey that sends and couple of text lines and leaves me with multiple cursors so I don't have to type the same text over and over.
Just to open Sublime Text and type the text you need to.
and leaves me with multiple cursors
You cannot just put several cursors/carets on any application. The application must to provide support for multiple cursors creation. AutoHotKey
is not a magic application which becomes everything possible, it is an automation application to automate boring or repeated tasks. Nevertheless, maybe you can search if there are some application, which can hijack other applications to compel them to use multiple cursors/carets.
However, if you are interested in make the AutoHotKey
application to create several cursors on Sublime Text, you can write an AHK script
to automate the cursors creation on Sublime Text using the Sublime Text keyboard shortcuts. The default Sublime Text API for Multiple cursors/carets is not very rich by keyboard, but there are Packages/Plugins as Power Cursors and Column-Select you can install on Sublime Text to improve it.
Personally I think you are better off writing a Sublime Text Package/Plugin with the Sublime Text API to create the multiple cursors/carets you want to, instead of externally to perform it with an AHK script
by keyboard shortcuts.
Ultimately you can write a AHK script
which asks a text and type it for you on several lines. For example:
Type This,5
down
key.However with this we may easily see down sides as when there are empty lines as on your screen animation. So you would be better off just using Sublime Text, which is in my Opinion the best software that exists from the all as Notepad++, Atom, etc. Sadly it is closed source, so you cannot improve it by yourself or know why it is crashing certain times, which makes me wonder to write a new one open source, compatible with the current plugins and settings for it.
As others have mentioned, you cannot use true multiple cursors unless the program your're using supports it - however, you could attempt to emulate multiple cursors in the following way:
This is essentially how Sublime Text implements multiple cursors, but it has much better support (and speed) because it is software-level. This solution is input-level and will probably be unable to display where the multicursors actually are, will be slow, etc. Also, because it requires a fair bit of positional calculation, the implementation may complex and prone to bugs.
Sorry - this is the best I've got, it's definitely a hack - probably better (simpler) to just automate a copy and paste :P
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With