Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Having trouble with a simple mouse click loop


  • Please log in to reply
3 replies to this topic
Aaron
  • Guests
  • Last active:
  • Joined: --
Great program!

I'm just having trouble getting it to do a simple task.

I have a window up, and I just want it to click a button... wait about 10 seconds, and click another button wait 10 seconds, and start over.

But when I run the script, it seems to just ignore the sleep commands, zips through the clicks, and ends (it doesnt loop).

Here is my script:

Loop, 100
{
MouseClick, left, 982, 410;
Sleep, 10000;
MouseClick, left, 269, 477;
Sleep, 10000;
}

Any ideas?

Thanks!

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
I tried it on XP and 98 and it seems to work okay. This is without the semicolons, since those generate syntax errors when the script launches. You might try opening the script's main window by double clicking its tray icon. It will display the lines that the script has most recently executed, which might help in figuring it out.

Aaron
  • Guests
  • Last active:
  • Joined: --
Thanks for the reply...

I haven't been able to do anything else because when I run the program it autoexecutes the script and stops, I don't get a tray icon to click on to reload the script or do anything else.

I even renamed the .ini file with the script but it still runs it. How do I get it back to where I can change the script or reload it? Or get it to put a taskbar icon?

Thanks!

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
If you rename your script to be test.ahk (or anything else that ends in .ahk), you should then be able to double-click the .ahk file to launch it. This is because .ahk files are associated with the program.

You should get a tray icon unless your script finishes too quickly for it too be noticeable. Perhaps Windows XP is hiding the icon? If so, you might be able to reveal it by clicking the two little left arrows in the tray.