lower and UPPER

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
zuzu_kuc
Posts: 76
Joined: 30 Mar 2016, 12:36

lower and UPPER

27 Nov 2020, 09:14

hi, i have this code:

Code: Select all

#v::
sleep,150
Clipboard:=
sleep,100
Send, ^c
ClipWait,1
sleep,100
If (Clipboard = "")
{
	MsgBox 4096, ,Ve schránce není žádný text.
	return
}


SetKeyDelay,0
chars := Clipboard
String := Format("{:U}", chars)
Clipboard = %string%
MsgBox VELKA %string%
SendRaw, %Clipboard%
#HotkeyModifierTimeout 150
return
when i try change to upper characters like ščřž. msgbx will show me ŠČŘŽ, but it will paste lowercase again :/ why?
i tried send, sendraw, sendinput, i will always get lower case, but when i manualy paste CTRL+V charasters are UPPER.
can you please help me understood this?
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: lower and UPPER

27 Nov 2020, 09:29

It worked when I tried it. The following also works.

Code: Select all

#v::
; ščřž
Clipboard =
Send ^c
ClipWait, 2
If ErrorLevel
 MsgBox, 48, Error, An error occurred while waiting for the clipboard.
Else Send % Format("{:U}", Clipboard)
Return
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: lower and UPPER

27 Nov 2020, 10:00

The script on your screen appears to differ from the one that I posted above. Try the following.

(1) Exit all running scripts.
(2) Save the one above. Run it.
(3) Highlight ščřž.
(4) Press Win+v.

Questions are below.

1. What happens?
2. Do any errors occur?
zuzu_kuc
Posts: 76
Joined: 30 Mar 2016, 12:36

Re: lower and UPPER

27 Nov 2020, 10:22

same thing, even in whole new AHK file,
https://youtu.be/KoAbNE93910

if a will add this after your code

Code: Select all

msgbox % Format("{:U}", Clipboard)
in the clipboard is the text formated as UPPER case
here:
https://ctrlv.link/3gDO
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: lower and UPPER

27 Nov 2020, 10:29

I could not view your latest video, due to the link setup on that Web site. Your video is too blurry for me to see, but if the script did not work, then sorry, I do not have an explanation.

1. Did the MsgBox work?
2. Are you using any form of clipboard manager?
3. Are you running as admin?
4. Are you running the latest version of AHK?
5. If you change the hotkey to something like F3, does it work?
zuzu_kuc
Posts: 76
Joined: 30 Mar 2016, 12:36

Re: lower and UPPER

27 Nov 2020, 10:39

text is ratačřž
msgbox will show me RATAČŘŽ
but your script will send RATAčřž
i will bypass this via CTRL+V command, that works, but i dont know what is happend to me :)

thanks for your time.
User avatar
mikeyww
Posts: 26885
Joined: 09 Sep 2014, 18:38

Re: lower and UPPER

27 Nov 2020, 10:47

OK. I see your answer to question #1 but not #2, #3, #4, or #5.

It looks like a clipboard issue of some kind. Best wishes for success.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Theda and 278 guests