"Put Text in Quotes", seemingly not working in all contexts

Discussion, questions and support.
Post Reply
User avatar
Oblomov
Posts: 111
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Nov 2nd, ’19, 19:12

I'm trying to use "Put Text in Quotes" from Library

Code: Select all

SavedClip := ClipboardAll
Clipboard =
Send ^{vk43} ;Ctrl C
ClipWait 1
Tmp:=Clipboard
Tmp = "%Tmp%"
; Remove space introduced by WORD
StringReplace, Tmp, Tmp,%A_SPACE%",", All
Clipboard =
Sleep 20
Clipboard := Tmp
Send ^{vk56} ;Ctrl V
Sleep 100
Clipboard := SavedClip
However, it doesn't seem to work within the search box of OneNote, where the quotes makes it so that OneNote performs a more focused search, something I use very frequently:

Image

Is there perhaps some way to fix this perhaps?
User avatar
Tom
Posts: 403
Joined: Nov 24th, ’15, 23:39

Post by Tom » Nov 2nd, ’19, 19:30

Try to insert another Sleep 100 after Clipboard:=Tmp.
:?:
User avatar
Oblomov
Posts: 111
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Nov 2nd, ’19, 21:15

Tom wrote:
Nov 2nd, ’19, 19:30
Try to insert another Sleep 100 after Clipboard:=Tmp.
:?:
Didn't seem to help, unfortunately 😔
User avatar
Tom
Posts: 403
Joined: Nov 24th, ’15, 23:39

Post by Tom » Nov 4th, ’19, 16:42

How about this?

Code: Select all

send, ^c
sleep 200
Send % "" clipboard ""
User avatar
Oblomov
Posts: 111
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Nov 4th, ’19, 21:35

Tom wrote:
Nov 4th, ’19, 16:42
How about this?

Code: Select all

send, ^c
sleep 200
Send % "" clipboard ""
As a standalone command? Doesn't seem to work either unfortunately :/
User avatar
Oblomov
Posts: 111
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Nov 4th, ’19, 21:51

Tom wrote:
Nov 4th, ’19, 16:42
How about this?

Code: Select all

send, ^c
sleep 200
Send % "" clipboard ""
Figured it out by accident 💡

What I did was remove

Code: Select all

Sleep 100
Clipboard := SavedClip
From the original:

Code: Select all

SavedClip := ClipboardAll
Clipboard =
Send ^{vk43} ;Ctrl C
ClipWait 1
Tmp:=Clipboard
Tmp = "%Tmp%"
; Remove space introduced by WORD
StringReplace, Tmp, Tmp,%A_SPACE%",", All
Clipboard =
Sleep 20
Clipboard := Tmp
Send ^{vk56} ;Ctrl V
Sleep 100
Clipboard := SavedClip
User avatar
Oblomov
Posts: 111
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Dec 14th, ’19, 20:17

Hm, no longer working it seems 😔
User avatar
Oblomov
Posts: 111
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Dec 14th, ’19, 20:23

Oblomov wrote:
Dec 14th, ’19, 20:17
Hm, no longer working it seems 😔
Alright, so finally, I managed to get it working from

https://autohotkey.com/board/topic/6688 ... cted-text/

Albeit, there, it of course doesn't work either, unless edited to be exactly the following

Code: Select all

Clipboard="%Clipboard%"
Send, ^v
Kind of boggles the mind, when something so... ah, who cares
User avatar
Oblomov
Posts: 111
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Dec 24th, ’19, 14:56

Michel10 wrote:
Dec 24th, ’19, 07:55
Oblomov wrote:
Nov 2nd, ’19, 19:12
I'm trying to use "Put Text in Quotes" from Library

Code: Select all

SavedClip := ClipboardAll
Clipboard =
Send ^{vk43} ;Ctrl C
ClipWait 1
Tmp:=Clipboard
Tmp = "%Tmp%"
; Remove space introduced by WORD
StringReplace, Tmp, Tmp,%A_SPACE%",", All
Clipboard =
Sleep 20
Clipboard := Tmp
Send ^{vk56} ;Ctrl V
Sleep 100
Clipboard := SavedClip
However, it doesn't seem to work within the search box of OneNote, where the quotes makes it so that OneNote performs a more focused search, something I use very frequently:
Image

Is there perhaps some way to fix this perhaps?
HI, I think maybe I have a way for that, if you want
Sure! Would be interested in knowing

Currently using

Code: Select all

Send, "
Clipboard= %Clipboard%
Send, ^v
Send, "
Which works better than the one in my last post, although doesn't get saved in the clipboard, which can probably be fixed with a quick ^a and ^c
User avatar
Oblomov
Posts: 111
Joined: Mar 4th, ’19, 19:44

Post by Oblomov » Jan 7th, ’20, 18:40

But yeah, the aforemention command is working fine most of the time, but sometimes, it definitely triggers other macros, and royally messes up my stuff. Happens 1.5/20 times, so it's not too bad, but I use it super often, so yeah
Post Reply