Sign in to follow this  
Followers 0
megapacman

Autoit script and schedule task win xp

2 posts in this topic

#1 ·  Posted (edited)

hello,

i made an autoit script and when i launched it -> it's ok it run but when i launched it with schedule task of win xp nothing happened

I don't understand the problem, why it doen't run with schedule task of win xp

thx :whistle:

i don't think the pb is my script but .....

my code :

#include <ie.au3>
#include <date.au3>

dim $url
dim $oIE
dim $currentdate
dim $myday
dim $mymonth
dim $myyear
dim $myfile
dim $pathdest
dim $pathsource
dim $filedest
dim $filesource



;==================currentdate =========;

$currentdate =  @MDAY & "_" & @MON & "_" & @YEAR & "_" & @HOUR &"_" & @MIN & "_" & @SEC
$myfile="JC_stats_" & $currentdate

$pathdest="G:\ProdReports\"
$pathsource="H:\My Documents\"
$filedest=($pathdest & $myfile)
$filesource=($pathsource & $myfile)
;===================================================================================;

;==================Open IE============================================;
$url="http://dd2/stats/jc.php"

$oIE = _IECreate($url)

Sleep(4000)

;==================to log in guest =========================;
send("guest")
Send("{TAB}")
send("guest")
Send("{ENTER}")
;===================================================================================;
;================== stats page to print===========================;
$oIE = _IECreate($url)
Sleep(4000)
;===================================================================================;
;==================print page====================================;
Send("!F")
Send("P")
Sleep(2000)
Send("{ENTER}")
Sleep(2000)

Send($myfile)
Sleep(2000)
Send("{ENTER}")
Sleep(4000)

WinClose("Adobe Acrobat Professional - ["& $myfile &".pdf]")
Sleep(6000)
WinClose("Adobe Acrobat Professional - ["& $myfile &".pdf]")
WinClose("Current status of production of the DD 2007 - Microsoft Internet Explorer")
WinClose("DD2 Coordination system - Microsoft Internet Explorer")
Edited by megapacman

Share this post


Link to post
Share on other sites



Hmm very strange, I use many scheduled tasks and never had any problem. Did you enter some security credentials? (guess yes)

Could you post the contents of the task here? (Don't forget to strip out the user/pass ;-) )

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