Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Acrobat Reader Operations in the Background

$
0
0
Dear all,

I am using the Autoit to encrypt PDF files. I would like to open several pdf files one by one, encrypt them and save in another folder. I would like to limit the user actions during these operations. I have tried the method,

BlockInput(1)


but in this case, I cannot access to the acrobat reader menu by sending commands as the inputs are blocked. What can be an alternative in this case either to avoid user interaction or run this process in background? Can you provide me examples? Here is my code that basically opens a pdf file and saves in another folder.

O.S. : Windows XP Professional X64
Adobe Acrobat Reader X 10.0 Professional
Autoit: 3.3.8.0

#cs
Define Environment
#ce
;Debugingmodus wird aktiviert
AutoItSetOption("TrayIconDebug",1)
$acrobatPfad= "C:\Program Files\\Adobe\Acrobat 10.0\Acrobat\Acrobat.exe"

$d = 500 ;Delay between commands
$filepath = "Z:\2013\01_PDF_Schutz\Testdaten"
$file = "262000_____0000.pdf"
$fileopen = $filepath & "\" & $file
#cs
Start Acrobat Reader with file
#ce
$title = $file & " - Adobe Reader"
$handle = WinGetHandle("[CLASS:AcrobatSDIWindow]", "")
Run($acrobatPfad & " " & $fileopen)
sleep($d)
WinWaitActive($title)
Sleep($d)
Send("{ALT}")
Sleep($d)
Send("{DOWN}")
Sleep($d)
Send("{DOWN}")
Sleep($d)
Send("{DOWN}")
Sleep($d)
Send("{ENTER}")
Sleep($d)
Send($file & "_active.pdf")
Sleep($d)
Send("{ENTER}")
Sleep($d)
ProcessClose("AutoIt3.exe")


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>