ReFran 15 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 Share this post Link to post Share on other sites
doudou 5 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:DDEML.au3 - DDE Client + Server[*]Localization.au3- localize your scripts[*]TLI.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 yesterdayCoder's last words before final release: WE APOLOGIZE FOR INCONVENIENCEĀ Share this post Link to post Share on other sites
ReFran 15 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 Share this post Link to post Share on other sites