New to AHK. Having trouble.

Get help with using AutoHotkey and its commands and hotkeys
T14
Posts: 1
Joined: 04 Jan 2018, 12:39

New to AHK. Having trouble.

04 Jan 2018, 12:56

I just downloaded AHK after just hearing about it so I don't know much about it. I look through the forums on how to write this script but I could never get it to work.
I figured you guys could do it in 2 seconds and tell me how big of a dummy I am. Thanks


I just need this script that will automatically run at 10:00am and automatically run at 2:00pm.



F8:: ;
{
Send, {^ L}
Send, TCE
Send, {Enter}
Send, 3166
Send, {Enter}
Send, 3166
Send, {Enter}
Send, {Enter}
Send, {Enter}
Send, {Enter}
Return
}
User avatar
noname
Posts: 509
Joined: 19 Nov 2013, 09:15

Re: New to AHK. Having trouble.

04 Jan 2018, 15:21

You can use AHK for the timing but i would use windows scheduler to start the script at the required time.You can leave out the hotkey so it runs once when Started.
Be aware that it sends to the active window whatever that is!! You can use ControlSend to be able to send it an unique window active or not.

If you still prefer the timing be done by ahk just post again :) ( or look here https://autohotkey.com/board/topic/5628 ... ed-script/ )

Code: Select all

Send, {^ L}
Send, TCE
Send, {Enter}
Send, 3166
Send, {Enter}
Send, 3166
Send, {Enter}
Send, {Enter}
Send, {Enter}
Send, {Enter}
soundcloud.com/user-32706894
User avatar
Exaskryz
Posts: 2876
Joined: 17 Oct 2015, 20:28

Re: New to AHK. Having trouble.

04 Jan 2018, 15:27

Send, {^ L} will result in problems, I'm pretty sure. You don't want that. You want instead Send, ^l most likely. (Or if you prefer, Send, ^{l}. The brackets are optional on single-character names like the alphabet or numbers, but necessary on longer-named keys like {F1}, {Enter}, or {Numpad7}. You also probably don't want the capital L because that requires Shift to produce it, so ^L is really Ctrl+Shift+L. I personally prefer to be clear about when I want to use Shift in a send command by using the + modifier: Send ^+l would produce Ctrl+Shift+L too.

Additionally, you can use Send, {Enter 4} at the end to repeat the 4 consecutive Enter keystrokes.

Finally, the { } you use to wrap around all the Send commands and the return are not necessary. You use Blocks like that for commands like If or Loop. It does not hurt to have them though.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], dadidoo, Google [Bot], Kezraw, teadrinker, tmplinshi and 207 guests