If anyone could help out, maybe clean it up for me, im a basic user, and I appreciate the help from everyone.
Basically i have three things open, basically its just going back and forth and cycling through, printing settlements.
Excel - Copy cell data to paste in another program, move onto the next row to get ready for copy again.
Agrosoft - Program - Paste from Excel and Run program
FOXIT - PDF prints to FOXIT and use the same Paste from Excel for file name
FOXIT - Wait for PDF to print to screen
Repeat from first input box entry
Im getting an error on the bottom section where i want to try and wait for the PDF file is created. But don't know how to get my file name in there...
Winwait, % Settle.pdf - Foxit PDF Editor ahk_class classFoxitPhantom
Current Code
Code: Select all
InputBox, Setts, Settlements, Please Enter Number of settlements to process, 320, 240
if ErrorLevel
{
Return
}
Else
Loop, % Setts
{
;; ------------EXCEL-----------------
WinActivate, Settlements - Excel ahk_class XLMAIN
Sleep 1000
Send {f2}
Send {shift down}
Send {home}
Send {Shift up}
Sleep 50
Send ^c
Clipboard :="Settle"
Send {Enter}
Sleep 500
;; ----------AGROSOFT-------------
Winactivate, Agrosoft-Production ahk_class FNWND3170
Sleep 500
Click 721 194 ;; Reprint One Settlement
Sleep 50
Send {shift down}{left 10}{shift up}
Send {delete}
Send {shift down}{Right 10}{shift up}
Send {delete}
Sleep 200
Send % Settle ;; Paste in Agrosoft
Sleep 250
Send {Ctrl Down}u
Send {Ctrl Up}
Sleep 1000
;; -------FOXIT----------
WinWait, Print to PDF Document - Foxit PDF Editor Printer ahk_class #32770
Sleep 250
Send % Settle
Sleep 500
Send {Enter}
Sleep 2000
;; ------FOXIT----------
Winwait, % Settle.pdf - Foxit PDF Editor ahk_class classFoxitPhantom
}
}
Return