send @ to cmd window Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
armin889
Posts: 96
Joined: 02 Nov 2021, 15:11

send @ to cmd window

Post by armin889 » 06 Jan 2023, 01:57

Hi ahk community
I want to send @-symbol to cmd window but i always get "-symbol

Code: Select all

Gui, Add, Button, x13 y46 w129 h29 gcmd, CMD

Gui, Add, Edit, x13 y6 w289 h29 vval, test@test.com
; Generated using SmartGUI Creator for SciTE
Gui, Show, w316 h168, Untitled GUI
return

GuiClose:
ExitApp

cmd:
gui,submit,nohide
run cmd
Sleep, 1000
send, %val%
sendraw %val%
return
anyone knows how to fix?

Rohwedder
Posts: 7774
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: send @ to cmd window  Topic is solved

Post by Rohwedder » 06 Jan 2023, 02:10

Hallo,
try:

Code: Select all

Gui, Add, Button, x13 y46 w129 h29 gcmd, CMD

Gui, Add, Edit, x13 y6 w289 h29 vval, test@test.com
; Generated using SmartGUI Creator for SciTE
Gui, Show, w316 h168, Untitled GUI
return

GuiClose:
ExitApp

cmd:
gui,submit,nohide
run cmd
Sleep, 1000
send, {Text}%val%
; sendraw %val%
return

armin889
Posts: 96
Joined: 02 Nov 2021, 15:11

Re: send @ to cmd window

Post by armin889 » 06 Jan 2023, 02:17

thx so much :bravo:

garry
Posts: 3795
Joined: 22 Dec 2013, 12:50

Re: send @ to cmd window

Post by garry » 06 Jan 2023, 10:55

also an example , send2dos ( active folder )

Code: Select all

;- DOScommandhere / active folder
#Warn
setworkingdir,%a_scriptdir%
$F9::
dirx:=""
gosub,a1
e4x=
(Ltrim join&
@echo off
echo date=
date /t
echo time=
time /t
)		
;Run, %COMSPEC% /T:0E /k "title  %dirx% & mode con cols=140&%e4x%",%dirx%
Run, %COMSPEC% /T:70 /k "title  %dirx% & mode con cols=140&%e4x%",%dirx%   ;- see opened active folder in title
Winwait,ahk_class ConsoleWindowClass
WinMove,ahk_class ConsoleWindowClass,, 0,0
sleep,400
controlsend,ahk_parent,{text}ver`n,ahk_class ConsoleWindowClass
controlsend,ahk_parent,{text}dir`n,ahk_class ConsoleWindowClass
return

a1:
;- tmplinshi / DOScommandhere WIN11 https://www.autohotkey.com/boards/viewtopic.php?p=33858#p33858
If WinActive("ahk_class CabinetWClass") || WinActive("ahk_class ExploreWClass") 
dirx:=""
        WinHWND := WinActive()
        For win in ComObjCreate("Shell.Application").Windows
            If (win.HWND = WinHWND) 
			{
                dirx := SubStr(win.LocationURL, 9) ; remove "file:///"
                dirx := RegExReplace(dirx, "%20", " ")
                Break
            }
if dirx=
   dirx:=a_desktop
return
;==================================================================================

Post Reply

Return to “Ask for Help (v1)”