AutoHotkey Community

It is currently May 26th, 2012, 11:02 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: November 2nd, 2009, 1:53 pm 
Offline

Joined: November 2nd, 2009, 1:47 pm
Posts: 19
Hello everyone,

I tried to use search and wiki too but no one exactly matches this request,
since I'm not used to AHK plus in time hurry I decided to make a new tread


Ok here my problem:

I want AHK to simply click between 3 positions in an 60s time interval.
But it needs to be based on Coordination not simply record and click.
So how do I figure out how to actually set the coords? It's kinda hard
to understand if you never used this progam lol...

The Program is internet Explorer

Thank you very much for help guys
regards


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2009, 2:41 pm 
Offline

Joined: November 2nd, 2009, 1:47 pm
Posts: 19
anyone? :cry:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2009, 2:43 pm 
Offline

Joined: October 15th, 2007, 3:10 pm
Posts: 790
Location: England
If you use the Window Spy tool that comes installed with AHK, that will tell you the position of the mouse both relative to the screen, and also relative to the window.

This should give you the co-ords you need to click


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2009, 2:45 pm 
Are you wanting to click on specific elements on a webpage?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2009, 4:55 pm 
Offline

Joined: November 2nd, 2009, 1:47 pm
Posts: 19
Yes Actually its something like this


show pages:


<1-60> <61-120> etc...


the Script should loop between the content on a 60s base.

so what Ive got so far is:


#IfWinActive Site XYZ - Windows Internet Explorer
ControlClick, x818 y931,
return
(delay??)
ControlClick, x855 y931,
return
(delay??)
(loop??)

The (??) means I dont know yet how to set this command how it should

Thanks to Ocean alleady the Spy tool is really good


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2009, 5:06 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
OceanMachine's answer is going to be the easiest to understand. However, the most effective way is going to be using COM (since you're using IE) or Javascript. For example, if your at Google.com and you navigate to the following code, you will click on the Google Search button:
Code:
javascript: document.all.btnG.click()

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 8:05 am 
Offline

Joined: November 2nd, 2009, 1:47 pm
Posts: 19
Yea cool, but how do I know the source of the buttons I need to click?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 9:43 am 
Offline

Joined: November 2nd, 2009, 1:47 pm
Posts: 19
maybe some one some time is going to help me instead of reffering to help file...


Code:
CoordMode, Mouse
loop
{
Sleep, 10000
Click x827, y955
Sleep, 10000
Click x855, y955
Sleep, 10000
}


What am I doing wrong... it doesnt work like this it simply clicks but
without the coords...


[/quote]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 2:44 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
Rizzit wrote:
Yea cool, but how do I know the source of the buttons I need to click?
Perhaps learn a little javascript. Here are some tools that could help as well (1,2)

Rizzit wrote:
What am I doing wrong... it doesnt work like this it simply clicks but
without the coords...
Are your coords based on the screen, or based on the active window? If you haven't changed them to be relative to the screen, they are relative to the active window by default.

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2009, 3:23 pm 
Offline

Joined: November 2nd, 2009, 1:47 pm
Posts: 19
Actually my fault was that i first started for screen coords, then changed
on active window and didnt see the syntax change, as those have 2
different parameters. It is very difficult to get sorted with this tool but
thanks for your advice friend it helped me to find my error.


My script is working very well now, it launches Internet explorer logs in to
the verification website, logs in automatically and swaps between sites as I want it.


Code:
#NoEnv

F4::
MsgBox, 1,, Start VideoControl (Cancel to stop)
IfMsgBox OK
    MsgBox Launching VideoControl Monitoring
    run iexplore
    Sleep, 10000
    Send, username{TAB}
    Send, password{ENTER} ; Auto Login Sequence
    Sleep, 6000
    Click 63, 240
    Sleep, 60000 ; Thumbview actualizing time

loop
{
Sleep, 60000
Click 855, 955
Sleep, 60000
Click 825, 955
}



Now I would like to implement a Stop and/or Pause function.
Also I would like to implement a function to maximize the window if its not.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], hyper_, JSLover, Kirtman, Leef_me, Miguel, XstatyK, Yahoo [Bot] and 61 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group