Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Tue Jun 17, 2003 3:36 pm Post subject: Screen Resolution Help... |
|
|
I have a dialog attached to the mouse and when you move the mouse the dialog follows it. I want to make the dialog always stay in view so when you move to the cordinates eg. 1000 x 769 the dialog starts to be cut off !
I want a script so that it detects the mouse position and if over a certain distance will move the dialog...
Heres what i have come up with so far:
| Code: | %%screenY = @SYSINFO(SCREENHEIGHT)
%%screenX = @SYSINFO(SCREENWIDTH)
REM FIRST PART
if @greater(@mouse(y),@fsub(%%screenY,48))
WINDOW POSITION,Mouse Pos,@fsub(@mouse(y),40),@fsub(@mouse(x),30),110,24
else
WINDOW POSITION,Mouse Pos,@fadd(@mouse(y),20),@fadd(@mouse(x),10),110,24
end
REM SECOND PART
rem if @greater(@mouse(x),@fsub(%%screenX,124))
rem WINDOW POSITION,Mouse Pos,@fsub(@mouse(x),40),@fsub(@mouse(x),30),110,24
rem else
rem WINDOW POSITION,Mouse Pos,@fadd(@mouse(x),20),@fadd(@mouse(x),10),110,24
rem end |
The first part of the code works great when you move you mouse up and down, but i can not get it to work left and right and also LEFT,RIGHT,UP and DOWN !
Any help would be great !
Nathan |
|