AutoIt ControlClick

06/03/2010 01:55 boxxiebabee#1
Servus,

also ich möchte mir nen kleinen Bot für nen Browsergame basteln, der aber im
Hintergrund läuft.

Ich habs mit ControlClick versucht, hab schon ziemlich viel gegooglet und
auch hier die SuFu benutzt, aber nix befunden was mir helfen würde.

Wenn ich das Script starte macht er überhaupt nichts. Werder wenn das
Fenster maximiert oder minimiert ist.
Die Coords sind genau, hab ich mit dem AutoIt v3 WIndow Info Tool
ausgelesen.

Also woran könnte es liegen?

Code:
Opt("WinWaitDelay",100)
Opt("WinDetectHiddenText")
Opt("MouseCoordMode", 0)
Opt("MouseClickDownDelay", 80)
Opt("MouseClickDelay", 130)

Sleep (3000)
_WinWaitActivate("KapiBados - Mozilla Firefox","")


ControlClick("KapiBados - Mozilla Firefox", "[CLASS:MozillaWindowClass; INSTANCE:2]", "","left",1,801,473)
ControlClick("KapiBados - Mozilla Firefox", "[CLASS:MozillaWindowClass; INSTANCE:2]", "","left",1,840,473)
ControlClick("KapiBados - Mozilla Firefox", "[CLASS:MozillaWindowClass; INSTANCE:2]", "","left",1,879,473)
ControlClick("KapiBados - Mozilla Firefox", "[CLASS:MozillaWindowClass; INSTANCE:2]", "","left",1,918,473)
ControlClick("KapiBados - Mozilla Firefox", "[CLASS:MozillaWindowClass; INSTANCE:2]", "","left",1,957,473)
ControlClick("KapiBados - Mozilla Firefox", "[CLASS:MozillaWindowClass; INSTANCE:2]", "","left",1,996,473)


Func _WinWaitActivate($title,$text,$timeout=0)
	WinWait($title,$text,$timeout)
	If Not WinActive($title,$text) Then WinActivate($title,$text)
	WinWaitActive($title,$text,$timeout)
EndFunc

mfg
06/03/2010 09:04 .nAno#2
Probier mal den Fenstertext teil leer lässt, ich weiss nicht genau ob das da mit [CLASS:...] wirklich funktioniert...
06/03/2010 19:56 boxxiebabee#3
meinst du den Fenstertitel? also KapiBados - Mozilla Firefox?
Oder CLASS & INSTANCE?
Ersteres wäre doch etwas doof, dann würde er nicht wissen wo?
Und zweiteres hab ich bereits versucht, vergebens.

mfg.
06/03/2010 20:42 sido47#4
Also an dem ControlClick ist nix falsch.

Quote:
ControlClick("Google - Mozilla Firefox" ,"[CLASS:MozillaWindowClass; INSTANCE:2]","","left",1,546,65)

Versuchs mal so villt gehts ja


Quote:
if WinActive($title,"") then
;Hier deine ControlClick Befehle
else
ShellExecute("DeineSeite.htm")
WinWaitActive($title,"")
EndIf