Sign in to follow this  
Followers 0
Orgins

Is there a way to lock the mouse to a

5 posts in this topic

#1 ·  Posted (edited)

Is there a way to lock the mouse to a inputbox? Or just prevent any other windows/files being opened while its waiting for the input?

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Share this post


Link to post
Share on other sites



For the input box, I suggest using this:

$text = InputBox("test", "Please type in the secret code")
$bLoop = 1
While $bLoop = 1
    If $text = "secret code" Then
        $bLoop = 0
    Else
        $text = InputBox("test", "Please type in the secret code")
    EndIf
    Sleep(25)
WEnd

And you could use stuff like ProcessExists, ProcessClose, WinExists, WinClose, etc. Keep in mind that the end user will always be able close the script easily, if you are trying to create something malicious, stop right now.

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

_MouseTrap() can trap the mouse to specific coords.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

*Huge eye* I swear I read all the commands many times and I never once saw that.

Anyways I ended up editing the code to were it didn't use a inputbox next time I'll use _MouseTrap() for sure.


I'm a newbie.Sorry if I don't reposed to your replays very fast.

Share this post


Link to post
Share on other sites

*Huge eye* I swear I read all the commands many times and I never once saw that.

Anyways I ended up editing the code to were it didn't use a inputbox next time I'll use _MouseTrap() for sure.

Funny how the answers to things are always right in front of us... as much as I use AutoIt I get reminded sometimes daily reading other threads of functions I didn't even know existed, that would have saved me tons of time on ones I wrote that did the same exact thing.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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  
Followers 0