Jump to content

Send("{ASC - not working ?


Recommended Posts

hello all,

tried a very basic script, but seems I cant even send a simple ASCII character, when I push the hotkey, nothing hapens

notice I tried the very example from here: http://www.autoitscript.com/autoit3/docs/functions/Send.htm - Send("{ASC 065}")

any sugestion please?

thanks

AutoIt version: 3.2.10.0

OS: Win XP SP2

this is the script:

HotKeySet("!^y", "MyFunc")

While 1

Sleep(100)

WEnd

Func MyFunc()

Send("{ASC 065}")

Send("{ASC 066}")

Send("{ASC 65}")

Send("{ASC 66}")

EndFunc

Link to comment
Share on other sites

well, Send("{ASC - it works, thanks

the problem is with the Control key. I can assign hotkeys that include Alt, Shift and Windows key, but not with Control key

so

HotKeySet("!y", "MyFunc") - works

HotKeySet("+y", "MyFunc") - works

HotKeySet("#y", "MyFunc") - works

HotKeySet("^y", "MyFunc") - doesnt work !

any idea why?

Link to comment
Share on other sites

HotKeySet("^y", "Terminate") works for me

got latest beta?

I just edited the example:

Does it work for you?

CODE
; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("^y", "Terminate")

HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

;;;; Body of program would go here ;;;;

While 1

Sleep(100)

WEnd

;;;;;;;;

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Func ShowMessage()

MsgBox(4096,"","This is a message.")

EndFunc

Edited by Kademlia
Link to comment
Share on other sites

Thanks, it works

however, the weird thing is, when I replace "Exit 0" with "Send("{ASC 0066}")", it doesnt work!

or

HotKeySet("^y", "Terminate")

Func Terminate()

Send("{ASC 0066}")

EndFunc

but....

HotKeySet("!y", "Terminate") - works

I just installed beta - 3.2.11.0, and its the same thing

@whim: I checked that, also tried with another keys (^j, ^k etc) - its the same

I am sorry for this, its either a very weird thing here or.... maybe i'm veeery wrong somewhere

Link to comment
Share on other sites

  • 14 years later...

Can confirm the bug that Send("{ASC XXXX}") does not work with hotkeys (I'm using "^!v" (Ctrl + Alt + v)) for the first character in the function.

I can do Send("a" & "{ASC XXXX}") and the ASC will print! But not if the ASC is at the beginning of Send function.

I use the workaround of Kademlia now, avoid ASC and use Chr function to input ASCII characters.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...