AutoHotkey Community

It is currently May 27th, 2012, 11:12 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: February 2nd, 2012, 3:04 pm 
Thx Codekiller

Game name is Tibia

http://www.tibia.com

really thx


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2012, 3:24 pm 
Offline

Joined: July 10th, 2008, 8:49 am
Posts: 1865
Location: Brussels, Belgium
Ok I can't guarantee I will test it as I am really busy when I get home, so perhaps tomorrow before work (it's 15:23 now for me - GMT+1) if I have enough time. ;-)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2012, 3:30 pm 
Ok Code thx anyway GL


anyone know what is the problem here just post plx


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 2nd, 2012, 4:34 pm 
Offline

Joined: October 11th, 2010, 12:30 pm
Posts: 406
I registered to that game and tried pixelsearch, at first I got mad since it didn't work, later I figured out how to do it.
Try this as it is, it will drag red bar down. I hope it works for you too.
Code:
coordmode, pixel, screen
coordmode, mouse, screen
WinActivate, Tibia
WinWaitActive, Tibia
sleep 4000
PixelSearch, Px, Py, 1100, 140, 1237, 178, 0x7d7dff,0, fast
If (ErrorLevel = 0)
{   SendEvent {Click %Px%, %Py%, down}{click 1213, 468, up}
;mousemove, %Px%, %Py%,
}
Else
{   MsgBox,,,Color Not found
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2012, 4:46 pm 
Thx Nailbiter

But Still their is Porblem

Image

and this is my Script

Code:
coordmode, pixel, Relative
coordmode, mouse, Relative
WinActivate, Tibia
WinWaitActive, Tibia
sleep 4000
loop
{
PixelSearch,Px,Py,836,565,1029,724,0x7defde,50,fast
send, {CtrlDown}
MouseClickDrag, L, %Px%, %Py%, 878, 516
send, {CtrlUp}
Sleep, 1000
PixelSearch,Px,Py,836,565,1029,724,0x10c8f8,50,fast
send, {CtrlDown}
MouseClickDrag, L, %Px%, %Py%, 878, 516
send, {CtrlUp}
Sleep, 1000
}

^p::Pause  ; Press CTRL + P to pause. Press it again to resume.



The Problem is :

I make loop and thats what i want but after it searched for those colors at those positions (pos 2) and take it to their other pos (pos 1) with clickdrag but after it finish draging it always click at the pos (pos 1)

I dont know why?,,,, maybe their is something with my script

I want to just if found the colors at the ( pos 2) take it with click drag + holding ctrl like my script to ( pos 1)

and if their is way to put many colors at same hotkey it will be good better than this if not its oki too ^^

I hope you fix it thx anyway


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2012, 4:55 pm 
maybe the solution is :

but i dont know what to write really :( ;(

this part is good

Code:
If (ErrorLevel = 0)
{   
send, {CtrlDown}
MouseClickDrag, L, %Px%, %Py%, 878, 516
send, {CtrlUp}
}


after else doing something to dont do msgbox just replay the code maybe

Code:
Else
{   MsgBox,,,Color Not found
}


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2012, 10:20 pm 
OMG I'm Sorry it was You Kenn srry for that

Thx to You Kenn and to You Nailbiter


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 3rd, 2012, 10:44 pm 
Offline

Joined: October 11th, 2010, 12:30 pm
Posts: 406
Quote:
OMG I'm Sorry it was You Kenn srry for that

No problem, I was busy with my own problems, so I couldn't write you. I noticed that you used an infinite loop so it will continue to run until pixel color ends, so you must use conditional loop in order to exit loop. There is break command in loop, you can use it with errorlevel. Your algorithm appears to be wrong, why did you use double pixelsearch in a loop?
Code:
coordmode, pixel, Relative
coordmode, mouse, Relative
WinActivate, Tibia
WinWaitActive, Tibia
sleep 4000

PixelSearch,Px,Py,836,565,1029,724,0x7defde,50,fast
If (ErrorLevel = 0)
{
MouseClickDrag, L, %Px%, %Py%, 878, 516

Sleep, 1000

}

^p::Pause  ; Press CTRL + P to pause. Press it again to resume.


What's wrong with it?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 4:14 am 
OMG its work good but their is something u missed

Quote:
and if their is way to put many colors at same hotkey it will be good better than this if not its oki too ^^


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 9:51 am 
Offline

Joined: October 11th, 2010, 12:30 pm
Posts: 406
Oh I see, you want to drag all items in that position. Then you can use a conditional loop something like this:
Code:
coordmode, pixel, Relative
coordmode, mouse, Relative
WinActivate, Tibia
WinWaitActive, Tibia
sleep 4000
loop
{
PixelSearch,Px,Py,836,565,1029,724,0x7defde,50,fast
If (ErrorLevel = 0)
{
MouseClickDrag, L, %Px%, %Py%, 878, 516

Sleep, 1000

}
Else
break
}
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 4th, 2012, 9:35 pm 
Kenn@

Its work good and special thx for that

but if their is way to put all colour at same hotkey it will be Good


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2012, 10:07 am 
Offline

Joined: October 11th, 2010, 12:30 pm
Posts: 406
Do you want to put a hotkey to run it?
Code:
#persistent
coordmode, pixel, Relative
coordmode, mouse, Relative
F1::
WinActivate, Tibia
WinWaitActive, Tibia
sleep 4000

PixelSearch,Px,Py,836,565,1029,724,0x7defde,50,fast
If (ErrorLevel = 0)
{
MouseClickDrag, L, %Px%, %Py%, 878, 516

Sleep, 1000

}

^p::Pause  ; Press CTRL + P to pause. Press it again to resume.
Esc::exit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2012, 10:22 am 
NO NO bro


I talk about put all colours at same hotkey


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2012, 10:31 am 
Offline

Joined: October 11th, 2010, 12:30 pm
Posts: 406
Help ME wrote:
I talk about put all colours at same hotkey

:? I didn't get it, how? Please explain it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 5th, 2012, 4:54 pm 
Code:
PixelSearch,Px,Py,836,565,1029,724,0x7defdeو0,0x021E3D,0x065edko},50,fast


like this add many colors


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Edd and 16 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