o0johntam0o Posted April 13, 2011 Posted April 13, 2011 (edited) I tried to use "ControlClick" in this code: For $j=1 to $Sky_SoTang For $i=1 to $Sky_Times $Sky_Tmp=$Sky_xGold While ($Sky_Tmp<=$Sky_xGold+600) ControlClick("KVTM","",$Sky_ClassID, "Left", 1, $Sky_Tmp,$Sky_yGold+5) ControlClick("KVTM","",$Sky_ClassID, "Left", 1, $Sky_Tmp,$Sky_yGold-5) ;MouseClick("left",$Sky_Tmp,$Sky_yGold+5,1,0) ;MouseClick("left",$Sky_Tmp,$Sky_yGold-5,1,0) $Sky_Tmp+=10 If $Sky_KTra=False Then ToolTip("Đã ngừng nhặt gold",0,0,"Thông Báo") $Sky_KTra=True ExitLoop(3) EndIf WEnd Next If ($j<>$Sky_SoTang) Then TangDuoi_Sky() Sleep(500) EndIf Next But the "ControlClick" executed without any "Loop" (Including While...WEnd) I tried replace it by "MouseClick" and it's ok How can i slove this. Edited April 13, 2011 by o0johntam0o
MrMitchell Posted April 13, 2011 Posted April 13, 2011 I tried to use "ControlClick" in this code: For $j=1 to $Sky_SoTang For $i=1 to $Sky_Times $Sky_Tmp=$Sky_xGold While ($Sky_Tmp<=$Sky_xGold+600) ControlClick("KVTM","",$Sky_ClassID, "Left", 1, $Sky_Tmp,$Sky_yGold+5) ControlClick("KVTM","",$Sky_ClassID, "Left", 1, $Sky_Tmp,$Sky_yGold-5) ;MouseClick("left",$Sky_Tmp,$Sky_yGold+5,1,0) ;MouseClick("left",$Sky_Tmp,$Sky_yGold-5,1,0) $Sky_Tmp+=10 If $Sky_KTra=False Then ToolTip("Đã ngừng nhặt gold",0,0,"Thông Báo") $Sky_KTra=True ExitLoop(3) EndIf WEnd Next If ($j<>$Sky_SoTang) Then TangDuoi_Sky() Sleep(500) EndIf Next But the "ControlClick" executed without any "Loop" (Including While...WEnd) I tried replace it by "MouseClick" and it's ok How can i slove this. You can make the following changes: For $j=1 to $Sky_SoTang For $i=1 to $Sky_Times $Sky_Tmp=$Sky_xGold While ($Sky_Tmp<=$Sky_xGold+600) ;ControlClick("KVTM","",$Sky_ClassID, "Left", 1, $Sky_Tmp,$Sky_yGold+5) ;ControlClick("KVTM","",$Sky_ClassID, "Left", 1, $Sky_Tmp,$Sky_yGold-5) MouseClick("left",$Sky_Tmp,$Sky_yGold+5,1,0) MouseClick("left",$Sky_Tmp,$Sky_yGold-5,1,0) $Sky_Tmp+=10 If $Sky_KTra=False Then ToolTip("Đã ngừng nhặt gold",0,0,"Thông Báo") $Sky_KTra=True ExitLoop(3) EndIf WEnd Next If ($j<>$Sky_SoTang) Then TangDuoi_Sky() Sleep(500) EndIf Next More information can be found here
o0johntam0o Posted April 13, 2011 Author Posted April 13, 2011 T'm so sorry about this trouble, but i just want to know how can i use "ControlClick" in Loop functions Thanks for any replies
o0johntam0o Posted April 14, 2011 Author Posted April 14, 2011 (edited) Oh I've just realized that i was wrong that "ControlClick" didn't work in Loops 'Cause i didn't use "ControlClick" in another functions which i just used "MouseClick" ( TangDuoi_Sky() ). It must be replaced all by "ControlClick" Thanks. Edited April 14, 2011 by o0johntam0o
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now