Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

how to click in cntr of image the moment it is loaded



  • Please log in to reply
22 replies to this topic
smorgasboard
  • Members
  • 660 posts
  • Last active: Jan 14 2016 08:53 AM
  • Joined: 18 Jul 2012
after clicking( right or left)
how execute a set of commands

smorgasboard
  • Members
  • 660 posts
  • Last active: Jan 14 2016 08:53 AM
  • Joined: 18 Jul 2012
purpose....to automatically start internet connection...the moment data card is insreted

Guest
  • Guests
  • Last active:
  • Joined: --
Either use a gLabel or OnMessage - but a gLabel is simply easier.
Gui, add, picture, gTest, Path
return

Test:
; Commands

This should work or method 2:

OnMessage(MsgNumber [, "FunctionName", MaxThreads])
WM_LBUTTONDOWN = 0x201

OnMessage(0x201,"WM_LBUTTONDOWN")
Gui, add, picture, gTest, Path
return

WM_LBUTTONDOWN(wParam, lParam):
MouseGetPos,,,,Control ; get control
If (Control = pictureControl) ; replace pictureControl with the control of the picture (use winSpy if u dont it).
{
commands
}


smorgasboard
  • Members
  • 660 posts
  • Last active: Jan 14 2016 08:53 AM
  • Joined: 18 Jul 2012
dear guest as i m extremely new ...please explain ....i have used pulover's macro creator to take the screen shot and i know it's location....please ...

Pulover
  • Members
  • 1596 posts
  • Last active: Apr 06 2016 04:00 AM
  • Joined: 20 Apr 2012
Hi, smorgasboard.
Your question is very unclear but it seems exactly the same as the one I answered before. You can use the same script with a different file, no?

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer) | Class_LV_Rows - Copy, Cut, Paste and Drag ListViews | Class_Toolbar - Create and modify | Class_Rebar - Adjustable GUI controls

Join the New AutoHotkey Forum!


smorgasboard
  • Members
  • 660 posts
  • Last active: Jan 14 2016 08:53 AM
  • Joined: 18 Jul 2012
yes sir it is almost similar .....sometimes the tab key doesn't reach the icons ....so if
in your answers...we could send the cursor to the center of the image the moment it appears !!
it would be awesome...and almost everything on the comp can be automated...i hopt u got the possibilities of this thing
thanks in advance...

Pulover
  • Members
  • 1596 posts
  • Last active: Apr 06 2016 04:00 AM
  • Joined: 20 Apr 2012
Use the variables FoundX and FoundY from the ImageSearch.
Click, %FoundX%, %FoundY%
And please, read the manual.

Edit: Allow me to fix that last line -- Please, check the help file if you have any doubts on that, and feel free to ask here in the forum if you still can't understand it.

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer) | Class_LV_Rows - Copy, Cut, Paste and Drag ListViews | Class_Toolbar - Create and modify | Class_Rebar - Adjustable GUI controls

Join the New AutoHotkey Forum!


smorgasboard
  • Members
  • 660 posts
  • Last active: Jan 14 2016 08:53 AM
  • Joined: 18 Jul 2012
thanks sir...i m trying...hopefully one day i shall become intelligent enough

LarryC
  • Guests
  • Last active:
  • Joined: --
note for Pulover
He probably did read the manual. The manual is a very exacting piece of work. that a noobie needs a manual to understand. It lis written to be technically very accurate, as it should.
Telling a noobie to read the manual is a complete waste of time, humiliting, sending a message that he is stupid. Should be banned, allowed on all forums EXCEPT for support.
After a while and with a lot of mistakes, experimenting, then the words in the manual starts to make sense, but not in the beginning. SO a noobie relies on Support.
What a complete and total waste to time to say "read the manual".
Perhaps if there was a manual titled "AHK for dummies" then perhaps.

Pulover
  • Members
  • 1596 posts
  • Last active: Apr 06 2016 04:00 AM
  • Joined: 20 Apr 2012

note for Pulover
He probably did read the manual. The manual is a very exacting piece of work. that a noobie needs a manual to understand. It lis written to be technically very accurate, as it should.
Telling a noobie to read the manual is a complete waste of time, humiliting, sending a message that he is stupid. Should be banned, allowed on all forums EXCEPT for support.
After a while and with a lot of mistakes, experimenting, then the words in the manual starts to make sense, but not in the beginning. SO a noobie relies on Support.
What a complete and total waste to time to say "read the manual".
Perhaps if there was a manual titled "AHK for dummies" then perhaps.

I do agree with your words, LarryC, and let me appologize to smorgasboard as I didn't mean to offend him. What I meant to say is that he can get many examples from there to understand better what we post to help him. I try my best to help people here with their scripts but learning the basics should be more like a researching and the help file is essencial, for I too spent many hours reading it and many points took me some time to understand as you said.
As you can see in this post from him <!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?t=88945">viewtopic.php?t=88945</a><!-- l --> I did quite an effort to help him with this subject already and what I really want him to do is try things on his own.

I always try to be polite the best I can (and I do not hide as guest so I can say whatever I want without regards as do some others here), but again I feel sorry for those words as I understand they may be misunderstood and somehow offending.
Thanks LarryC, I shall not say such words again.

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer) | Class_LV_Rows - Copy, Cut, Paste and Drag ListViews | Class_Toolbar - Create and modify | Class_Rebar - Adjustable GUI controls

Join the New AutoHotkey Forum!


smorgasboard
  • Members
  • 660 posts
  • Last active: Jan 14 2016 08:53 AM
  • Joined: 18 Jul 2012
the fastest reply i got here,...thanks...pulover...btw...how to....^^^^

LarryC
  • Guests
  • Last active:
  • Joined: --
Oh gosh, now I feel just terrible, your reply, I was not expecting.
Sincere apologizes, you are a fine person, I am the dude.

smorgasboard
  • Members
  • 660 posts
  • Last active: Jan 14 2016 08:53 AM
  • Joined: 18 Jul 2012
in between i have created a macro for directly opening the autohotkey help file
as i have to open and open it again ...needs a lot of improvement though

jst click the icon created....


run C:\Program Files\AutoHotkey
Sleep, 500 ; .5 second
send {tab 7}{down 2}{enter}

Pulover
  • Members
  • 1596 posts
  • Last active: Apr 06 2016 04:00 AM
  • Joined: 20 Apr 2012
@LarryC It's alright, man. You had a point after all... We all come here to learn and everyone should be respected. :)

@smorgasboard Good going, but you can open the file directly: run, C:\Program Files\AutoHotkey\AutoHotkey.chm

Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer) | Class_LV_Rows - Copy, Cut, Paste and Drag ListViews | Class_Toolbar - Create and modify | Class_Rebar - Adjustable GUI controls

Join the New AutoHotkey Forum!


smorgasboard
  • Members
  • 660 posts
  • Last active: Jan 14 2016 08:53 AM
  • Joined: 18 Jul 2012
awesome ...btw hot did u come to know the "\AutoHotkey.chm" part