Jump to content

Intellitree

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Intellitree

  1. After a quick look round I found many of those threads, they all said it was impossible. But I also saw references to logging in, running script, logging out. unfortunatly no one said how. It it possible to script a login to the pc. I know how to modify auto login after boot up but that is not what is needed. Any help greatly appreciated. If machine was locked could it detect the login window and send crtl_alt_del plus pass?
  2. I would like to learn hot to do this. it relate to problem am having in my script.
  3. After Throwing myself into the AutoIt world head first I've completed my first script (only took 8 hours). Now comes the problem. this script is to run on a windows 2003 server that is not generally left logged in. I coded the script using a remote desktop and tested it. It works perfectly. Now comes the hard part. How can I using 'Scheduled Tasks' or the 2003 equivelent execute this script. Included is the script itself (made websafe, most variables now empty) [ code ] ; #include <Date.au3> ; This is needed to manipulate the dates in the script Dim $Y, $M, $D, $xlsfile, $execpath, $mailprog, $cmd, $sqlname, $sqlpass, $smtpserver, $fromemail, $emailsendto, $toemailB, $subject, $message $execpath = "c:\msi\msi.exe" ; The report generation program $mailprog = "c:\msi\sendEmail.exe" ; A Tool for Sending SMTP Email from a Console. http://caspian.dotconf.net/menu/Software/SendEmail/ $xlsfile = "c:\msi\1542.xls" ;File name and path to save report to, this file is later emailed. $cmd = "c:\windows\system32\cmd.exe" ; Command interpreter $sqlname = "" ; Username used to login to mysql. $sqlpass = "" ; Password for the given user. $smtpserver = "" ; IP address of smtp server on network. Currently IP of SCN01. $fromemail = "" ; email address the email will be from, this email does not need to be valid. $emailsendto = "" ; Email List of comma seperated addresses to send to. One person is responsible for forwarding to Maritz. $subject = "" ; Subject line of Email. Can be anything. $message = "" ; Message of Email, this also can be anything. Run($execpath) AutoItSetOption("SendKeyDelay", 30) WinWaitActive("msi.rpt") Send("!O") WinWaitActive("Export") ControlClick("Export", "Format", 1) WinWaitActive("Choose Export File") Send("!n") Send("" & $xlsfile) Send("!S") Sleep(500) If WinExists("File already exists") Then Send("!Y") EndIf WinWaitActive("msi.rpt") ControlClick("msi.rpt", "Print", 451) WinWaitActive("Logon Parameters") ControlSend("Logon Parameters", "", 1003, "{DELETE 2}" & $sqlname) ControlSend("Logon Parameters", "", 1004, "" & $sqlpass) Sleep(500) ControlClick("Logon Parameters", "", 1) WinWaitActive("Enter Parameter Values", "Enter Beginning") WinMove("Enter Parameter Values", "Enter Beginning", 0, 0) $sJulDate = _DateToDayValue(@YEAR, @MON, @MDAY) $sJulDate = _DayValueToDate($sJulDate - 8, $Y, $M, $D) Send("" & $M) Sleep(500) Send("/" & $D) Sleep(500) Send("/" & $Y) Sleep(500) WinWaitActive("Enter Parameter Values", "Enter Beginning") MouseClick("left", 26, 60) Sleep(500) WinWaitActive("Enter Parameter Values", "Enter Ending") $sJulDate = _DateToDayValue(@YEAR, @MON, @MDAY) $sJulDate = _DayValueToDate($sJulDate - 1, $Y, $M, $D) MouseClick("left", 140, 200) Send("" & $M) Sleep(500) Send("/" & $D) Sleep(500) Send("/" & $Y) Sleep(500) MouseClick("left", 26, 70) WinWaitActive("Enter Parameter Values", "Enter Prop. ID") ControlSend("Enter Parameter Values", "Enter Prop. ID", 1001, "001542") ControlClick("Enter Parameter Values", "", 1) Sleep(10000) WinWaitActive("msi.rpt") Send("!D") ControlClick("msi.rpt", "Done", 2) Sleep(10000) Run($cmd) WinWaitActive("C:\WINDOWS\system32\cmd.exe") Send($mailprog & " -s " & $smtpserver & " -f " & $fromemail & " -t " & $emailsendto & " " - u " & $subject & " - m " & $message & " - a " & $xlsfile & " {ENTER}") Sleep(10000) Send("exit {ENTER}") [ /code ] ;
×
×
  • Create New...