It shouldn't hang like that. We'd need a trace to see what's happening.
If you have the time, check out
https://github.com/autokey/autokey-python2/wiki/Problem-Reporting-Guide.
As for mass updating, it's doable, but tedious to do manually and easy if
you know any scripting language such as bash.
By default, all your script and phrase folders are under
$HOME/.config/autokey/data. If your script is named myscript, then there
are two files. The script itself is in myscript.py and the metadata (what
you want to change in this instance) is in .myscript.json. If your phrase
is named myphrase, the two files are myphrase.txt and .myphrase.json.
All the metadata file names start with a . which makes them hidden files
in Linux, but there are various ways to display them such as using ls -a.
(That funny business is going away in 0.96.)
Near the end of each phrase JSON file is a parameter which controls pasting.
It will usually be
"sendMode": "kb"
or
"sendMode": "<ctrl>+v"
First, copy the files you want to change to an empty working directory.
That way, if you make a mistake or my code is wrong, nothing important
gets damaged. Only copy the files back when you're done and happy with the
results.
So to mass edit a bunch of these, write a bash script (or similar) that
calls sed with something like this UNTESTED code:
#!/bin/bash
## arguments are the files to modify
## This modifies the source files, so make backups!!
## This example changes all the files from Paste using keyboard
## to Paste using clipboard (Ctrl+V)
for filename in "$@"
do
sed -i -e '/sendMode/s/kb/\<ctrl\>\+v/' "$filename"
done
Copy this into a file called something like pastemod in the same working
directory and make it executable.
chmod 755 pastemod
then run it as
./pastemod list of files or ".*.json"
Experiment with just one file until it works.
The double quotes are necessary if any of your phrase names contain blanks
or other special characters that don't belong in Linux file names, but are
legal.
This loops through all the files listed when you call it.
It runs sed, the stream editor.
Sed modifies the files directly (-i) using the command following the -e.
The command ignores all lines that don't contain 'sendMode'. This makes
everything much easier and safer.
When it finds a line with sendMode in it, it replaces kb with <ctrl>+v.
All the backslashes are there to make sure sed treats the next character
as plain text and not as something that tells it what to do.
You can use the same approach for any similar changes you may want to make.
If sed is too obtuse for your taste, awk is a lot easier to program and
debug and is much more manageable when there are any decisions to handle.
If you expect to use the command line at all, learning the basics of these
two tools will greatly expand your capabilities and are way more than
worth the required effort.
Joe
> Ok, I triied changing to "Paste using Clipboard Ctrl+V", but now, when I
> use enter my phrase nothing happens besides my input goes idle, so that I
> can not use my keyboard anymore and have to restart my computer.
> Plus: Is there any way to change the "Paste using" Method of all the
> phrases in a folder at once?
> Thanks and Greetings
> Simon
>
> On Monday, December 20, 2021 at 8:02:52 PM UTC+1 Simon K. wrote:
>
>> Ok, cool, I'll try it out. Thanks!
>>
>> On Sunday, December 19, 2021 at 4:20:10 PM UTC+1
kree...@gmail.com
>> wrote:
>>
>>> Build your phrase in a variable, shove it into the clipboard, paste the
>>> clipboard. I do this on some things where I want the insertion to be
>>> super
>>> fast.
>>>
>>> if you're using the macro expansion only mechanism you want to set
>>> *pasteg
>>> using clipboard* [image: using keyboard.png]
>>>
>>> if you're using python scripting then do
>>>
>>> *wall_of_text="300 words here, however you generated it, doesn't matter
>>> for the example"*
>>> *clipboard.fill_clipboard(wall_of_text)*
>>> *keyboard.send_keys("<ctrl>+v")*
>>>>> <
https://groups.google.com/d/msgid/autokey-users/97549e5d-9d38-486a-89ef-8143e3aa6e9fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
autokey-user...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/autokey-users/5eba92ef-1827-4127-8f53-d5c6a38d7659n%40googlegroups.com.
>