Sign in to follow this  
Followers 0
Wardio

Remote script not working!

5 posts in this topic

Ok, so am still having problems with my automation script for emulating button presses on a gui application... here's the script that i've written, was wondering if anyone could make it so i can run this without needing to be logged in (so on a remote machine without a gui interface?).

Am trying to run on a Windows server machine with a user logged in, but no display ( so i disconnect my remote desktop viewer basically)

WinActivate( WinGetHandle( $mainappname ) )

Send("!w")
Send("{DOWN}")
Send("{DOWN}")
Send("{ENTER}")

WinWaitActive (WinGetHandle("Automation Manager - All Teams"))

LogOut("Loaded Automation Manager")

;ControlSetText("Automation Manager - All Teams","",3802994,"11 / 11 / 2006   -   05 : 00 AM")

LogOut("Set Start Time and Date")
;set times to run script
Send("{TAB}")
Send("{TAB}")

;set startdate
Send(GetDay($date))
Send("{SPACE}")

Send(GetMonth($date))
Send("{SPACE}")

Send(GetYear($date))
Send("{SPACE}")

;set starttime
Send(GetHour($starttime))
Send("{SPACE}")

Send(GetMins($starttime))
Send("{SPACE}")

If (GetHour($starttime) <12) Then
    Send("AM")
EndIf

LogOut("Set End Time and Date")

Send("{TAB}")

;set enddate
Send(GetDay($date))
Send("{SPACE}")

Send(GetMonth($date))
Send("{SPACE}")

Send(GetYear($date))
Send("{SPACE}")

;set endtime
Send(GetHour($endtime))
Send("{SPACE}")

Send(GetMins($endtime))
Send("{SPACE}")

If (GetHour($starttime) <12) Then
    Send("AM")
EndIf

LogOut("Setting Reboot Options (Currently Reboot on Start, end and Disconnect)")
ControlClick($automationhandle,"","End")
ControlClick($automationhandle,"","Crash")

ControlClick($automationhandle,"","Load List")
WinWaitActive("Load Juice Script List")
LogOut("Loaded Load List Dialog")

ControlSetText("Load Juice Script List","",1148,$scriptlist)
Send("{ENTER}")

LogOut("Commiting Run")
;commit Run
ControlClick($automationhandle,"","Commit")

WinClose ($automationhandle)

Any Help much appreciated!!

Cheers,

Tom

Share this post


Link to post
Share on other sites



I didn't understand your script as it is basically just some keys being sent and mouse clicks. Try to go and figure out yourself what someone else is doing by just looking at the keyboard and mouse... It's impossible.

Anyway, if you are trying to acces controls on a different computer, you won't succeed unless you run the script on the computer. Else, if you are trying to write a trojan-like application that runs on a different computer, and can be activated by just sending a command from your computer. You should do research into autoit's TCP* functions.

Whatever you're trying to do, Good luck. :whistle:

Share this post


Link to post
Share on other sites

WinActivate( WinGetHandle( $mainappname ) )

if nobody is logged on and there is no gui, how do you explain that the application "Automation Manager - All Teams" is still running???

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

The user is still logged on on the box (where the app is being run) but there's no view of the desktop, i.e. the remote desktop that i had running is no longer there.

the script is being run locally on the machine intended, and is run periodically when i restart the main application. I then start this script which *should* set up a load of parameters in the window "Automation Manager - All Teams".

I know the script runs if remote desktop is open and not minimised, so the button presses/mouse clicks work ok. I'm just guessing that the commands i'm using are only workable on a machine that is logged in and with a display.

So really was wondering if anyone else has tried this before...

Tom

if nobody is logged on and there is no gui, how do you explain that the application "Automation Manager - All Teams" is still running???

Cheers

Kurt

Share this post


Link to post
Share on other sites

Try the Controlsend command instead.

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