Jump to content
Sign in to follow this  
ZiggyStardust

Blocking User Mouse Input yet being able to use MouseClick()

Recommended Posts

ZiggyStardust

I am stuck. I am trying to block the users from using the mouse yet in this script I need to make extensive use of Mouseclick()

I am using BlockInputEx to block the mouse but it also blocks MouseClick(). I can unblock the mouse long enough to do a MouseClick() and then re-block it but the users have found out that in the brief moment between un-blocking and re-blocking they have control of the mouse. Any ideas?

Share this post


Link to post
Share on other sites
Kidney

Make the mouseclicks instant? You should be able to unblock, instant click, then re block.

EDIT

Do you have #requireadmin ? If so, you should be able to do mouse clicks with the blockinput enabled.

Edited by Kidney

Share this post


Link to post
Share on other sites
ZiggyStardust

That seems to be the problem. Out of all the threads I have started about BlockInputEx I have gotten absolutely zero replies. After first looking at BlockInputEx my first thought was "what a wonder udf". After months of no replies either in the General area or in the BlockInputEx thread I am getting a bad feeling that no one uses it and it is obsolete. Has it been replaced with something "new and improved"?

Share this post


Link to post
Share on other sites
water

I think blocking keyboard or mouse isn't the best way to keep users from doing "bad" things. You mentioned the application you want to control to be a "commercial package".

I would suggest to give your users only permissions they need to have. So your "control script" should become obsolete.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-01-27 - Version 1.3.3.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
Melba23

ZiggyStardust,

I chided you gently here about the number of threads you have opened on this topic and now I find you have started yet another. :)

If no-one is answering it is because no-one knows the solution or no-one is interested enough to work on it. Remember that what is important to you is not necessarily so to others - and also that you paid nothing to use AutoIt or to post here, so no-one here has any obligation to offer you any help at all.

I will make myself absolutely clear this time - do NOT open another thread on this subject or you will not be able to open any threads at all for a while. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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
martin

Search for MouseSetOnEvent_UDF.au3.

Here is an example of stopping mouse movement for 8 seconds

#include "MouseSetOnEvent_UDF.au3"

;Disable mouse moves, and call our function when mouse would have moved
_MouseSetOnEvent($MOUSE_MOVE_EVENT, "MouseMove_Event")
Sleep(8000)
_MouseSetOnEvent($MOUSE_MOVE_EVENT) ;Enable mouse move again.


;more code?

Func MouseMove_Event()
   ;something?
EndFunc

The mouse event udf is

Edited by martin

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
Mechaflash

May I suggest only disabling controls (buttons, input boxes etc) and not disabling all user input. If for some reason the script hangs or goes into an infinite loop during this, the user is unable to do anything. Of course you can just hit ctrl+alt+del and it will free the controls back up, but if we're talking about a true "User", they wouldn't know to do that.


Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

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  

×