help with controlclick
#1
Posted 16 April 2012 - 08:12 PM
i've been trying to do control click, n it works... Problem is, it only works for some spot, not all... Tried to check my script at paint too... Was not able to click some spots, dont know why.... Any help please? It worked at other places
#2
Posted 16 April 2012 - 08:18 PM
#3
Posted 16 April 2012 - 09:33 PM
controlclick, X430 Y630, app controlclick, X565 Y635, app controlclick, X570 Y545, app sleep, 5000 controlclick, X230 Y140, app
Code isnt the final one... jst the blueprint one.... i know final one will be much shorter....
This is jst a part of series m gonna click....
EDIT:: that last control click... x230 y140 is the one aint working.. rest are working good....
#4
Posted 16 April 2012 - 10:46 PM
What is spacial about the 'last' location.
Actually, tell us what you are doing with each click.
Depending on the program, AHK can do a better job than just clicking 'random' locations.
Have you heard about and tried to use "Window Spy" on the program?
#5
Roninz
Posted 17 April 2012 - 10:23 AM
1. Clicks on an icon leading to space station
2. Clicks on military menu
3. Clicks on refill option
sleeps for some seconds to refresh the weapons list
4. Refills ammo..
5. Confirms refills..
Havent used 5th one yet, 4th, n 5th are only having problems.. So i tried changing the sequence, then controlclicked on paint.. Same as before, only these 2 coords cant be clicked.. All other clicks are being made.. App is a sort of a bot..
#6
Posted 17 April 2012 - 04:22 PM
#7
Posted 18 April 2012 - 07:31 AM
#8
Posted 18 April 2012 - 01:03 PM
Other controlclicks worked and this is not.
Have tou tried to controlclick the last position first?
So we will ensure the problem may be the coords.
controlclick, X230 Y140, app
Does it click?
#9
Posted 18 April 2012 - 01:28 PM
ControlClick is better if you want to use the name of a Ctrl.
But if you use Coord what's the point ???
#10
Posted 18 April 2012 - 06:09 PM
And ya, i tried changing sequences n stuffs, doesnt work either. I even tried this on paint. no results here too..
#11
Posted 18 April 2012 - 06:57 PM
Errorlevel does not retrieve 1?
I read something that could help, in the info of controlclick..
Controlclick structure:
ControlClick [, Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText]
You say it's a flash application. In the coords X230 Y140 there is no control?
I image there is not (if so, you can just controlclick that control).
Ok, now, the interesting thing comes in the "Option" option of Controclick Structure..
Xn: Specify for n the X position to click at, relative to the control's upper left corner. If unspecified, the click will occur at the horizontal-center of the control.
Yn: Specify for n the Y position to click at, relative to the control's upper left corner. If unspecified, the click will occur at the vertical-center of the control.
This means that, if there is a control near, you can get the coords of that control, and try to add Xn and Yn positions untill you reach the X230 Y140. Do you understand?
You make the controlclick structure as if you were clicking another control. Then you start "moving" the coords with the Xn Yn option, untill you reach the X230 Y140.
I know this sounds stupid.. but it's still an option
#12
0x150
Posted 18 April 2012 - 07:06 PM
my app displays flash content
controlclick, X430 Y630, appMake sure your Click Coordinates are relative to the window and not screen coordinates ( a common mistake when clicking con coords ).
You may have to do subtractive math to determine the actual relative coords.. just sayin'
#13
Posted 18 April 2012 - 09:04 PM
Weird.
Errorlevel does not retrieve 1?
I read something that could help, in the info of controlclick..
Controlclick structure:ControlClick [, Control-or-Pos, WinTitle, WinText, WhichButton, ClickCount, Options, ExcludeTitle, ExcludeText]
You say it's a flash application. In the coords X230 Y140 there is no control?
I image there is not (if so, you can just controlclick that control).
Ok, now, the interesting thing comes in the "Option" option of Controclick Structure..
Xn: Specify for n the X position to click at, relative to the control's upper left corner. If unspecified, the click will occur at the horizontal-center of the control.
Yn: Specify for n the Y position to click at, relative to the control's upper left corner. If unspecified, the click will occur at the vertical-center of the control.
This means that, if there is a control near, you can get the coords of that control, and try to add Xn and Yn positions untill you reach the X230 Y140. Do you understand?
You make the controlclick structure as if you were clicking another control. Then you start "moving" the coords with the Xn Yn option, untill you reach the X230 Y140.
I know this sounds stupid.. but it's still an option
Ya, dats a flash application, literally full of buttons. But those are inbuilt in flash, so cant get their IDs with windows spy. I tried using your code in paint, but seems like it clicks just over itself, not with any displacement.
EDIT: i did some experiments, n i guess i cant seem to click above the half the height of my app... Thats just a guess that it is half. Maybe more or less. But lets say its half. I can click below the half, not above. Make any sense?
my app displays flash content
controlclick, X430 Y630, appMake sure your Click Coordinates are relative to the window and not screen coordinates ( a common mistake when clicking con coords ).
You may have to do subtractive math to determine the actual relative coords.. just sayin'
And ya, its relative i got those coords from window spy's active window coords part
Another EDIT: I made browser embedded GUI, just to make sure if there was any problem with my app. I am facing same problem in that browser embedded GUI too.
#14
Posted 19 April 2012 - 07:15 AM
#15
Posted 19 April 2012 - 10:53 AM
MouseMove, 430, 630 sleep 100 tooltip click sleep 1000 tooltip MouseMove, 230, 140 sleep 100 tooltip click sleep 1000 tooltip




