Ármányos Kő Posted October 10, 2006 Share Posted October 10, 2006 Oh, thanks. I will see this also. Looks this is even closer to my program style. Guys, I amazed of today! Thanks. Link to comment Share on other sites More sharing options...
ptrex Posted October 23, 2006 Share Posted October 23, 2006 @BigDaddyI have a problem in your script on line 246 when using the Word UDF together with the Excel UDF.The problem seems to be the Error handler that is conflicting.I added a an COM error handler in the script for Excel because the UDF does not have one in it yet.But than running the 2 UDF in 1 script it gives an error in your UDF line 246.You can run my example script tp see what is happening.http://www.autoitscript.com/forum/index.php?showtopic=34865regardsptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted October 23, 2006 Author Moderators Share Posted October 23, 2006 @ptrex - I would suggest using the Word.au3 error handler for both UDFs. There are functions within Word.au3 that have to register its internal error handler. If it is unable to do so it will give an error, and the function will not continue. Being that you can only have one error handler active at the same time you can either do as suggested above or deregister and register each as they are needed. Link to comment Share on other sites More sharing options...
ptrex Posted October 23, 2006 Share Posted October 23, 2006 @big_daddyI would suggest using the Word.au3 error handler for both UDFs. I can' t see how I can use your Error handler for both UDF's. Can you give me an example on how to do so ?thanksptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted October 23, 2006 Author Moderators Share Posted October 23, 2006 @ptrex - Just add _WordErrorHandlerRegister() toward the top of your script. #include <Word.au3> #include <ExcelCom_UDF.au3> _WordErrorHandlerRegister() $oWordApp = _WordCreate() $oExcel = _ExcelBookNew() Link to comment Share on other sites More sharing options...
ptrex Posted October 23, 2006 Share Posted October 23, 2006 @big_daddy Works great !! The only thing is, your Error handler writes to the stdout window. While the usual COM Error give some popup messages. Does your Error handler write to the CMD box if the scripts are compiled ? Thanks ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted November 3, 2006 Author Moderators Share Posted November 3, 2006 @big_daddy Works great !!The only thing is, your Error handler writes to the stdout window.While the usual COM Error give some popup messages.Does your Error handler write to the CMD box if the scripts are compiled ?ThanksptrexSorry for the late reply.It wouldn't be proper for a UDF Library to have popup error messages. If you need this functionality then check the return values the same as you would for any other AutoIt Function. Link to comment Share on other sites More sharing options...
jftuga Posted January 26, 2007 Share Posted January 26, 2007 How can I get the UDF to print from a certain paper tray? Instead of 'Automatically selected', I want it to print from 'Tray 1'. Thanks, -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted January 26, 2007 Author Moderators Share Posted January 26, 2007 As far as I can tell this can't be done from Word because it's a printer option rather than a Word option. Link to comment Share on other sites More sharing options...
ptrex Posted January 26, 2007 Share Posted January 26, 2007 @big_daddy I don' t think you are correct here !! Windows uses the principle of CASCADING setting. This means if you launch a print command. Windows will look at the settings saved in the document. If there are no settings in the doc. it will look at the printing preferrences saved in the users profile. If there are no settings in the users prefs. than it will use the Default device settings. Enjoy !! ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted January 26, 2007 Author Moderators Share Posted January 26, 2007 @ptrex - I know how it works. I did find something that may work (not tested). #include <Word.au3> ;WdPaperTray Const $wdPrinterDefaultBin = 0 Const $wdPrinterUpperBin = 1 Const $wdPrinterOnlyBin = 1 Const $wdPrinterLowerBin = 2 Const $wdPrinterMiddleBin = 3 Const $wdPrinterManualFeed = 4 Const $wdPrinterEnvelopeFeed = 5 Const $wdPrinterManualEnvelopeFeed = 6 Const $wdPrinterAutomaticSheetFeed = 7 Const $wdPrinterTractorFeed = 8 Const $wdPrinterSmallFormatBin = 9 Const $wdPrinterLargeFormatBin = 10 Const $wdPrinterLargeCapacityBin = 11 Const $wdPrinterPaperCassette = 14 Const $wdPrinterFormSource = 15 $oWordApp = _WordCreate (@ScriptDir & "\Test.doc") $oDoc = _WordDocGetCollection ($oWordApp, 0) $oDoc.Range.Text = "This is some text to print!" $oWordApp.Options.DefaultTrayID = $wdPrinterManualFeed _WordDocPrint($oDoc) _WordQuit ($oWordApp) Link to comment Share on other sites More sharing options...
jftuga Posted January 27, 2007 Share Posted January 27, 2007 Thanks, I'll try this at work on Monday. -John Admin_Popup, show computer info or launch shellRemote Manager, facilitates connecting to RDP / VNCProc_Watch, reprioritize cpu intensive processesUDF: _ini_to_dict, transforms ini file entries into variablesUDF: monitor_resolutions, returns resolutions of multiple monitorsReport Computer Problem, for your IT help deskProfile Fixer, fixes a 'missing' AD user profile Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 14, 2007 Author Moderators Share Posted April 14, 2007 New update available! See update history in first post for changes. As long as there are no bugs I will be submitting this version for inclusion in AutoIt's Standard UDFs. Enjoy, Bob Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 25, 2007 Author Moderators Share Posted April 25, 2007 Now included in the AutoIt (beta) v3.2.3.7! Link to comment Share on other sites More sharing options...
gcriaco Posted April 26, 2007 Share Posted April 26, 2007 Now included in the AutoIt (beta) v3.2.3.7!No Word.au3 file included in the AutoIt Beta package v. 3.2.3.8 Link to comment Share on other sites More sharing options...
Administrators Jon Posted April 26, 2007 Administrators Share Posted April 26, 2007 The docs are there, I guess whoever added it forgot to commit it... Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 26, 2007 Author Moderators Share Posted April 26, 2007 The docs are there, I guess whoever added it forgot to commit it...Jos thought he had.All committed for the next Beta release ...Thanks for all your hard work on this !!!Jos Link to comment Share on other sites More sharing options...
Administrators Jon Posted April 26, 2007 Administrators Share Posted April 26, 2007 Is it just the Word.au3 file from this topic that needs to be put in \Include? I can do that if it is. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted April 26, 2007 Author Moderators Share Posted April 26, 2007 Is it just the Word.au3 file from this topic that needs to be put in \Include? I can do that if it is.I just PM'd you the version that should be included.Thanks,Bob Link to comment Share on other sites More sharing options...
Administrators Jon Posted April 26, 2007 Administrators Share Posted April 26, 2007 Thanks, updating the installer now. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ 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