Sign in to follow this  
Followers 0
khris

autoit script doesn't work remotely

2 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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
1 person likes this

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0