Jump to content

maksim

Members
  • Posts

    5
  • Joined

  • Last visited

maksim's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Is this correct now? PsaltyDS, thanks for your help CODE; V2.64 to V3.0.100 (Version 1.0.6) ; Converted with AutoItV2toV3 [Version 1.0.6] ; © Copyright 2004 J-Paul Mesnage. ; Prologue ; should be renamed (?) and called somewhere if you are converting an include file __init() ; End Prologue SplashTextOn ( 'Creating text file...', 'Creating text file, please wait.', 350, 150 ) Sleep ( 500 ) * Warning MUST BE CHECKED MANUALLY Gosub, StartFileCreation Func 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 ) AutoItSetOption ( "SendKeyDelay", 2 ) c Sleep ( 500 ) Send ( '{Enter}' ) Sleep ( 500 ) Send ( 'y' ) Sleep ( 500 ) Send ( '{Alt}{Down},x' ) SplashOff ( ) SplashTextOn ( 'Creating Email - please wait...', 'Please wait until file(s) are attached, then complete email and send it.', 350, 150 ) Sleep ( 1500 ) AutoItSetOption ( "WinTitleMatchMode", 2 ) if NOT WinExists ( 'Lotus Notes', '' ) then endif ; StartEmail Sleep ( 300 ) WinActivate ( 'Lotus Notes' ) Sleep ( 100 ) if WinExists ( 'Lotus Notes', 'You have new mail' ) then WinClose ( 'Lotus Notes', 'You have new mail' ) endif Sleep ( 200 ) if WinExists ( 'Lotus Notes', 'You have new mail' ) then WinClose ( 'Lotus Notes', 'You have new mail' ) endif for $__n1_ = 1 to 5 WinActivate ( 'Lotus Notes' ) if WinActive ( 'Lotus Notes', '' ) then Send ( '^m' ) endif Sleep ( 500 ) if NOT WinExists ( 'New Memo', '' ) then Sleep ( 400 ) next endif ; DoEmail if WinExists ( 'Lotus Notes', 'You have new mail' ) then WinClose ( 'Lotus Notes', 'You have new mail' ) endif WinWaitActive ( 'New Memo' ) Sleep ( 500 ) if WinExists ( 'Lotus Notes', 'You have new mail' ) then WinClose ( 'Lotus Notes', 'You have new mail' ) endif WinWaitActive ( 'New Memo' ) AutoItSetOption ( "SendKeyDelay", 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' ) $FileName = "J:\\Public\\Eclipse\\SHAW_" & @YEAR & @MON & @MDAY & ".txt" Send($FileName) Send ( '{Enter}{Enter}' ) Sleep ( 250 ) Send ( '{Enter}{Enter}' ) SplashOff ( ) WinWaitClose ( 'New Memo' ) ; Epilogue Extra Functions needed for Compatibility execution ; take care of possible redefinition if you are converting an include file ; func __init () ; to define global variables needed endfunc ; End Epilogue
  2. Coverted to V3. More chance getting help here. hehe CODE; V2.64 to V3.0.100 (Version 1.0.6) ; Converted with AutoItV2toV3 [Version 1.0.6] ; © Copyright 2004 J-Paul Mesnage. ; Prologue ; should be renamed (?) and called somewhere if you are converting an include file __init() ; End Prologue SplashTextOn ( 'Creating text file...', 'Creating text file, please wait.', 350, 150 ) Sleep ( 500 ) * Warning MUST BE CHECKED MANUALLY Gosub, StartFileCreation Func 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 ) AutoItSetOption ( "SendKeyDelay", 2 ) Send ( 'J:\Public\Eclipse\SHAW_annual.txt' ) Sleep ( 500 ) Send ( '{Enter}' ) Sleep ( 500 ) Send ( 'y' ) Sleep ( 500 ) Send ( '{Alt}{Down},x' ) SplashOff ( ) SplashTextOn ( 'Creating Email - please wait...', 'Please wait until file(s) are attached, then complete email and send it.', 350, 150 ) Sleep ( 1500 ) AutoItSetOption ( "WinTitleMatchMode", 2 ) if NOT WinExists ( 'Lotus Notes', '' ) then endif ; StartEmail Sleep ( 300 ) WinActivate ( 'Lotus Notes' ) Sleep ( 100 ) if WinExists ( 'Lotus Notes', 'You have new mail' ) then WinClose ( 'Lotus Notes', 'You have new mail' ) endif Sleep ( 200 ) if WinExists ( 'Lotus Notes', 'You have new mail' ) then WinClose ( 'Lotus Notes', 'You have new mail' ) endif for $__n1_ = 1 to 5 WinActivate ( 'Lotus Notes' ) if WinActive ( 'Lotus Notes', '' ) then Send ( '^m' ) endif Sleep ( 500 ) if NOT WinExists ( 'New Memo', '' ) then Sleep ( 400 ) next endif ; DoEmail if WinExists ( 'Lotus Notes', 'You have new mail' ) then WinClose ( 'Lotus Notes', 'You have new mail' ) endif WinWaitActive ( 'New Memo' ) Sleep ( 500 ) if WinExists ( 'Lotus Notes', 'You have new mail' ) then WinClose ( 'Lotus Notes', 'You have new mail' ) endif WinWaitActive ( 'New Memo' ) AutoItSetOption ( "SendKeyDelay", 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}' ) SplashOff ( ) WinWaitClose ( 'New Memo' ) ; Epilogue Extra Functions needed for Compatibility execution ; take care of possible redefinition if you are converting an include file ; func __init () ; to define global variables needed endfunc ; End Epilogue
  3. Hi, Thanks. I have reposted it in V2 section
  4. 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
  5. 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
×
×
  • Create New...