"@" per controlsend Topic is solved

Stelle Fragen zur Programmierung mit Autohotkey

Moderator: jNizM

wadehadedudeda
Posts: 6
Joined: 16 Aug 2017, 07:33

"@" per controlsend

21 Jan 2018, 09:01

hey, ich versuche ein @ per controlsend an ein fenster zu schicken, es kommtmeisstens nur ein q an und nie ein @.

bisher versucht habe ich:

Code: Select all

ControlSend ,ahk_parent , {RAlt DOWN}, ahk_id %window01%
sleep 10
ControlSend ,ahk_parent , {q}, ahk_id %window01%
sleep 10
ControlSend ,ahk_parent , {RALT UP}, ahk_id %window01%
;--------------------------------------------------------------------------------
ControlSend ,ahk_parent , {@}, ahk_id %window01%
;--------------------------------------------------------------------------------
ControlSend ,ahk_parent , @, ahk_id %window01%
;--------------------------------------------------------------------------------
ControlSend ,ahk_parent , <^>!q, ahk_id %window01% 	;hier wird ">>q" gesendet
;--------------------------------------------------------------------------------
ControlSend ,ahk_parent , `@ ahk_id %window01%		;hier wird nichts gesendet 
für alle anderen zeichen finde ich escape sequenzen oder platzhalte, nur für at nicht. ist es denn nicht möglich einfach ein @ zu senden?!

[@ zu "@" in der titelzeile geändert, da ansonsten die forum software den titel in der foren-übersicht nicht anzeigt] : BoBo
User avatar
Gerdi
Posts: 185
Joined: 03 Aug 2015, 18:48
Location: Germany
Contact:

21 Jan 2018, 09:49

probier mal

Code: Select all

{Control Down}{Alt Down}q{Alt Up}{Control Up}
(nur für deutsche Tastaturen!)
Last edited by Gerdi on 21 Jan 2018, 13:49, edited 1 time in total.
Win 10 Home (x64) and Win 11 Pro N
https://github.com/Grrdi/ZackZackOrdner/archive/master.zip --> get folders on the quick
User avatar
divanebaba
Posts: 805
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: "@" per controlsend  Topic is solved

21 Jan 2018, 11:36

{U+0040} funktioniert mit dem Send-Befehl. Vielleicht auch mit ControlSend.
Einfach nur ein toller Typ. :mrgreen:
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: "@" per controlsend

21 Jan 2018, 14:36

Probieren Sie dieses Skript aus oder versuchen Sie Send {Text} in AutoHotkey v1.1.27+. Prost.
[Try this script, or try Send {Text} in AutoHotkey v1.1.27+. Cheers.]

Code: Select all

q:: ;send character to active window/control
WinGet, hWnd, ID, A
ControlGetFocus, vCtlClassNN, % "ahk_id " hWnd
ControlGet, hCtl, Hwnd,, % vCtlClassNN, % "ahk_id " hWnd
if hCtl
	hWnd := hCtl
PostMessage, 0x102, % Ord("@"), 1,, % "ahk_id " hWnd ;WM_CHAR := 0x102
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
wadehadedudeda
Posts: 6
Joined: 16 Aug 2017, 07:33

Re: "@" per controlsend

22 Jan 2018, 07:09

vielen dank an euch alle.

Code: Select all

ControlSend ,ahk_parent , {U+0040}, ahk_id %window01%
and

Code: Select all

q:: ;send character to active window/control
WinGet, hWnd, ID, A
ControlGetFocus, vCtlClassNN, % "ahk_id " hWnd
ControlGet, hCtl, Hwnd,, % vCtlClassNN, % "ahk_id " hWnd
if hCtl
	hWnd := hCtl
pause	;added pause so i have time to tab into another window
PostMessage, 0x102, % Ord("@"), 1,, % "ahk_id " hWnd ;WM_CHAR := 0x102
return

pause::pause
haben funktioniert. werde der einfachheit halber das este nehmen, aber das post message muss ich mir bei gelegenheit auch mal genauer anschauen. damit scheint so ziemlich alles möglich zu sein?!

Return to “Ich brauche Hilfe”

Who is online

Users browsing this forum: No registered users and 48 guests