Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto password fill-in for Adobe documents
Message
De
03/05/2011 14:48:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01509115
Message ID:
01509270
Vues:
60
>>I am trying to open a password protected pdf document from Visual foxpro dynamically.
>>
>>I know the password - but I want the application to send the password programmatically without user interface.
>>
>>Right now I am using this kind of code :
>>
>>declare INTEGER ShellExecute in shell32 INTEGER handle, STRING @ oper, ;
>> STRING @ ifile, STRING @ iparam, STRING @ ipath, INTEGER showcmd
>>
>>lcFileName = "c:\temp\document0.pdf"
>>=shellexecute(0,"open",lcFileName,"anypassword","c:\",1)
>>
>>This works fine for normal Pdf documents but the argument "anypassword" doesn't work here. It continues to alert the user to enter a password.
>>
>>Has anyone tried this?
>>
>>- Pablo
>
>Not sure if the password are accepted as parameter.
>Try to send it after the document is opened.
>Not sure if this will work:
>
>...
>IF shellexecute(0,"open",lcFileName,"","c:\",1) > 32
>   oWS =  CreateObject("WScript.Shell")
>   oWs.SendKeys([anypassword])
>ENDIF
>
Thank you Borislav for the attempt. Unfortunately it didn't work. It seems that Adobe suspends execution until you type in a password.
Not sure how to get around this.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform