| |
|
|
Michael Wodrich | declared mouse_event created a Click or a Mausbewegung.
P:L1: Flag for, which action carryed out go should and as Coordinates To interpret are => $8000 = The angegebenen Mouse-Coordinates are absolute Coordinates. 1 = mouse watts moving 2 = linker Mausbutton pressed 4 = linker Mausbutton losgelassen 8 = right Mausbutton pressed $10 = right Mausbutton losgelassen $20 = mittlerer Mausbutton pressed $40 = mittlerer Mausbutton losgelassen $0800 = on the wheel the Wheelmaus turned
P:L2: X-Koordinate the mouse as LongInt.
P:L3: Y-Koordinate the mouse as LongInt.
P:L4: yet without function (0).
P:L5: Longint or P:B5 or 0 (zero). here can with want additional data transfer go, The the Empfänger with the API GetMessageExtraInfo read can (communication between two Programs).
|
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 07/06/05 ▲ |
|
|
|
|
E.T. | One example moreover: CompileMarkSeparationDef mouse_action(5) !"User32","mouse_event"
declare X&, Y&
cls
X& = (%MaxX/2)*65535/%MaxX'x-zentriert
Y& = (%MaxY/2)*65535/%MaxY'y-zentriert
mouse_action($8000 + 1, X&, Y&, 0, 0)
Print "Startposition : " + @str$(%MouseX) + " - " + @str$(%MouseY)
sleep 500
randomize
whileloop 1,10
X& = @Rnd(%MaxX)'Zufall X-Pos.
Y& = @Rnd(%MaxY)'Zufall y-Pos.
print "Ziel " + @str$(&loop) + " : " + @str$(X&) + " - " + @str$(Y&)
X& = X& * 65535 / %MaxX'Umrechnen!!
Y& = Y& * 65535 / %MaxY'Umrechnen!!
mouse_action($8000 + 1, X&, Y&, 0, 0)
sleep 500
EndWhile
print "Ende mit klick ins Fenster..."
waitinput
end
important is the converting the Coordinates, look at z.B. : msdn: [...] or : [...] |
|
|
| Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 11/27/10 ▲ |
|
|
|