SendInput function

Get help with using AutoHotkey and its commands and hotkeys
Zurydix
Posts: 4
Joined: 12 Jul 2017, 06:15

SendInput function

15 Jul 2017, 07:53

Hello,

I'm new with AHK and I have a problem that I'm sure its stupid to solve but I didn't found how to :(

So I want to be able to use a macro if the checkbox is checked, this is working, but I added an Hotkey function who edit the macro.
Here,

Code: [Select all] [Download] GeSHi © Codebox Plus

SendInput {m[1] "{" m[2] "} Down}
{m[1] "{" m[2] "} should be changed by the hotkey but it doesn't, when I use it, it just send Down Up Down Up......

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Thanks if you can help :)
Zurydix
Posts: 4
Joined: 12 Jul 2017, 06:15

Re: SendInput function

19 Jul 2017, 16:37

up :roll:
User avatar
jeeswg
Posts: 1496
Joined: 19 Dec 2016, 01:58
Location: UK

Re: SendInput function

19 Jul 2017, 16:48

Check your SendInput lines, they should look something like this:

Code: [Select all] [Download] GeSHi © Codebox Plus

q::
m := ["a","b"]
SendInput, % "{" m[1] "}{" m[2] "}"
ToolTip, % "{" m[1] "}{" m[2] "}"
;MsgBox, % "{" m[1] "}{" m[2] "}"
return

Note: I've added some ToolTip/MsgBox lines that will allow you to check what the string you are going to use with SendInput, actually looks like.
Guest

Re: SendInput function

Yesterday, 16:42

Thanks for reply,

I changed to this :

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Now the hotkey is working, but I want to set it down, or up and I don't find how to, I'm sure it's easy :facepalm:

When I use it I have something like

Code: [Select all] [Download] GeSHi © Codebox Plus

 2 Down 2 Up 2 Down 2 Up 2 Down 2 Up (2 is example)


Thanks :wave:
User avatar
jeeswg
Posts: 1496
Joined: 19 Dec 2016, 01:58
Location: UK

Re: SendInput function

Yesterday, 19:48

I'm not actually 100% clear what you want to do. A problem is that you seem to have too many closing curly braces. It is quite hard to look at, the text with the object references inside, so what I tend to do is start with some literal text and convert it.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Cinemaster, Google [Bot], iceivanov, Masonjar13, rexey and 35 guests