English
Opportunities and suggestions

wish: Globale Mausposition

 
- Page 1 -


trouble: The globale Mausposition isn't simply To relating.

an additional function getMousePos (vlt. get("MousePos",handle&)) missing, these setting too The System-Variables %mouseX  and %mouseY .

is handle& zero, then is the Globale meant, otherwise relatively vlt. How:
CompileMarkSeparation
proc MOUSE.GETPOS

    PARAMETERS H&

    SELECT %PCOUNT

        CASEOF 0

        ~GetCursorPos(MOUSE.MEM#)
        MOUSE.X&=MOUSE.MEM#.X&
        MOUSE.Y&=MOUSE.MEM#.Y&

        CASEOF 1

        DECLARE GMP#
        DIM GMP#,8
        CLEAR GMP#
        ~clientToScreen(H&,GMP#)
        var GMX%=LONG(GMP#,0)
        var GMY%=LONG(GMP#,4)
        ~getCursorPos(GMP#)
        GMX%=LONG(GMP#,0)-GMX%
        GMY%=LONG(GMP#,4)-GMY%
        MOUSE.X&=GMX%
        MOUSE.Y&=GMY%
        DISPOSE GMP#

    ENDSELECT

endproc


CompileMarkSeparation
 
10/16/09  
 



 
- Page 1 -


@Dieter: my response counted Nico the IMHO annahm, that %mousex and %mousey simply umrechenbar would, what therefore little uses, there %mousex and %mousey only staid go, if the Mauspfeil itself over the HWND befindet. ^^ your example is still ok, is still in the Grunde same How mine supra - I meant only the it rather would if XProfan %mousex and y settle could and getMousePos nativ would.
 
10/18/09  
 




Dieter
Zornow
Achso, then have so did i Nico wrong understood, naja rapide fortschreitende Alzheimer.

but fundamentally has it right, The positions in the Mainwindow could one on Screen-Coordinates converting let.
But in the Mainwindow probably sinnfrei.
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
10/19/09  
 



with Omikron-Basic (Atari 1040ST) hiess it too GetMousePos - found I always beautiful.
 
10/19/09  
 




Nico
Madysa
Yes, that %MouseX and -Y something limited are, forgot I, jsuis inconsolable.

then would but a Set-option, The the two System-Variables properly changes, still integral sinnvoller, or?
 
Nico Madysa
10/24/09  
 



Nico Madysa, Beitrag=54602, Zeitpunkt=24.10.2009
Yes, that %MouseX and -Y something limited are, forgot I, jsuis inconsolable.

then would but a Set-option, The the two System-Variables properly changes, still integral sinnvoller, or?


get("MousePos",[lever]) is meaningfully, changes both Sysvars.
 
10/24/09  
 



 
- Page 2 -



Nico
Madysa
Can itself on Untiges some?
CompileMarkSeparation
cls
print %MouseX,%MouseY in Bezug auf %hWnd
Set("MouseOrigin",andresHandle&)
print %MouseX,%MouseY in Bezug auf andresHandle&
Set("MouseOrigin",%Desktop)
print %MouseX,%MouseY in Bezug auf globales Koordinatensystem
Set("MouseOrigin",%hWnd) 0 ginge auch
print %MouseX,%MouseY in Bezug auf %hWnd
waitinput
Nico Madysa
10/24/09  
 



Ne - is Garbage, as wärs of somebody the itself no thoughts made has or so no experience has.

Get("MousePos",... is active, what You vorschlägst would passiv.

around the Mausposition JETZT or. to a designed Time To relating (is important this self to determine to!) - and optional relatively to a lever od. rel.z. Bildschrim, needed is a function getMousePos - could one beautiful to pack in get("MousePos",... there Yes System-Variables staid and be this imho with the function GET in the "Einklang" standing.

"GetMousePos" is too beautiful Basichaft, know I anyway so and fands always integrally useful and misse it in XProfan seither and so I into Mouse.Inc too The function getMousePos hineinpackte. ^^

Well, explode I had too missing - what has become of it?!

but naturally, mannn can also getMousePos verhunzen - could one too get("MausÄthsaPosi",Y,Z,X) draus make followed of %x%mouse and %y%mouse. -.-

One simple getmousepos!
 
10/24/09  
 




Nico
Madysa
so, How You it having want, are you so, simply The API -- for may part by Call -- To use, with 70%-iger probability faster and rather bedient.
 
Nico Madysa
10/26/09  
 



what? Why is a mehrzeilige XProfanfunktion faster as if Roland it nativ implementiert and How set I System-Variables %mousex and y?
 
10/26/09  
 




Nico
Madysa
want You me say, that Dieters tender for your tack too slow is?
 
Nico Madysa
10/28/09  
 



goes circa FPS (Programmeffizienz), teste time whom Difference.

Why ought to the processor on 100 walk instead of only on 5, with such importent function too with Echtzeitanwendungen?
 
10/28/09  
 



the here's naturally awfully quick, but unfortunately in variables instead of System-Variables schreibend:
CompileMarkSeparation
cls
var mouse.x&=0
var mouse.y&=0
var mouse.xa&=addr(mouse.x&)
var mouse.ya&=addr(mouse.y&)

while 1

    GetMousePos(%hWnd,mouse.xa&,mouse.ya&)
    locate 1,1
    print mouse.x&,mouse.y&,"	"
    waitinput 100

wend

waitinput
end

nProc GetMousePos

    Parameters h&,ax&,ay&
    var mem&=dim(8)
    ClientToScreen(h&,mem&)
    var x&=long(mem&,0)
    var y&=long(mem&,4)
    GetCursorPos(mem&)
    x&=long(mem&,0)-x&
    y&=long(mem&,4)-y&
    dispose(mem&)
    long ax&,0=x&
    long ay&,0=y&
    return 0

endproc

(but vlt. can itself so nevertheless integrally well works)

319 kB
Hochgeladen:10/28/09
Downloadcounter60
Download
 
10/28/09  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

6.201 Views

Untitledvor 0 min.
Sven Bader08/02/21
Axel Berse05/01/19
Walter04/07/19
Vgdd06/05/17
More...

Themeninformationen

this Topic has 3 subscriber:

iF (10x)
Nico Madysa (5x)
Dieter Zornow (4x)


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