Tailor Made Tools/Programs for You - AHK

01/20/2009 21:08 Pr3shure#136
@Alexisppp12345
I think I can answer your question if I understood it right.
If you are trying to make it so your program sends clicks to the screen rather than the active window you would have to throw in this:
Code:
CoordMode, Mouse, Screen
If you wanted to do the same with pixelsearch or imagesearch you would also need to add this line:
Code:
CoordMode, Pixel, Screen
[Only registered and activated users can see links. Click Here To Register...] is the AHK website's explanation on it.
Enjoy, hope that helps.
01/20/2009 21:25 Alexisppp12345#137
@Pr3shure
Thank you very very much!

@All(including Evan)
Is there any way to make the program clicks(or anything else(pixel/image search) at x,y if CO is active window else maximize CO window?
01/21/2009 06:59 Pr3shure#138
@Alexisppp12345 This should activate the conquer window and click at 315,115 locaiton on your screen.
Code:
CoordMode, Mouse, Screen
IfWinExist, [Conquer2.0]
    WinActivate 
else
    return
{Click 315, 115}
01/21/2009 09:28 Evan Lim#139
Alexisppp12345@
similar to above, but 'will not click' if CO is not active
Code:
IfWinNotActive,[Conquer2.0]
{
WinActivate,[Conquer2.0]
}
else
{
click %x%, %y%
}
01/21/2009 10:44 Pr3shure#140
hey Evan Lim, you seem to know a lot about AHK, think you can help me out with a little prob =) the post is [Only registered and activated users can see links. Click Here To Register...]
01/21/2009 12:40 Hiyoal#141
Quote:
Originally Posted by Evan Lim View Post
Alexisppp12345@
similar to above, but 'will not click' if CO is not active
Code:
IfWinNotActive,[Conquer2.0]
{
WinActivate,[Conquer2.0]
}
else
{
click %x%, %y%
}
Does the title [Conquer2.0] work for AHK?!

Ive tried it in AutoIt with constant results of 0 but when I change it to [Conquer2.0 or something without the ending "]" it works fine and gives me a return value from any functions using "Title".

Strange...

Hiyoal
01/21/2009 15:10 Alexisppp12345#142
Hiyoal@
Yes the title [Conquer2.0] works for AHK.

Evan Lim(or anyone who knows)@
I tried to make the programs work with the coordinates of screen(see post [Only registered and activated users can see links. Click Here To Register...]) and not with the coordinates of the Active Window.

CoordMode, Pixel, Screen works but CoordMode, Mouse, Screen does not work. It does not click at all... Look a little bit at the code and please tell me what I wrote wrong.

Code:
loop
{
CoordMode, Mouse, Screen Click 310, 1008; Open 1st program at bar
Sleep, 5000 ; Wait 5 second
}
and... another thing because I am not completely sure if I write it good.

Code:
f=0
h=1

loop, %h%
{

CoordMode, Mouse, Screen Click 267, 542;Clicks
Sleep, 1000 ; Wait 1 second
CoordMode, Mouse, Screen Click 414, 224;Clicks
Sleep, 1200 ; Wait 1.2 seconds
CoordMode, Pixel, Screen ImageSearch, FoundX, FoundY, 953 ,140, 994, 181, *5 C:\ore1.bmp;Looks at inventory.
if ErrorLevel = 0
f+=1

}
f=0
MsgBox, Bravo! You are out of the loop and the programs continues!
The above code clicks 2 times and then checks to find an image and If it finds the image it "jumps" out of the loop and says the message Else it clicks again 2 times and checks...(again and again until it finds the image)
Is that right? And if it is not,what I must change to do the above?

Thank you all for helping me!
01/21/2009 16:16 Darkyy#143
Quote:
Originally Posted by Alexisppp12345 View Post
Hiyoal@
Yes the title [Conquer2.0] works for AHK.

Evan Lim(or anyone who knows)@
I tried to make the programs work with the coordinates of screen(see post [Only registered and activated users can see links. Click Here To Register...]) and not with the coordinates of the Active Window.

CoordMode, Pixel, Screen works but CoordMode, Mouse, Screen does not work. It does not click at all... Look a little bit at the code and please tell me what I wrote wrong.

Code:
loop
{
CoordMode, Mouse, Screen Click 310, 1008; Open 1st program at bar
Sleep, 5000 ; Wait 5 second
}
and... another thing because I am not completely sure if I write it good.

Code:
f=0
h=1

loop, %h%
{

CoordMode, Mouse, Screen Click 267, 542;Clicks
Sleep, 1000 ; Wait 1 second
CoordMode, Mouse, Screen Click 414, 224;Clicks
Sleep, 1200 ; Wait 1.2 seconds
CoordMode, Pixel, Screen ImageSearch, FoundX, FoundY, 953 ,140, 994, 181, *5 C:\ore1.bmp;Looks at inventory.
if ErrorLevel = 0
f+=1

}
f=0
MsgBox, Bravo! You are out of the loop and the programs continues!
The above code clicks 2 times and then checks to find an image and If it finds the image it "jumps" out of the loop and says the message Else it clicks again 2 times and checks...(again and again until it finds the image)
Is that right? And if it is not,what I must change to do the above?

Thank you all for helping me!
why do you write
Code:
CoordMode, Mouse, Screen Click 267, 542;Clicks
instead of
Code:
Click 267, 542

about post 136&137 try
Code:
loop 39
{
 IfWinActive, [Conquer2.0]
 {
 Sleep 1000 
 Click 540, 383
 Sleep 300
 Click 540, 383
 Sleep 2000 
 Click 434, 222
 Sleep 1200 
 Click 434, 222
 Sleep, 1200 
 Click 434, 222
 Sleep 1200
 Click 931, 159
 Sleep 500 
 Click 623, 185
 Sleep 500
 Click 689, 487
 Sleep 200 
 Click 631, 245
 }
sleep 1000
}
01/21/2009 16:34 Evan Lim#144
Hiyoal@
usually i only use "[C" because of different versions of CO
but [Conquer2.0] should work

Alexisppp12345@
it should be separated:
Code:
CoordMode, Mouse, Screen
loop
{
Click 310, 1008
Sleep, 5000 
}
(as suggested in the help file, CoordMode should be used only at the top of the script)
01/21/2009 17:43 Alexisppp12345#145
Evan Lim@
Wow!! Thanks very very very very much for help!
P.S. The second code I wrote at psot #143 does not do that I wanted, but I found a way.
01/21/2009 18:33 martinpaul#146
Hello guys,this may be in the wrong section but im trying to download something to lvl my intencify for my archer.
i have tried so many bots on here but when i try to open it gives me the following error that the file could not be open,i have used winzip,winrar,jzip but still no good.im using windows vista so i dont know if this is stopping it or the bot doesnt work any more.

I have used inten lvler before but cant seem to get 1 to work now.

i normally put inten in the slot where the action goes and sit in f2.

i have google and found other bots but i could never open it as if theres nothing in the file i have downloaded.

If anybody could send me a link to a bot that actually works i would be really gratful,anything at all .

Thanks in advance and sorry for the long post.
01/21/2009 19:03 Alexisppp12345#147
Quote:
Originally Posted by martinpaul View Post
Hello guys,this may be in the wrong section but im trying to download something to lvl my intencify for my archer.
i have tried so many bots on here but when i try to open it gives me the following error that the file could not be open,i have used winzip,winrar,jzip but still no good.im using windows vista so i dont know if this is stopping it or the bot doesnt work any more.

I have used inten lvler before but cant seem to get 1 to work now.

i normally put inten in the slot where the action goes and sit in f2.

i have google and found other bots but i could never open it as if theres nothing in the file i have downloaded.

If anybody could send me a link to a bot that actually works i would be really gratful,anything at all .

Thanks in advance and sorry for the long post.
I made a intensify leveler. You must have selected intensify for skill,that means that intensify is at the slot where the action goes. You don't need to sit. To pause the script click Ctrl+Q.

EDIT: Here is the code,if you wanna have a look at it.
Code:
msgbox, Click Ctrl+Q to Pause. You must have selected intensify.

CoordMode, Mouse, Screen

loop
{
Click right 620, 432
Sleep, 8000
}
^q::pause
01/21/2009 22:15 martinpaul#148
Hello,
Thanks for getting back to me,i have tried to open that file and its coming back with a error which i normmaly get when ever i try and download a bot.
the error is that its not a valid RAR file.

Now i get this all the time,wheather its a rar file or ibf.file.

Any ideas ?

Thanks in advance.
01/21/2009 22:32 Evan Lim#149
martinpaul@
highly possible thats ur virus scanner deletes part of the rar file
(why? because the virus scanner thinks the content is virus, *but u know its not)
uninstall or temp disable it, then redownload the file again
01/21/2009 23:04 martinpaul#150
Thanks again for getting back to me,I have uninstall my anti virus and then downloaded it again.i then click right click on the file and click extract here,then the same error message comes up,not a valid rar file.

Sorry for being a pain.