English
Source / code snippets

Cursorposition Getcursorpos mouse Mausstrecke Messen Setcursorpos way lane

 
Cursorposition Getcursorpos mouse Mausstrecke Messen Setcursorpos way lane

iF (10.07.12)

@Funkheld: Have you here something The way misst... something like?

Download
CompileMarkSeparation
 {$cleq}
Windowstyle 31
Windowtitle "Cursorposition ermitteln"
Window 500,500
setcursorpos((winRight-winLeft)\2+winLeft,(winBottom-winTop)\2+winTop)
var modified&=0
var strecke&=0
var my2MousePositions&=globalAlloc(gPTR,16)
getCursorPos(my2MousePositions&)
rtlMoveMemory(my2MousePositions&+8,my2MousePositions&,8)

while 1

    waitinput 10
    getCursorPos(my2MousePositions&)
    settext hWnd,"X:"+str$(long(my2MousePositions&,0))+" Y:"+str$(long(my2MousePositions&,4))+" Strecke:"+str$(strecke&)
    add strecke&,abs(long(my2MousePositions&,0)-long(my2MousePositions&,8))+abs(long(my2MousePositions&,4)-long(my2MousePositions&,12))

    if long(my2MousePositions&,0) > winRight

        long my2MousePositions&,0=winLeft
        inc modified&

    endif

    if long(my2MousePositions&,0) < winLeft

        long my2MousePositions&,0=winRight
        inc modified&

    endif

    if long(my2MousePositions&,4) < winTop

        long my2MousePositions&,4=winBottom
        inc modified&

    endif

    if long(my2MousePositions&,4) > winBottom

        long my2MousePositions&,4=winTop
        inc modified&

    endif

    if modified&

        modified&=0
        setCursorPos(long(my2MousePositions&,0),long(my2MousePositions&,4))

    endif

    rtlMoveMemory(my2MousePositions&+8,my2MousePositions&,8)

wend

globalFree(my2MousePositions&)
='./../../funzione-riferimenti/XProfan/end/'>end

If you The add way row to there änderst:
CompileMarkSeparation
add strecke&,(long(my2MousePositions&,0)-long(my2MousePositions&,8))+(long(my2MousePositions&,4)-long(my2MousePositions&,12))
(means without abs), then becomes The rückwärtsgefahrene way too from the Streckenlänge
subtrahiert instead of to Streckenlänge add.

PS: with XPSE need The whole standard-APIs not deklarieren and its
even sinnvoller it then neither To do since the Aufrufe in explicit faster
Calls transformed go.
 
07/10/12  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.635 Views

Untitledvor 0 min.
ByteAttack12/27/23
Walter03/24/23
Axel Berse04/29/22
p.specht11/21/21
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie