forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


how to disable mouse clicks????
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Fri Apr 11, 2003 11:07 pm    Post subject: Reply with quote

well i don't know how you can fix it unless you can write dll's Smile

all i want to do is lock the mouse so the user can't uses there mouse buttons intill i say so Smile and have it work in xp and 98...hehheehe


thanks

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 10:21 am    Post subject: Reply with quote

I think the easiest thing is to make a dialog and place it at the position of the mouse with the use of @mousepos()... That way it is impossible to click, until you close the dialog...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 12, 2003 12:24 pm    Post subject: Reply with quote

That's a great idea, Skit!

Perhaps something like this:

Code:
parse "%x;%y",@mousepos(x|y)
dialog create,Mouse-Disabler,%y,%x,1,1,COLOR BLACK,ONTOP,NOTITLE,CLASS MouseDisablerDot
dialog show
:evloop
wait event,0
goto @event()
:timer
parse "%x;%y",@mousepos(x|y)
dialog setpos,,%y,%x
window ontop,#MouseDisablerDot
goto evloop

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 2:17 pm    Post subject: Reply with quote

Your way does work, but if you move your mouse real fast you can still click. The best way to do this is to use as less lines of code as possible...

Code:
dialog create,Mouse-Disabler,@mousepos(y),@mousepos(%x),1,1,COLOR BLACK,ONTOP,NOTITLE,CLASS MouseDisablerDot
dialog show

:evloop
dialog setpos,,@mousepos(y),@mousepos(x)
window ontop,#MouseDisablerDot
goto evloop

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 12, 2003 2:33 pm    Post subject: Reply with quote

However, that way will make 100% processor usage. Using a TIMER will
not make 100% processor usage.

So maybe something like:

Code:
dialog create,Mouse-Disabler,@mousepos(y),@mousepos(%x),1,1,COLOR BLACK,ONTOP,NOTITLE,CLASS MouseDisablerDot
dialog show
:evloop
wait event,0
goto @event()
:Timer
dialog setpos,,@mousepos(y),@mousepos(x)
window ontop,#MouseDisablerDot
goto evloop

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 2:35 pm    Post subject: Reply with quote

I can still click on the Stop button in the VDS IDE... Wink
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 2:37 pm    Post subject: Reply with quote

Maybe this will do...

Code:
option decimalsep,.

%x = 0
dialog create,Mouse-Disabler,@mousepos(y),@mousepos(%x),1,1,COLOR BLACK,ONTOP,NOTITLE,CLASS MouseDisablerDot
dialog show

:evloop
dialog setpos,,@mousepos(y),@mousepos(x)
window ontop,#MouseDisablerDot
%x = @succ(%x)
if @equal(%x,100)
  wait 0.001
  %x = 0
  end
goto evloop

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 12, 2003 2:42 pm    Post subject: Reply with quote

Hmmm... Maybe we need to make the size of the dialog larger? I can still
click the stop button in the IDE.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 2:45 pm    Post subject: Reply with quote

It's worth the try... How about making it 1500 x 1500 ? Laughing
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 12, 2003 2:46 pm    Post subject: Reply with quote

lol Laughing

What about this:

Code:
option decimalsep,.

%x = 0
  DIALOG CREATE,New Dialog,@diff(@mousepos(y),20),@diff(@mousepos(x),20)),180,40,COLOR WHITE,NOTITLE,ONTOP
  DIALOG ADD,STYLE,BIG,,12,B,,
  DIALOG ADD,GROUP,WaitGroup,0,0,180,40
  DIALOG ADD,TEXT,TEXT1,15,55,,,Working...,,BIG
  DIALOG SHOW

:evloop
dialog setpos,,@diff(@mousepos(y),20),@diff(@mousepos(x),20)
window ontop,#MouseDisablerDot
%x = @succ(%x)
if @equal(%x,100)
  wait 0.001
  %x = 0
  end
goto evloop

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 3:00 pm    Post subject: Reply with quote

It is a good idea to make something like that... Maybe it's even possible to animate it a bit, so people see they can't do something...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Apr 12, 2003 6:46 pm    Post subject: Reply with quote

FreezingFire - that last code you posted workes really well BUT how to make it so it will only run 60secs or so...then have it go back to normal when the time is up?


thanks


p.s it works good on 98se havent tried XP yet tho

_________________
Have a nice day Smile
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat Apr 12, 2003 6:51 pm    Post subject: Reply with quote

Save the time in seconds, and repeat the code until the number of seconds is the same...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
tim6389
Professional Member
Professional Member


Joined: 01 Aug 2002
Posts: 790

PostPosted: Sat Apr 12, 2003 6:55 pm    Post subject: Reply with quote

Skit3000 - I kind of follow you BUT its there other way to have it do that instead of having it write a file for it? ( if is this what you mean)
_________________
Have a nice day Smile
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Apr 12, 2003 6:56 pm    Post subject: Reply with quote

Well I tested it on Windows XP Professional.

Here's some code that will run it for a specified amount of time:

Code:
option decimalsep,"."
%%seconds = 6
%x = 0
  DIALOG CREATE,Please wait...,@diff(@mousepos(y),20),@diff(@mousepos(x),20)),180,40,COLOR WHITE,NOTITLE,ONTOP,CLASS TPWaitWndClass
  DIALOG ADD,STYLE,BIG,,12,B,,
  DIALOG ADD,GROUP,WaitGroup,0,0,180,40
  DIALOG ADD,TEXT,TEXT1,15,55,,,Working...,,BIG
  DIALOG SHOW

%%start_time = @datetime(hhnnss)
%%end_time   = @fadd(@datetime(hhnnss),%%seconds)
 
:waitloop
dialog setpos,,@diff(@mousepos(y),20),@diff(@mousepos(x),20)
window ontop,#MouseDisablerDot
%x = @succ(%x)
if @equal(%x,100)
  wait 0.001
  %x = 0
end
if @greater(@datetime(hhnnss),%%end_time)
goto YourLoop
end

goto waitloop

:YourLoop
REM -- You must hide the dialog; it will be destroyed when the script exits --
window hide,#TPWaitWndClass
info You can continue with your program here...@cr()Note that you might need to use DIALOG SELECT after this code depending on the situation
exit


It still might need a bit of work though.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group