hoang anh Posted April 5, 2007 Posted April 5, 2007 (edited) func _run() $size = WinGetPos("") $tam_x= $size[0]+470 $tam_y= $size[1]+380 $r = 20 $alpha = 0 $n = $n +1 Do $r = $r +1 $alpha =$alpha + 0.2 $x = $r*sin($alpha) $y = 3/4*$r*cos($alpha) MouseMove($x+$tam_x, $y+$tam_y, 0) $ReturnArray = DllCall("CursorTool.dll", "int", "GetCursorId") If $ReturnArray[0]= 8760 then mouseclick($click, $x+$tam_x, $y+$tam_y, 1, 0) $cursorId = return[0] $r = 20 $alpha = 0 sleep(GUICtrlRead($input)*1000) EndIf until $r > 400 return endfuncWorking nice about 5mins. After that, mouse still moving without click ( seem dllcall not working, cant check Mouse ID)Maybe cause I use DllCall("Cursortoll.dll") to much. And make window error. Cant do it any more.http://www.geocities.com/subnetjet/CursorTool.zip( cursortool.dll made by Kageroo use VB) Edited April 5, 2007 by hoang anh
Richard Robertson Posted April 6, 2007 Posted April 6, 2007 You would do better by opening the Dll and calling using the Dll handle. $dll = DllOpen("cursortool.dll") ... $ReturnArray = DllCall($dll, ...) ... ;at the end DllClose($dll)
hoang anh Posted April 7, 2007 Author Posted April 7, 2007 Thx IceKirby ^^. I'm trying do it. But " dllclose($dll)" add after " return" or " before " return" ??
GrungeRocker Posted April 7, 2007 Posted April 7, 2007 before return [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font]
Richard Robertson Posted April 8, 2007 Posted April 8, 2007 Just wondering, what error are you actually getting? Is it an AutoIt error or a WIN32 error?
hoang anh Posted April 14, 2007 Author Posted April 14, 2007 i dun know how explain it. Very hard. Not Win32 error. Seem like autoit error or code error. In my code, I used dllcall. But Func " If - return " make dllcall repeat too much. After running about 10mins, dllcall stop working while my func still working well.
psylem Posted June 12, 2007 Posted June 12, 2007 Yeah I get that same problem, I think maybe there is a memory leak or something. I can't explain it, but there is probably a bug in the C code somewhere. Even when you leave the DLL open and just make calls to the function the same problem happens eventually. It works perfectly for about 5 minutes like you said, and then it's like my whole script becomes semi-unresponsive. If I recall correctly no events would get fired at all. I originally just built the DLL directly from source code which was posted on this forum somewhere, fact is I don't fully understand how it works and haven't revisited it since I built it into a DLL. You'll need to get some C skills to fix this one. Let me know if you have any luck. I gave up on this one months ago. It's a shame it's not working because being able to identify unknown cursor types would be a really handy feature.
wahoyaho Posted November 21, 2007 Posted November 21, 2007 How come when I run it all I get is blank? :s
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