Jump to content

Recommended Posts

Posted

The following code works fine with active Remote Desk Top:

WinActivate ("THRIVE PRODUCTION SERVER - Thrive")
Sleep(6000)
ControlFocus("THRIVE PRODUCTION SERVER - Thrive", "", "Button1")
Sleep(3000)
SEND("{LEFT}{ENTER}")
Sleep(6000)

But does not work when RDP session is locked.

Thank you in advance

  • Developers
Posted

Moved to the appropriate forum, as the AutoIt Example Scripts forum very clearly states:

Quote

Share your cool AutoIt scripts, UDFs and applications with others.


Do not post general support questions here, instead use the AutoIt Help and Support forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

You can't Send to a locked system, can you switch that Send to a ControlSend (note, you will need to get the control ID)?

Problem solving step 1: Write a simple, self-contained, running, replicator of your problem.

Posted (edited)

running scripts on a remote server from RDP can get complicated really quick if you have to disconnect.

This is an option I put out in the Example form, but I would suggest trying to update your script first so it only interacts directly with controls as SlackerAl suggested.  There are lots of issues interacting with windows too.

 

If you are able to leave the RDP session open the entire time, and it's just that the server is going to sleep, there are other options to force the server to stay active.

Edited by BigDaddyO
Posted (edited)

My ControlSend example below:

ControlSend("C:/Users/jfSmith/cpsi/edward.cpsinet.com/u03792/data_4/" & $sText,"","","^{F4}"

 

$sText is the file name

Edited by JohnTWI
Posted

Zedna

 

I am using a ControlSend on my locked workstation, but I am still not getting my desired result. Is the Syntax of my ControlSend correct?

Posted

Zedna

I tried this ControlSend("C:/Users/jfsmith/cpsi/edward.cpsinet.com/u03792/data_4/" & $sText,"","[CLASSNN:Edit1]","^{F4}")

And it did not work

Posted

Zedna

I tried this but it is not working, 

 

Func ClosePDF($hWnd, $iOnOff)
    Local Const $WM_SYSCOMMAND = 274
    Local Const $SC_CLOSE = 61808
    _SendMessage($hWnd, $WM_SYSCOMMAND, $SC_CLOSE, $iOnOff)
   If @error Then
        MsgBox($MB_SYSTEMMODAL, "_ClosePDF", "_SendMessage Error: " & @error)
   Exit
    EndIf
EndFunc

 

Thanks again for your help.

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
  • Recently Browsing   0 members

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