Jump to content

Best way to make this pausable?


Recommended Posts

Hello dear forum,

I have tried several things but am now kind of stuck, so any tips/proposal is welcome.

My script, on Computer1, is opening a radmin window (a session) to administer Computer2. (remote administrator, similar to "Remote Desktop")

The script runs more or less endlessly, until i manually "pause" or "terminate" it (HotKeys for this atm).

Since the script is constantly busy working in the radmin window (mouse and keyboard inputs), the hotkeys don't work in the middle of a MouseMove() for example.

This is because the active window is the Radmin window, meaning all input controls (except ctrl alt del) is performed on Computer2.

My temporary solution is that my script, every 10 seconds, clicks somewhere outside the radmin window (on my Computer1 desktop) to unset focus, thus letting me pause or terminate the script with hotkeys.

I don't like this though, I want something smarter.

Ideas?

Thx

Link to comment
Share on other sites

  • 2 weeks later...

Upping post since I haven't been able to solve this..

I was thinking about using WinSetState() in some way..

Would it be possible to just unfocus my radmin window (same effect as clicking somewhere else on the desktop (not ALT+tabing)) with some command ?

I'd still appreciate any ideas here :\

Link to comment
Share on other sites

Upping post since I haven't been able to solve this..

I was thinking about using WinSetState() in some way..

Would it be possible to just unfocus my radmin window (same effect as clicking somewhere else on the desktop (not ALT+tabing)) with some command ?

I'd still appreciate any ideas here :\

rather than using send for sending to the radmin, are you able to use control sends and control clicks that do not need it to be the active window, or tie up your inputs?

***edit***

also you can use winactivate() or winsetstate() to change the active window

Edited by cameronsdad
Link to comment
Share on other sites

rather than using send for sending to the radmin, are you able to use control sends and control clicks that do not need it to be the active window, or tie up your inputs?

What do you mean?

also you can use winactivate() or winsetstate() to change the active window

Yeah, I can activate the radmin window with WinActivate() - but can i DeActivate (unfocus) it, and if so, how?

Thanks for the response anyway, more ideas?

Link to comment
Share on other sites

What do you mean?

the script that you have running that is tying up the input and windows, without seeing the script it's just speculation, but if you're using Send() and mouse movements, you can probably modify it to implement control send and control click so that it doesn't tie up your mouse and keyboard, and even operate in a hidden window so it wouldn't even clutter up your desktop.

Yeah, I can activate the radmin window with WinActivate() - but can i DeActivate (unfocus) it, and if so, how?

unfocus by using winactivate on any other window...
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...