Jump to content

script running on locked pc


aria
 Share

Recommended Posts

Hi guys, I did search for more info on this topic, but the approaches suggested havent worked. So I had to start a new thread.

I have uTorrent running at home, & I want to keep it running, while the computer is locked. My ISP is known to disconnect users every 3-4 hours, and thus I have to reconnect. To make matters worse, they deliberately block offered ppoe services for a few minutes to make sure that automatic redialing does not work.

I've already written a script to fix all this, though it does not work if the pc is locked.

More specifically there are two parts that I cant fix --

1. I run raspppoe at the command line, click the 'query available services offered' so that I can proceed with invoking the dialer.

How do I send a click to this button??

I've tried this --

WinActivate ( "No Service Offers" )

ControlSend ( "No Service Offers", "", 2, "{ENTER}" )

This doesnt work, while the simple Send doesnt work either.

Is there a way to do this??

-----------------

2. The same problem exists for updating the tracker for the selected torrents. This is in uTorrent. This doesnt work ----

ControlFocus ("Torrent", "", 27)

ControlListView ( "Torrent", "", 27, "SelectAll")

Send("{APPSKEY}")

Send ("{DOWN 14}")

Send ("{ENTER}")

Yes, I have tried ControlSend too, but it gets stuck when trying to send the APPSKEY.

--------------

I hope someone can help me to get around these issues! Please note once again that everything works great if the computer is not locked. But once locked, all this fails & the script pauses.

~cheers!!

:P

Edited by aria
Link to comment
Share on other sites

You need to use function that do not need active windows.

Like:

WinWait()

Control*() functions

...

...

etc

WinWaitActive(), WinActivte(), Send() and Mouse*() function are useless for locked computers as you cannot interact as you can on an active desktop.

:P

Link to comment
Share on other sites

The curious thing is that if the script invokes raspppoe, using ControlSend works, though it does not work if the raspppoe window already exists (being created outside the script)

-----------

The other question is about sending the APPSKEY via ControlSend. This does not work ? The code is --

WinSetState ( "Torrent", "", @SW_SHOW )

ControlListView ( "Torrent", "", 27, "SelectAll")

ControlSend ( "Torrent", "", 27, "{APPSKEY}" )

The ControlListView works fine, but the APPSKEY part doesnt.

Edited by aria
Link to comment
Share on other sites

Hi, yes I tried that. It still does not work when the raspppoe window was present before the script started. Anyway I can bypass that because I let the script create raspppoe & work with it. So its not a problem anymore.

The other important question remains ---

Is it possible to send an APPSKEY with a ControlSend. If not, how do I write code for the equivalent that must run inside a locked computer ??

Edited by aria
Link to comment
Share on other sites

  • Moderators

I assume that since you're asking that question, You've tried that as well?... If so, "how" did you try it?

ControlSend('RASPPPOE', '', 'Button1', '{APPSKEY}')
?

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

I assume that since you're asking that question, You've tried that as well?... If so, "how" did you try it?

ControlSend('RASPPPOE', '', 'Button1', '{APPSKEY}')
?
Here, this just selects all the torrents in the details window, its the last command that wont work -->

Opt("WinTitleMatchMode", 2)

ControlListView ( "Torrent", "", 27, "SelectAll")

ControlSend ( "Torrent", "", 27, "{APPSKEY}" )

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...