maksim Posted July 8, 2007 Posted July 8, 2007 The current code is below. The SHAW_annual.txt file that it picks up is changing the name of it to shaw_(current date). How do I change the code so that it picks up the file with a different name each day? CODESplashTextOn, 350, 150, Creating text file..., Creating text file, please wait. sleep,500 Goto,StartFileCreation StartFileCreation: WinActivate,Microsoft Excel WinWaitActive,Microsoft Excel Sleep,500 Send,^a Sleep,500 Send,^c Sleep,2000 Run,C:\\WINNT\\system32\\notepad.exe Sleep,500 WinActivate,Untitled - Notepad WinWaitActive,Untitled - Notepad Send,^v Sleep,500 Send,^s Sleep,500 SetKeyDelay,2 Send,J:\\Public\\Eclipse\\SHAW_annual.txt Sleep,500 Send,{Enter} Sleep,500 Send,y Sleep,500 Send,{Alt}{Down},x SplashTextOff SplashTextOn, 350, 150, Creating Email - please wait..., Please wait until file(s) are attached, then complete email and send it. sleep,1500 SetTitleMatchMode, 2 IfWinExist,Lotus Notes,,goto,StartEmail StartEmail: sleep,300 WinActivate,Lotus Notes sleep,100 IfWinExist,Lotus Notes,You have new mail,WinClose,Lotus Notes,You have new mail sleep,200 IfWinExist,Lotus Notes,You have new mail,WinClose,Lotus Notes,You have new mail repeat,5 WinActivate,Lotus Notes IfWinActive,Lotus Notes,,Send,^m sleep,500 IfWinExist,New Memo,,goto,DoEmail sleep,400 endrepeat DoEmail: IfWinExist,Lotus Notes,You have new mail,WinClose,Lotus Notes,You have new mail WinWaitActive,New Memo sleep,500 IfWinExist,Lotus Notes,You have new mail,WinClose,Lotus Notes,You have new mail WinWaitActive,New Memo SetKeyDelay,2 Send,data@gpqs.com{TAB} Send,{TAB} Send,{TAB} Send,Eclipse Data Request{TAB} Send,{Enter} Send,This is an automated email. Please do not respond. Send,{Enter}{Enter} Send,{ALT}FA Send,J:\\Public\\Eclipse\\SHAW_annual.txt Send,{Enter}{Enter} Sleep,250 Send,{Enter}{Enter} SplashTextOff WinWaitClose,New Memo
Recommended Posts