Jump to content
Sign in to follow this  
NileshSutar

Block mouse movement completely

Recommended Posts

NileshSutar

hi friends,

So i have a problem.When my script is runnig i want to block the user mouse MOVEMENT completely.Is there any function to block mouse MOVEMENT?

Share this post


Link to post
Share on other sites
TheSaint

There is or was a Block Input command, but I'm still searching for it in the help file.

You could lock control of Mouse &/or Keyboard if I remember right.

I use it in some scripts, but don't have them handy.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
TheSaint

It's just called BlockInput in the Misc. Management section of the Help file, and does both mouse and keyboard, not either or.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
Melba23

NileshSutar,

The BlockInput function is still there. ;)

M23


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Kidney

MouseGetPos() and also _MouseTrap()

MouseGetPos will return an Array of x and y coords

use _MouseTrap() with the x and y coords that MouseGetPos got you

Share this post


Link to post
Share on other sites
NileshSutar

MouseGetPos() and also _MouseTrap()

MouseGetPos will return an Array of x and y coords

use _MouseTrap() with the x and y coords that MouseGetPos got you

will that thing block user mouse movement not mousemove()??

Edited by NileshSutar

Share this post


Link to post
Share on other sites
Kidney

i believe it will lock the mouse in that position

Share this post


Link to post
Share on other sites
TheSaint

Odd that it wasn't listed in results when 'Block' was searched with. That happens every now and then ... quite annoying really, and probably why we get so many basic questions at the forum.

EDIT

Just discovered that Block* returns BlockInput as first result.

Obviously I (and probably many others) have gotten used to no longer using wild cards like the asterisk, in our Windows searches.

I could feel really dumb about this, but I blame Microsoft .... of course.  o:)  :P  ;)  :D

And also in my defense, there is a check box on the search page, which was enabled, that says similar words.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites
Trojan55

Try this :

HotKeySet("{F8}","bye")
$pos = MouseGetPos()
While 1
MouseMove($pos[0],$pos[1])
WEnd
Func bye()
Exit
EndFunc

Press F8 to exit 

Edited by Trojan55

Share this post


Link to post
Share on other sites
TheSaint

BlockInput(1) is so much simpler, if you aren't requiring the keyboard to be used during the period of Mouse blocking.

BlockInput(0) to restore Mouse & Keyboard use.

You can still code for Keyboard and Mouse use during that period, using Send and MouseMove.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×