ReFran Posted August 8, 2007 Share Posted August 8, 2007 (edited) Hi, AutoIT can not, but the WIN-filehandler can. So I used the fileassociation and Shellexecute(....,verb) to work with DDE. I set up an dde example how to open a PDF, print it and then close the application. It should work also with other applications. Because it is the first time I used RegWrite, perhaps someone can improve it or has some tips for writing it better. Thanks, Reinhard DIM $PdfDefault = "Adobe Acrobat 7.0 Document" DIM $PdfCommand ="" MsgBox(0,"Registry",GetDefaults()) MsgBox(0,"",$PDFDefault) RegistryWrite() ShellExecute("c:\Test.pdf","","","PrintDDETemp") Func GetDefaults() $PdfDefault = RegRead("HKEY_CLASSES_ROOT\.pdf","") $PdfCommand = RegRead("HKEY_CLASSES_ROOT\" & $PDFDefault & "\Shell\Open\Command","") return $PDFcommand EndFunc Func RegistryWrite() ;write the key RegWrite("HKEY_CLASSES_ROOT\" & $PDFDefault & "\Shell\PrintDDETemp");,"","REG_SZ","TestPrint") RegWrite("HKEY_CLASSES_ROOT\" & $PDFDefault & "\Shell\PrintDDETemp\command","","REG_SZ",$PdfCommand) RegWrite("HKEY_CLASSES_ROOT\" & $PDFDefault & "\Shell\PrintDDETemp\ddeexec","","REG_SZ","[FilePrintSilent(%1)][AppExit()]") RegWrite("HKEY_CLASSES_ROOT\" & $PDFDefault & "\Shell\PrintDDETemp\ddeexec\application","","REG_SZ","Acroview") RegWrite("HKEY_CLASSES_ROOT\" & $PDFDefault & "\Shell\PrintDDETemp\ddeexec\topic","","REG_SZ","Control") endFunc Edited August 8, 2007 by ReFran Link to comment Share on other sites More sharing options...
doudou Posted October 28, 2007 Share Posted October 28, 2007 (edited) II've just finished a generic UDF library for Windows DDE (client and server). Here: DDEML. Edited October 28, 2007 by doudou UDFS & Apps: Spoiler DDEML.au3 - DDE Client + ServerLocalization.au3 - localize your scriptsTLI.au3 - type information on COM objects (TLBINF emulation)TLBAutoEnum.au3 - auto-import of COM constants (enums)AU3Automation - export AU3 scripts via COM interfacesTypeLibInspector - OleView was yesterday Coder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Link to comment Share on other sites More sharing options...
ReFran Posted October 30, 2007 Author Share Posted October 30, 2007 II've just finished a generic UDF library for Windows DDE (client and server). Here: DDEML. Thanks for that. I tried it but don't get it to work. Could you give an example how to use it with reader. I think beside, Thema: "control", Topic: "Acroview", Cmd: '[FileOpen("C:\Test.pdf")]' I have to state the application: AcroRd32.exe. But I don't know where. Thanks in advance, Reinhard 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