| |
|
|
| 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 CompileMarkSeparation |
|
|
| |
|
|
|
Dieter Zornow | Why umständlich ifs too simply goes CompileMarkSeparationXProfan 11
ohne Parameter ist screenposition
$H Windows.ph
subproc Get.MOUSEPOS
PARAMETERS Hwnd&
Declare X%,Y%,point#
Dim point#,8
SELECT %PCOUNT
CASEOF 0
~GetCursorPos(point#)
X%=long(point#,0)
Y%=long(point#,4)
CASEOF 1
~getCursorPos(point#)
~screenToClient(Hwnd&,point#)
X% = long(point#,0)
Y% = long(point#,4)
OTHERWISE
Dispose point#
Return "0|0"
ENDSELECT
Dispose point#
return str$(X%)+"|"+str$(Y%)
endproc
cls
while 1
waitinput 5
case %Key = 2:break
settext %Hwnd,Get("MOUSEPOS",%Hwnd)
endwhile
end
|
|
|
| Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 10/17/09 ▲ |
|
|
|
|
| means %mousex and %mousey-setzend would still but schöner and particularly faster. |
|
|
| |
|
|
|
Nico Madysa | Can the Coordinates because not ClientToScreen converting let? |
|
|
| |
|
|
|
Dieter Zornow | you mean well screentoClient not clienttoscreen. getcursorpos supply already The Screen-Coordinates, everybody can with ScreentoClient on window relating can, How I it in my code made have. |
|
|
| Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 10/18/09 ▲ |
|
|
|
|
| |
|
| |
|
|
|
Dieter Zornow | Try time my example, there come tappt im dunkeln on |
|
|
| Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 10/18/09 ▲ |
|
|
|
|
| @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. |
|
|
| |
|
|
|
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. |
|
|
| |
|
|
|
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, 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. |
|
|
| |
|
|