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

Discussion, questions and support.
Post Reply
User avatar
Oblomov
Posts: 38
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: 318
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: 38
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: 318
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: 38
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: 38
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
Post Reply