italics

25 lượt xem
Chuyển tới thư đầu tiên chưa đọc

Shmu26

chưa đọc,
11:46:48 13 thg 11, 202213/11/22
đến autokey-users
Can I set a phrase to be in italics?

Sam Sebastian

chưa đọc,
13:12:05 13 thg 11, 202213/11/22
đến autoke...@googlegroups.com
In what program?

Something like libre office you should be able to send Ctrl I before typing to set italics and again after to turn it off.

If it's something like markdown just add the _ characters to the strings.

On Sun, Nov 13, 2022, 11:46 Shmu26 <shmuel...@gmail.com> wrote:
Can I set a phrase to be in italics?

--
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/b382dbda-a41a-4b66-ae93-954b2f729915n%40googlegroups.com.

Shmu26

chưa đọc,
13:15:14 13 thg 11, 202213/11/22
đến autokey-users
I am using MS Word Online. True, I could hit Ctl I, but I was wondering if there is an even easier way to do it. 

jack

chưa đọc,
13:17:45 13 thg 11, 202213/11/22
đến autoke...@googlegroups.com
Is this always the same phrase that you want to enter as italics, or so you expect to select a phrase and then make it into italics?

Jack

Shmu26

chưa đọc,
13:19:22 13 thg 11, 202213/11/22
đến autokey-users
Always the same phrase. For instance, I want to type "mt" and see "my text"

jack

chưa đọc,
13:26:33 13 thg 11, 202213/11/22
đến autoke...@googlegroups.com
Never used online word. Door it enable you to create saved phrases ?

If yes, that could be the simplest way.

If no, autokey can do it.

Jack

Shmu26

chưa đọc,
13:28:27 13 thg 11, 202213/11/22
đến autokey-users
Nope, it does not support saved phrases. Even Google Docs, which does support saved phrases, does not support formatting of the saved phrases, at least the last time I checked. 

jack

chưa đọc,
13:32:43 13 thg 11, 202213/11/22
đến autoke...@googlegroups.com
I'm happy to write a small script for this... But not today, I'm not close to a pc. Tomorrow?

Or someone else can do it now... Should only take a couple of mins, plus time to describe how to set it up in autokey



Jack

Shmu26

chưa đọc,
13:34:18 13 thg 11, 202213/11/22
đến autokey-users
Thanks in advance to you or to anyone else who wants to do it. I am not in a big rush. 

Johnny Rosenberg

chưa đọc,
13:35:39 13 thg 11, 202213/11/22
đến autoke...@googlegroups.com
Den sön 13 nov. 2022 kl 19:15 skrev Shmu26 <shmuel...@gmail.com>:
I am using MS Word Online. True, I could hit Ctl I, but I was wondering if there is an even easier way to do it. 

If Word Online doesn't have a better built-in way to do it, then no. Definitely no. Just let AutoKey do exactly the same as you would have done manually. If it's Ctrl+i, then send Ctrl+i, if it's something else, send something else. You might need to experiment a bit with delays to make it work properly.
If you want to be able to use it in any application (that supports text formatting), you need Autokey to detect what app you are using and adapt to that application.


Kind regards

Johnny Rosenberg

 

On Sunday, November 13, 2022 at 8:12:05 PM UTC+2 sebasti...@gmail.com wrote:
In what program?

Something like libre office you should be able to send Ctrl I before typing to set italics and again after to turn it off.

If it's something like markdown just add the _ characters to the strings.

On Sun, Nov 13, 2022, 11:46 Shmu26 <shmuel...@gmail.com> wrote:
Can I set a phrase to be in italics?

--
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/b382dbda-a41a-4b66-ae93-954b2f729915n%40googlegroups.com.

--
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.

Johnny Rosenberg

chưa đọc,
13:39:40 13 thg 11, 202213/11/22
đến autoke...@googlegroups.com
Den sön 13 nov. 2022 kl 17:46 skrev Shmu26 <shmuel...@gmail.com>:
Can I set a phrase to be in italics?

Not a phrase, but a script.
Something like:
keyboard.send_keys("<ctrl>+i")
keyboard.send_keys("my text")
keyboard.send_keys("<ctrl>+i")


Kind regards

Johnny Rosenberg

jack

chưa đọc,
13:42:21 13 thg 11, 202213/11/22
đến autoke...@googlegroups.com
Shouldn't be a problem but if italics are already on then this script will turn off italics, enter the text then turn on italics.

I doubt there is a way to fix that any it should be so rare as to be not worth bothering about

Jack

Shmu26

chưa đọc,
13:48:24 13 thg 11, 202213/11/22
đến autokey-users
Works perfectly in Word Online and Google Docs, accessed by Brave browser (chromium-based). 
Awesome!
It does not work in LibreOffice or Gedit. But I don't care so much, because I need it primarily for online . 

Johnny Rosenberg

chưa đọc,
14:32:12 13 thg 11, 202213/11/22
đến autoke...@googlegroups.com
Den sön 13 nov. 2022 kl 19:48 skrev Shmu26 <shmuel...@gmail.com>:
Works perfectly in Word Online and Google Docs, accessed by Brave browser (chromium-based). 
Awesome!
It does not work in LibreOffice or Gedit. But I don't care so much, because I need it primarily for online . 

LibreOffice has its own text expansion feature that supports text formatting, so you don't need AutoKey for that in LibreOffice.

However, you can make it work in LibreOffice too. It seems to be a speed issue. A short delay works for me:
keyboard.send_keys("<ctrl>+i")
time.sleep(0.1)
keyboard.send_keys("my text")
time.sleep(0.1)
keyboard.send_keys("<ctrl>+i")

If it still doesn't work, try to increase the delays.

I haven't had Gedit installed for a while (I use Geany these days), but as far as I remember Gedit doesn't have text formatting, does it? Maybe it does, which sounds weird, it's still a text editor and not a word processor, right?


Kind regards

Johnny Rosenberg


On Sunday, November 13, 2022 at 8:39:40 PM UTC+2 Johnny Rosenberg wrote:
Den sön 13 nov. 2022 kl 17:46 skrev Shmu26 <shmuel...@gmail.com>:
Can I set a phrase to be in italics?

Not a phrase, but a script.
Something like:
keyboard.send_keys("<ctrl>+i")
keyboard.send_keys("my text")
keyboard.send_keys("<ctrl>+i")


Kind regards

Johnny Rosenberg

--
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/b382dbda-a41a-4b66-ae93-954b2f729915n%40googlegroups.com.

--
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.

Shmu26

chưa đọc,
15:12:18 13 thg 11, 202213/11/22
đến autokey-users
Correct. Gedit does not support formatting at all. Thanks for tip for LibreOffice. 

jos...@main.nc.us

chưa đọc,
01:59:55 14 thg 11, 202214/11/22
đến autoke...@googlegroups.com
Glad you have a solution.

Some notes on how things work:

The thing that everyone is dancing around, but not explicitly saying is
that characters and fonts/font effects are two separate things. Each
character is just a "plain" character. Various programs can be used to add
effects such as font, rotation, size, italic, ... These are generally
accomplished by either applying them to an entire body of text or by
embedding special formatting codes within the text itself.

These codes need to be invisible to the user, so the text file must have
some additional structure to support them. This is why they won't work in
a text editor - which assumes plain text with no additional structure.

Since there is no universal representation of fonts and font effects, each
class of programs represents them in a different way and has different
ways of setting and resetting them.

Handling this in AutoKey is most easily accomplished using scripts as has
been covered in the other posts.

However, if you really want to, you can do it in phrases as well by
including macros in your phrase for things like <ctrl>+i or even
<codexx>. For these to work, you need to specify the Paste using keyboard
option. This is fine as long as all your characters are in the EN-US
locale code page and assigned to existing keyboard keys. If not, it
becomes rather tortuous to accomplish.

Joe
<https://groups.google.com/d/msgid/autokey-users/b382dbda-a41a-4b66-ae93-954b2f729915n%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/39094eeb-5103-49d7-b92c-2947c8f04d5cn%40googlegroups.com
<https://groups.google.com/d/msgid/autokey-users/39094eeb-5103-49d7-b92c-2947c8f04d5cn%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/cec99613-3f3f-4a71-b227-d2e74589c8c5n%40googlegroups.com.



Trả lời tất cả
Trả lời tác giả
Chuyển tiếp
0 tin nhắn mới