Jump to content

My small problem


Recommended Posts

Hi, this is my first post on this forum :idea:

So, i have a small problem with cords

#include <Process.au3>

HotKeySet('{F1}', 'quit')

$Ini = @ScriptDir & '\Ustawienia_G.ini'

$WindowName = IniRead($Ini, "Ustawienia", "D2WindowName", "Diablo II")

Opt("MouseCoordMode", 2);1=absolute, 0=relative, 2=client

$millisecondsToDelay = 1000;change this if you want

Sleep(3000)

Sleep ($millisecondsToDelay)

MouseClick ("left",391,335,1,0); Login to BN Europe

Sleep ($millisecondsToDelay)

MouseClick("left",327,225,1,0); Move cursor to acc box

Sleep ($millisecondsToDelay)

MouseClick("left",327,225,1,0); Move cursor to acc box

Sleep ($millisecondsToDelay)

Send("HoC-InFlames"); Send account

Sleep ($millisecondstodelay)

MouseClick("left",270,278,1,0); Go to password box

Sleep ($millisecondsToDelay)

Send("mypassword"); Send password

Sleep ($millisecondsToDelay)

MouseClick("left",316,359,1,0); Click on "Sign Up"

Func quit()

Exit

EndFunc

Here is my small script to mouse moves. Cords are prepared to windowed game :P . I get cordinates from this

MouseGetPos()

Opt('MouseCoordMode')

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6

Opt('MustDeclareVars', 2)

#include <WinAPI.au3>

Sleep(2000)

_Main()

Func _Main()

Local $hwnd = GUICreate("test")

Local $tPoint = _WinAPI_GetMousePos()

Local $tPoint2 = _WinAPI_GetMousePos(True, $hwnd)

MsgBox(4096, "Mouse Pos", _

"X = " & DllStructGetData($tPoint, "X") & @LF & "Y = " & DllStructGetData($tPoint, "Y") & @LF & @LF & _

"Client" & @LF & "X = " & DllStructGetData($tPoint2, "X") & @LF & "Y = " & DllStructGetData($tPoint2, "Y"))

EndFunc ;==>_Main

What is the problem? i copyied cords to first script (suggested client window) but every times when i run project again these cords is changing :party:

Something like "missclick".

Srry for my english skills :P i am not sure i wrote this correct :)

Why mouse dont click in the correct position?

Edited by Sobiech

This world is crazy

Link to comment
Share on other sites

Ok now i know :)

MouseGetPos()
Opt('MouseCoordMode', 2)
Sleep(2000)
$pos = MouseGetPos()
MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1])

This is good script to get cords from my active window :party:

Edited by Sobiech

This world is crazy

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...