Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 03, 2016, 07:56:30 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Trying to learn AHK - stuck with Click command. Any help?  (Read 2673 times)

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,623
    • View Profile
    • Donate to Member
Trying to learn AHK - stuck with Click command. Any help?
« on: June 14, 2007, 11:26:01 PM »
OK for everyone who knows how to do this or has any ideas...
I am coding an automatic computer maintenance program (see here: http://www.donationc...p?topic=8345.new#new) and I have 2 problematic programs that REQUIRE the user to click - no Tab or Alt keyboard commands work. So, I went ahead and (I am still using the Quick Start Tutorial, I don't feel comfortable on my own quite yet) looked up how to do it. OK, easy enough. I added it into the script, tried it out, and it clicked off on Windows Sidebar instead of on the button I gave the coordinates to. So I went back and used the coordinates in relevance to the active window (I am assuming its from pixel 1x1 of the window) and that did something similar. So I have currently got it set to move the mouse to 0, 0 and THEN click the coordinates (relevant to the whole screen). It STILL does not work...I am going to give it another go with the active window coordinates, but please someone tell me if I am doing something right/something wrong/another way to click.
Thanks,
-Brandon

wr975

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 369
    • View Profile
    • Donate to Member
Re: Trying to learn AHK - stuck with Click command. Any help?
« Reply #1 on: June 15, 2007, 01:29:41 AM »
Just a wild guess, but I think you didn't use CoordMode

Quote
If this command is not used, all commands except those documented otherwise (e.g. WinMove and InputBox) use coordinates that are relative to the active window.

Screen: Coordinates are relative to the desktop (entire screen).
Relative: Coordinates are relative to the active window.

CoordMode,Mouse,Screen
Click,300,350

« Last Edit: June 15, 2007, 01:34:47 AM by wr975 »

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,623
    • View Profile
    • Donate to Member
Re: Trying to learn AHK - stuck with Click command. Any help?
« Reply #2 on: June 15, 2007, 01:50:33 AM »
No, I looked at it but it was kind of confusing - too many commands for me. So I would have to put in...
CoordMode, Mouse, Screen
Click x, y

instead of my current setup, simply being...
Click 808, 771

OK, I will give that a go.

wreckedcarzz

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,623
    • View Profile
    • Donate to Member
Re: Trying to learn AHK - stuck with Click command. Any help?
« Reply #3 on: June 15, 2007, 02:07:19 AM »
Holy cow it worked! It worked! I spent like 2 hours on this ;D- thanks so much! :-* :)
-Brandon