Sign in to follow this  
Followers 0
xcaliber13

Saving an Adobe Reader File

2 posts in this topic

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

Share this post


Link to post
Share on other sites



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 ~ getENVvars
My 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

 

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0