 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Mike
Joined: 21 Jun 2004 Posts: 2
|
Posted: Mon Jun 21, 2004 5:52 am Post subject: Help Needed for A New user Having Problems |
|
|
Hey Guys Hopefuly somebody out there can give me a little help with this problem that I am having with my first script, I'm new to the scripting thing and am just testing it out but am having trouble getting my commands to work properly. Here is what I have written:
setbatchlines, 20ms
setkeydelay, 10
setmousedelay, 10
setmousedelay, 10
Run, Notepad
winactivate, Untitled - Notepad
Send, Hello this is a test to see if this works
Mouseclick,left,701,22
I've actually tried a lot of commands and dont even know i'f i'm using them right. The wierd thing about this is that if I run the script Once it wont work properly, it gets as far as opening a notepad window and moving the mouse to nowhere even close to where it's suppose to be, None of my text will be in the window, but If I run it again without closing the notepad window it works fine. I'll have two notepad windows open and only one of them will have text in it..... Whats am I doing wrong? As my script even set up correcly?? Thanks to anybody that can help. ~[MikE]~ _________________ ~[MikE]~ |
|
| Back to top |
|
 |
beardboy
Joined: 02 Mar 2004 Posts: 444 Location: SLC, Utah
|
Posted: Mon Jun 21, 2004 2:39 pm Post subject: |
|
|
Your script might be running too fast so that when the WinActivate command ran the Notepad window doesn't exist yet. I ran your script without changing anything and had the same problem, I added a WinWait command and it worked without a problem.
| Code: | setbatchlines, 20ms
setkeydelay, 10
setmousedelay, 10
setmousedelay, 10
Run, Notepad
Winwait, Untitled - Notepad ; Wait for Notepad window to exist.
winactivate, Untitled - Notepad
Send, Hello this is a test to see if this works
Mouseclick,left,701,22 |
As far as the left click it seems to be working fine. Did you want it to be clicking to those coordinates in the Notepad window or just on the screen? Check out CoordMode if you want it to base the coordinates off of the screen.
thanks,
beardboy |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|