Jump to content

"Springing" the mouse trap...


Recommended Posts

I suppose if there is no function to remove mouse-trap, you can set it to the desktop dimensions, but that's an... um... improper... way of programming (at least the programming languages I come from).... but is there a way to un-set the trap? Spring it in a sense of words?

Link to comment
Share on other sites

  • Moderators

I suppose if there is no function to remove mouse-trap, you can set it to the desktop dimensions, but that's an... um... improper... way of programming (at least the programming languages I come from).... but is there a way to un-set the trap? Spring it in a sense of words?

The demonstration in the helpfile shows you how to "untrap" it...

_MouseTrap(coords) = Trap

_MouseTrap() = UnTrap (Notice there is nothing in the params)

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.

Link to comment
Share on other sites

Helpfile? There's a help file for this? I have tried searching the AutoIt Help file for Mouse Trap and couldn't find anything... where is this help file?

Edit: Found it! UDF's! This should make life easier... wahoo!

Edited by Tasmania
Link to comment
Share on other sites

Just click the Header of the Window and move it, it untraps the mouse, atleast for me it does.

Yes, that's not exactly what I meant.. I've got it with _MouseTrap(), which is exactly what I wanted, however I also didn't want my users to be able to "spring" it themselves like that, so I disabled access to the header of the window via mouse :)

I'm evil...

Link to comment
Share on other sites

Yes, that's not exactly what I meant.. I've got it with _MouseTrap(), which is exactly what I wanted, however I also didn't want my users to be able to "spring" it themselves like that, so I disabled access to the header of the window via mouse ;)

I'm evil...

lol, you are :)

[font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version

Link to comment
Share on other sites

  • Moderators

Just FYI, ctrl+alt+delete is going to "untrap" it as well.

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.

Link to comment
Share on other sites

Hehe yeah, that I hope for. Actually, any command that takes focus away from the window "untraps" it, oddly enough, but I suppose that's inevitable. I could make sure it has focus and put a while in like so:

While WinNotActive("Notes")
  WinActivate("Notes")
WEnd

But that's just... so... so mean... and really, the people who will be running it won't have that much knowledge in computers anyway... hehe, so it's kinda unneccessary.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...