Jump to content

autoit script doesn't work remotely


khris
 Share

Recommended Posts

Hi, I write following script:

While 1
    If WinExists("Windows Security") Then
   WinSetState("Windows Security","",@SW_SHOW)
        WinActivate("Windows Security")
        WinWaitActive ("Windows Security", "" ,30)
        ControlClick ("Windows Security", "", "Cancel")
        Exit
    EndIf
    Sleep(1000)
Wend
 
It clicks on security window which appears after I navigate to special url address. This script works perfect on my local pc. And it works on remote machine than I'm logged in and it is in the full screen. As soon as I minimize window with remote machine script doesn't work.
 
I run autoit script from java on local machine like:
 Runtime.getRuntime().exec("C:windows_security.exe");
 
And I run it on remote machine from java like:
   Robotil robotil = new Robotil("ip_of_remote_machine", 6666);
   robotil.invokeApplication("C:autosctipt.exe");
 
Could someone advise me how make this script run on remote machine then it is monimize and even then I am not logged in?
Link to comment
Share on other sites

you could try with WinKill

While 1
    If WinExists("Windows Security") Then
        WinKill("Windows Security")
        ; WinSetState("Windows Security", "", @SW_SHOW)
        ; WinActivate("Windows Security")
        ; WinWaitActive("Windows Security", "", 30)
        ; ControlClick("Windows Security", "", "Cancel")
        Exit
    EndIf
    Sleep(1000)
WEnd

.. good luck...

bye

 
edit:
Edited by PincoPanco

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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