ChrisL Posted April 3, 2008 Posted April 3, 2008 (edited) Thanks Martin, I'll check this out in a little while. Edit: Works like a charm.. Thank you Edited April 3, 2008 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
martin Posted May 3, 2008 Author Posted May 3, 2008 (edited) Small addition to UDF and dll. New function _PrinListPrinters returns a list of all the installed printers. Link in first post updated. Edited May 4, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
GRS Posted June 17, 2008 Posted June 17, 2008 Hey martin, I have been experimenting with your UDF and dll, it works great! I was wondering if you would post the sorce for your dll or if you could add the parameter for setting the angle of escapement of a font, and secondly a function for drawing round rectangles.
martin Posted June 17, 2008 Author Posted June 17, 2008 (edited) Hey martin, I have been experimenting with your UDF and dll, it works great! I was wondering if you would post the sorce for your dll or if you could add the parameter for setting the angle of escapement of a font, and secondly a function for drawing round rectangles.Glad you like it GRS.I'm not going to publish the source for the dll.The escapement is set in the last parameter of the function PrintText.Rounded corners for rectangles is a good idea. I'll add that. I can change the _PrintRectangle to have 2 more parameters which default to zero like this_PrintRectangle($hDll,$iTopx,$iTopy,$iBotx,$iBoty,$iCornerx=0,$iCornery=0)Then the corners will have elliptical curves from $iCornery above or below to $iCornerx left or right of the corner.EDIT. I decided not to change the _PrintRectangle function and instead added a function _PrintRoundedRectangle so that using the new dll with an old UDF won't cause a problem.Link to new UDF and dll added to first post. Edited June 17, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Michel Claveau Posted June 18, 2008 Posted June 18, 2008 Hi, Martin! I like your DLL. I use it from Python (and Batch, via Autoit); but I like it. Thanks.
megaflops Posted July 2, 2008 Posted July 2, 2008 Hi Martin, I tried to use this tool to create serial letters in PDF format. Now i have the problem that PDFCreator stops working after a few prints. Do you have any ideas? Also is there a possibility to add the PRINTFILE NAME? If i use autosave creating PDFs i have no chance to find the files without an identifier. Thanks Megaflops
martin Posted July 2, 2008 Author Posted July 2, 2008 Hi Martin,I tried to use this tool to create serial letters in PDF format. Now i have the problem that PDFCreator stops working after a few prints.Do you have any ideas?I don't know. Are you remembering to use _PrintEndPrint after finishing each document?Can you give a link to the PDFCreator you use if it's freeware and I'll test it. Also is there a possibility to add the PRINTFILE NAME? If i use autosave creating PDFs i have no chance to find the files without an identifier.ThanksMegaflopsI'll add a function _PrintSetTiltle which I hope will solve that problem. I won't be doing that until this weekend though. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
megaflops Posted July 3, 2008 Posted July 3, 2008 I don't know. Are you remembering to use _PrintEndPrint after finishing each document?Can you give a link to the PDFCreator you use if it's freeware and I'll test it. I'll add a function _PrintSetTiltle which I hope will solve that problem. I won't be doing that until this weekend though.Hi Martin,thanks for the fast response.1) Yes, I have _PrintEndPrint in the code. Also each document has just one page.2) I use the PDFCreator from http://www.pdfforge.org/ . Here some Autoit examples for the COM object http://www.autoitscript.com/forum/index.ph...p;hl=postscript3) I will wait for _PrintSetTiltle megaflops
martin Posted July 4, 2008 Author Posted July 4, 2008 (edited) Hi Martin,thanks for the fast response.1) Yes, I have _PrintEndPrint in the code. Also each document has just one page.2) I use the PDFCreator from http://www.pdfforge.org/ . Here some Autoit examples for the COM object http://www.autoitscript.com/forum/index.ph...p;hl=postscript3) I will wait for _PrintSetTiltle megaflopsA new version with _PrintSetDocTitle included in the UDF has been uploaded. See link in first post.I have tried PDFCreator and all seems OK. Can you tell me how you were using it to print several documents which produced the error? I don't see the reason for the link to the COM object because that is an alternative way to print without using my udf and dll. Edited July 4, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
megaflops Posted July 6, 2008 Posted July 6, 2008 A new version with _PrintSetDocTitle included in the UDF has been uploaded. See link in first post.I have tried PDFCreator and all seems OK. Can you tell me how you were using it to print several documents which produced the error? I don't see the reason for the link to the COM object because that is an alternative way to print without using my udf and dll.Hi Martin,thank you for that function. It works fine now. The problem with PDFCreator was mor or less because I used Vista. Now where I run my prog on WIN 2003 Server it works. However I need the posiblility to define the document name.The reason for using PDFCreator is that I have to create PDF files. So I will print to PDFC and than i use the COM object to generate postscript. megaflops
martin Posted July 6, 2008 Author Posted July 6, 2008 Hi Martin,thank you for that function. It works fine now. The problem with PDFCreator was mor or less because I used Vista. Now where I run my prog on WIN 2003 Server it works. However I need the posiblility to define the document name.The reason for using PDFCreator is that I have to create PDF files. So I will print to PDFC and than i use the COM object to generate postscript. megaflopsOK, glad it works. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
ChrisL Posted July 6, 2008 Posted July 6, 2008 Hi Martin, I made a small change to my copy of your printMGv2.au3 Func _PrintDllStart(ByRef $sErr, $vPath = 'printmg.dll') $hDll = DllOpen($vPath) If $hDll = -1 Then SetError(1) $sErr = 'Failed to open printmg.dll' Return -1;failed EndIf Return $hDll;ok EndFunc The reason for this was I wanted the dll in another location not in the root folder of my script and with this mod I could specify it as an option to put the dll else where. I thought I'd post here if anyone else wanted to do this! Chris [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
martin Posted July 6, 2008 Author Posted July 6, 2008 Hi Martin, I made a small change to my copy of your printMGv2.au3 Func _PrintDllStart(ByRef $sErr, $vPath = 'printmg.dll') $hDll = DllOpen($vPath) If $hDll = -1 Then SetError(1) $sErr = 'Failed to open printmg.dll' Return -1;failed EndIf Return $hDll;ok EndFunc The reason for this was I wanted the dll in another location not in the root folder of my script and with this mod I could specify it as an option to put the dll else where. I thought I'd post here if anyone else wanted to do this! Chris The udf will work as long as the dll is in the Windows folder, the script folder or one of the folders searched by windows in the PATH list. If none of those is suitable then your solution is needed. Since it won't affect any old scripts I've made your change to the UDF and I have replaced the current download. (I should have set up a new download and version but instead I'm off to bed!) Thanks ChrisL. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
MBrand Posted August 12, 2008 Posted August 12, 2008 Thank You for this handy udf & dll. I only have this one problem with them: It all works fine with the DefaultPrinter under W2K and also with _PrintSelectPrinter under WXPProf. But _PrintSelectPrinter with W2K doesn't work: the Printer receives the job but goes into some strange paper-out-error. I think this has to do with either _PrintSelectPrinter or with W2K , for the print (contents, size) is always the same. Any idea? Thanks Michael
martin Posted August 12, 2008 Author Posted August 12, 2008 Thank You for this handy udf & dll. I only have this one problem with them:It all works fine with the DefaultPrinter under W2K and also with _PrintSelectPrinter under WXPProf.But _PrintSelectPrinter with W2K doesn't work: the Printer receives the job but goes into some strange paper-out-error.I think this has to do with either _PrintSelectPrinter or with W2K , for the print (contents, size) is always the same.Any idea?ThanksMichaelIt seems that Win2000 has to have the default printer set in a different way so I expect that this is the cause of the problem. I've found out how it should be done and I'll try to get a version of the dll to allow for this written sometime during the next week. I'll pm you a copy when I've done it and I would be grateful if you could test it as I don't have access to W2K. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
MBrand Posted August 13, 2008 Posted August 13, 2008 It seems that Win2000 has to have the default printer set in a different way so I expect that this is the cause of the problem. I've found out how it should be done and I'll try to get a version of the dll to allow for this written sometime during the next week. I'll pm you a copy when I've done it and I would be grateful if you could test it as I don't have access to W2K.Thanks for the fast answer. I'm going to test your dll as soon as possible. In the meantime changing the default printer will do...(I hope)Michael
Michel Claveau Posted August 13, 2008 Posted August 13, 2008 (edited) Hi, Martin! How you know, I use your DLL with a Python's class, who wrapp PrintMG.dll. In the header of the (Python's class) source, I quoted, only, "Martin from autoit's forums". Because I have no others infos. Is it OK for you ? ** sorry for my bad english ** Edited August 13, 2008 by Michel Claveau
ProgAndy Posted August 13, 2008 Posted August 13, 2008 Could you add a function to return the Printer DC? *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
martin Posted August 13, 2008 Author Posted August 13, 2008 Could you add a function to return the Printer DC?Yes. I'll see if I can add it when I do the W2K thing. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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