Restart D2 script v2.0

Page 4 of 4 Previous  1, 2, 3, 4

View previous topic View next topic Go down

Re: Restart D2 script v2.0

Post by wojen616 on Fri Mar 29, 2013 6:59 am

@iced_tea wrote:
Help! Please help my dying hand/wrists, thanks!

Duh, u forced me to get up from bed. :<

Code:
#include <Misc.au3>

local $hDLL = dllopen("user32.dll")

While 1
If WinActive("[Title:Diablo II;Class:Diablo II]") Then
if (_IsPressed("A2" , $hDLL)) Then
While _IsPressed("A2", $hDLL)
MouseClick ("left")
sleep (40)
WEnd
EndIf
EndIf
Sleep(100)
WEnd

DllClose($hDLL)

wojen616
Landmass

Posts : 360
Country : Poland

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by iced_tea on Fri Mar 29, 2013 7:41 am

Thanks Wojen!

Now the code runs without issue. I open D2 window, open the program, doesn't give me an error. But when I press left ctrl, it doesn't do the magic left click click click!

I'm a noob at autoit but let's see....

misc.au3 probably contains the function _ispressed()

while the window is title Diablo II, if Left Ctrl ("A2") is pressed, then

while Left Ctrl is pressed, left click. delay 40ms, then
while Left Ctrl is pressed, left click. delay 40ms, then
while Left Ctrl is pressed, left click. delay 40ms, then.....

if Left Ctrl is not pressed, end if, end if, delay 100ms (why we need this?)

Close function.

Am I interpreting this correctly? Any idea why nothing happens when I press the Left Ctrl button? My hand/wrist would be externally grateful! Smile

iced_tea
Bloodfire Rogue

Posts : 63
Country : ???

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by wojen616 on Fri Mar 29, 2013 8:07 am

Add this at the beginning:
Code:
#RequireAdmin

And delay of 100ms is required to prevent unnecessary CPU usage.

wojen616
Landmass

Posts : 360
Country : Poland

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by iced_tea on Fri Mar 29, 2013 8:11 am

Cool! It works! It works! Now my right hand is free to eh..... scratch that itch on my backside! Cool!!

iced_tea
Bloodfire Rogue

Posts : 63
Country : ???

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by Quirinus on Sun Mar 31, 2013 5:29 pm

@iced_tea wrote:Cool! It works! It works! Now my right hand is free to eh..... scratch that itch on my backside! Cool!!

So everything is working? Running as admin solves most problems.

Quirinus
Creature of Flame

Bloody High Five
Posts : 5567
TGGood none
Country : Croatia

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by iced_tea on Sun Mar 31, 2013 11:13 pm

Yup I got iwansuall's clicker to work. But I still don't know how to get iQQ's D2Tools to work. Check your pm!

iced_tea
Bloodfire Rogue

Posts : 63
Country : ???

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by Quirinus on Fri Apr 05, 2013 8:46 pm

no idea about the iQQ's thing, I can help only with the clicker... : <

EDIT: I might check iQQ's thing later. LOL that sounded dirty...

Quirinus
Creature of Flame

Bloody High Five
Posts : 5567
TGGood none
Country : Croatia

View user profile

Back to top Go down

Page 4 of 4 Previous  1, 2, 3, 4

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum