Hey there, this is my first post on the site!
So, uh, I am brand new to the program and all I need from it right now is to move my mouse somewhere, click, and then press enter. I wanted to start with Enter just because I figured it would be easier, but it just won't work. Here is my code:
^q::
send, {Enter}
return
Nothing happens when I run that, and I can't find an answer anywhere. It's suuuper annoying. Oh yeah, if you happen to how to do the move mouse clicky thing that would also be helpful. Thank you!
Send Enter doesn't work. Topic is solved
Send Enter doesn't work.
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Re: Send Enter doesn't work.
https://autohotkey.com/docs/commands/SendMode.htm
https://autohotkey.com/docs/commands/Send.htm
https://autohotkey.com/docs/commands/MouseMove.htm
https://autohotkey.com/docs/commands/MouseClick.htm
There are plenty of examples in each page.
https://autohotkey.com/docs/commands/Send.htm
https://autohotkey.com/docs/commands/MouseMove.htm
https://autohotkey.com/docs/commands/MouseClick.htm
There are plenty of examples in each page.
live ? long & prosper : regards
Re: Send Enter doesn't work.
Not sure if it's a syntax problem, but this should definitely work:
Try it in Notepad first.
What is your target application anyway?
And is this really the whole script?
Regards
Code: Select all
^q:: ; Ctrl+Q
Send {Enter}
return
What is your target application anyway?
And is this really the whole script?
Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: Send Enter doesn't work.
My target application is Chrome, I've been running it in Notepad to test, and that did not work.Scr1pter wrote: ↑20 Oct 2018, 06:20Not sure if it's a syntax problem, but this should definitely work:Try it in Notepad first.Code: Select all
^q:: ; Ctrl+Q Send {Enter} return
What is your target application anyway?
And is this really the whole script?
Regards
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Re: Send Enter doesn't work.
I managed to get it working, now I just need it to move my mouse!Scr1pter wrote: ↑20 Oct 2018, 06:20Not sure if it's a syntax problem, but this should definitely work:Try it in Notepad first.Code: Select all
^q:: ; Ctrl+Q Send {Enter} return
What is your target application anyway?
And is this really the whole script?
Regards
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Re: Send Enter doesn't work.
What was the reason
For moving mouse you have to work with:
MouseMove, 100, 300, 0
Replace 100 and 300 with your target pixels.
The 0 means speed (0 = highest speed).
After moving the mouse, you can make:
Send {lbutton}
If you want to save some code lines, you can replace MouseMove and Send {lbutton} by:
Click, 100, 300
Regards
For moving mouse you have to work with:
MouseMove, 100, 300, 0
Replace 100 and 300 with your target pixels.
The 0 means speed (0 = highest speed).
After moving the mouse, you can make:
Send {lbutton}
If you want to save some code lines, you can replace MouseMove and Send {lbutton} by:
Click, 100, 300
Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: Send Enter doesn't work.
Thanks! How do I figure out what pixel number thingies I want it to go to though?Scr1pter wrote: ↑24 Oct 2018, 05:54What was the reason
For moving mouse you have to work with:
MouseMove, 100, 300, 0
Replace 100 and 300 with your target pixels.
The 0 means speed (0 = highest speed).
After moving the mouse, you can make:
Send {lbutton}
If you want to save some code lines, you can replace MouseMove and Send {lbutton} by:
Click, 100, 300
Regards
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Re: Send Enter doesn't work.
Update: Holy heck, Microsoft Paint was just used as an actual tool! Someone call Guinness World Records! I used the little tool that shows what pixel you're mousing over in paint. So that was amazing. All I need to do now is learn how to make a little delay between stuff. So, for example, I could make the mouse move over, *then wait a specified amount of time*, then left click. I also need to learn how to make my script repeat itself over and over again until it's stopped by me or something. You're the best, dude. Thanks.Scr1pter wrote: ↑24 Oct 2018, 05:54What was the reason
For moving mouse you have to work with:
MouseMove, 100, 300, 0
Replace 100 and 300 with your target pixels.
The 0 means speed (0 = highest speed).
After moving the mouse, you can make:
Send {lbutton}
If you want to save some code lines, you can replace MouseMove and Send {lbutton} by:
Click, 100, 300
Regards
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Re: Send Enter doesn't work.
Update II: I figured out the wait delay sleep thingie, now I just need to know how to loop it 'til I stop it or something.Scr1pter wrote: ↑24 Oct 2018, 05:54What was the reason
For moving mouse you have to work with:
MouseMove, 100, 300, 0
Replace 100 and 300 with your target pixels.
The 0 means speed (0 = highest speed).
After moving the mouse, you can make:
Send {lbutton}
If you want to save some code lines, you can replace MouseMove and Send {lbutton} by:
Click, 100, 300
Regards
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Re: Send Enter doesn't work.
Paint???
Use MouseGetPos
https://autohotkey.com/docs/commands/MouseGetPos.htm
Check the 1st example script.
Regarding the loop:
I will check it tomorrow - too late now.
Good night
Use MouseGetPos
https://autohotkey.com/docs/commands/MouseGetPos.htm
Check the 1st example script.
Regarding the loop:
I will check it tomorrow - too late now.
Good night
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: Send Enter doesn't work.
Night night I guess. I'll let you know if I figure it out in the meantime. I might, this is so much fun to do.Scr1pter wrote: ↑24 Oct 2018, 18:33Paint???
Use MouseGetPos
https://autohotkey.com/docs/commands/MouseGetPos.htm
Check the 1st example script.
Regarding the loop:
I will check it tomorrow - too late now.
Good night
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Re: Send Enter doesn't work. Topic is solved
Hi,
For a Loop you can use such a technique:
In this case, a and b get spammed while holding q.
When releasing q, it stops.
Replace the block within the while loop with your code and test it.
Regards
For a Loop you can use such a technique:
Code: Select all
q::
while GetKeyState("q")
{
Send a
Sleep, 5
Send d
Sleep, 5
}
return
When releasing q, it stops.
Replace the block within the while loop with your code and test it.
Regards
Please use [code][/code] when posting code!
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Keyboard: Logitech G PRO - Mouse: Logitech G502 LS - OS: Windows 10 Pro 64 Bit - AHK version: 1.1.33.09
Re: Send Enter doesn't work.
I'm sorry for the late response, but, honestly man.... you're awesome. You helped me get started on some AHK stuff that I would have never figured out without you and stuff. I've had an amazing experience, I've programmed a few more cool things with the knowledge you've passed down to me, and I sincerely thank you. I'm sure I'll contact this forum many, many more times, and I want you to know that you're just really cool. I just kind of thought of the help you gave me and thought I owed you a thank you.Scr1pter wrote: ↑25 Oct 2018, 07:01Hi,
For a Loop you can use such a technique:In this case, a and b get spammed while holding q.Code: Select all
q:: while GetKeyState("q") { Send a Sleep, 5 Send d Sleep, 5 } return
When releasing q, it stops.
Replace the block within the while loop with your code and test it.
Regards
I'm pretty new to this language and barely know what I'm doing. Please excuse any stupidity lol.
Oh also try and explain stuff well if I need it
Oh also try and explain stuff well if I need it
Who is online
Users browsing this forum: Chunjee, Google [Bot] and 240 guests