xcaliber13 Posted April 16, 2015 Share Posted April 16, 2015 I have a script that runs a program. Within that program a pdf file is generated and opened with Adobe Reader. The only way I can save that file is to use the generated name of the pdf file. Title of Adobe Reader Window = dsp20076.pdf - Adobe Reader The dsp20076.pdf file name changes with every run of the program. Is there a way to get the file name and than use it in: ControSend ("Save As", "", "[Class:Edit; INSTANCE:1]", "C:tempNAMEOFPDFFile.pdf") I am not sure on how to get the pdf file name in a string or variable. Thank you Link to comment Share on other sites More sharing options...
MikahS Posted April 16, 2015 Share Posted April 16, 2015 Local $WinTitle = WinGetTitle("Adobe Reader") ; or you can use "[ACTIVE]" if it is the active window Local $str = StringSplit($WinTitle, "-") MsgBox(0, "PDF filename", "The filename is: " & $str) Just an example on how to get the filename from the title. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now