Leaderboard
Popular Content
Showing content with the highest reputation on 08/05/2022 in all areas
-
Here is a way to do it without using any external command (just use COM objects) #RequireAdmin ; Needed _NetSetCategory("LAN", 1) ; Sets the Private category to the network connection called "LAN" ; #FUNCTION# ==================================================================================================================== ; Name...........: _NetSetCategory ; Description....: Sets the category of a network. Changes made take effect immediately ; Syntax.........: _NetSetCategory($sNetworkId, $iNetCategory) ; Parameters.....: $sNetworkId - Name of the network connection ; $iNetCategory - New category of the network. Can be one of : ; 0 : Public ; 1 : Private ; 2 : Domain ; Return values..: Success - 1 ; Failure - 0 and sets the @error flag to non-zero ; Remarks........: The function requires administrator privileges ; =============================================================================================================================== Func _NetSetCategory($sNetworkId, $iNetCategory) Local $iRet = 1, $iNetFound = 0, $oNetwork, $oNetConnection If Not IsAdmin() Then Return SetError(4, 0, 0) If Not IsInt($iNetCategory) Or $iNetCategory < 0 Or $iNetCategory > 2 Then Return SetError(5, 0, 0) Local $INetListManager = ObjCreate("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}") If Not IsObj($INetListManager) Then Return SetError($iRet, 0, 0) Local $oNetConnections = $INetListManager.GetNetworkConnections() If IsObj($oNetConnections) Then For $oNetConnection In $oNetConnections $oNetwork = $oNetConnection.GetNetwork If $oNetwork.GetName = $sNetworkId Then $iNetFound = 1 Execute("$oNetwork.SetCategory($iNetCategory)") $iRet = (@error ? 2 : 0) EndIf Next If Not $iNetFound Then $iRet = 3 EndIf $INetListManager = 0 If $iRet Then Return SetError($iRet, 0, 0) Return 1 EndFunc ; ===> _NetSetCategory Inspired from @Danyfirex code (thanks)2 points
-
WHAT : is .NET Common Language Runtime (CLR) Framework The Common Language Runtime (CLR) is a an Execution Environment . Common Language Runtime (CLR)'s main tasks are to convert the .NET Managed Code to native code, manage running code like a Virtual Machine, and also controls the interaction with the Operating System. As part of Microsoft's .NET Framework, the Common Language Runtime (CLR) is managing the execution of programs written in any of several supported languages. Allowing them to share common object-oriented classes written in any of the languages. HOW : To access the CLR environment you need to create an Appdomain Object - _CLR_GetDefaultDomain() An AppDomain provides an isolated region in which code runs inside of an existing process. Application domains provide an isolation boundary for security, reliability, and versioning, and for unloading assemblies. Application domains are typically created by runtime hosts, which are responsible for bootstrapping the common language runtime before an application is run. WHEN : Would you use CLR Runtime Hosts 1. To access .NET Class Libraries : System System.Collections System.Data System.Drawing System.IO System.Text System.Threading System.Timers System.Web System.Web.Services System.Windows.Forms System.Xml 2. Accessing custom build .Net Assemblies : Some Examples (but there are a ton out there) AutoItX3 - The .NET Assembly for using AutoItX JSonToXML libr. XMLRPC Libr. .NETPDF libr. .NETOCR Libr WInSCP Libr. ... 3. To Compile .Net Code into an Assembly 4. To Run C# or VB.net Code 5. To Mix AU3 and .Net functionality in your Application WHERE : To find documentation about CLR First of all you can find a lot on MSDN and here : Post 4 & Post 6 EXAMPLES : Multiple examples included in Zip !! Example : “System.Text.UTF8Encoding” Example : “System.IO.FileInfo” Example : “System.Windows.Forms” Example : AutoItX3 Custom .NET Assembly AutoItX Example : Compile Code C# and Code VB Example : Compile Code C# at Runtime WHO : Created the CLR.au3 UDF All credits go to : Danyfirex / Larsj / Trancexx / Junkew TO DO : The library is still Work in Process … (Some of the GUI Controls are not yet working as expected...) Anyone is free to participate in contributing to get the bugs resolved and to expand the CLR.au3 functionality ... Enjoy !! DOWNLOADS : (Last updated) - added CLR Constants.au3 - Danyfirex - Global Constants added (Magic numbers) - added .NET CLR CreateObject vs ObjCreate Example.au3 - Junkew • 2 approaches give the same result (only valid for COM Visible Assembly) • Includes a function that shows you which Assembly Classes are COM Visible - added .Net Conventional COM Objects Examples - ptrex - added .NET CLR CreateComInstanceFrom Example - Danyfirex - You can use it for Regfree COM Assembly Access - System.Activator has 4 methods : • CreateComInstanceFrom : Used to create instances of COM objects. • CreateInstanceFrom : Used to create a reference to an object from a particular assembly and type name. • GetObject : Used when marshaling objects. • CreateInstance : Used to create local or remote instances of an object. - added .NET Access SafeArrays Using AccVarsUtilities Example - LarsJ - added SafeArray Utilities functions in Includes - LarsJ - added .NET Access Native MSCorLib Classes - System - ptrex Multiple System Class Examples : • System.Random • System.DateTime • System.Diagnostics.PerformanceCounter • System.IO.FileInfo • System.Int32 • System.Double • System.Speech • System.Web - added Third Party Assembly Access - ptrex • WinSCP : https://winscp.net/eng/download.php • IonicZip : http://dotnetzip.codeplex.com/ - added more Examples using PowerShell GUI Assembly Access - ptrex • GUI Ribbon .NET Assembly using CLR Library • GUI Report Designer .NET Assembly using CLR Library • GUI SSRS Reporting .NET Assembly using CLR Library CLRv3a.zip .NET CLR Framework for AutoIT.pdf1 point
-
Thanks for waiting. I'll attach the flowchart here as PDF. 🙂 I've managed to code the area marked by green dotted lines - - - "Completed" Struggling with the SetupChrome() to startup, connecting to a running browser instance and utilizing an existing user profile. - Running browser instance = tab where the CMS website is open - Or if it isn't necessary, running browser instance = directly to the Print Dialog pop-up window when the CMS invokes it. And WD_Attach to the Print Dialog invoked by the CMS. The GUI, I was thinking of it more for later. If it is too complicated, it could also be replaced by an assigned HotKey, which waits for a HotKey pressed each time, executes codes, then loops and return to waiting for the next HotKey press trigger? Thank you. Zul CMS Printing Automation Flowchart.pdf1 point
-
Now it works!!! I've reinstalled Autoit, SciTe Editor and deleted the old files, but it opens the files on new tabs again. But now my SciTEUser.properties file is clean. I added the line check.if.already.open=0 to the SciTEUser.properties and it works!! Thanks everybody!!1 point
-
Hi @Champak. try this: $(this).closest(".item-row").find("input").eq(3).attr("value", item["value"]);1 point
-
I suggest not to mix UDF functions and COM if not needed. So your code could look like: Global $sTo = "Name des Empfängers" Global $sSignature = "Sascha" Global $sSubject = "Kürzung zu Ihrem Beleg " & $sRefNummer Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) _OL_MailSignatureSet($sSignature, $sSignature) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error setting the signature. @error = " & @error & ", @extended = " & @extended) $oMailItem = _OL_ItemCreate($oOutlook, $olMailItem, Default, Default, "Subject=" & $sSubject) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating the mail item. @error = " & @error & ", @extended = " & @extended) _OL_ItemRecipientAdd($oOutlook, $oMailItem, Default, olTo, $sTo) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error adding recipient. @error = " & @error & ", @extended = " & @extended) _OL_ItemDisplay($oOutlook, $oMailItem, Default) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error displaying the mail item. @error = " & @error & ", @extended = " & @extended)1 point
-
@LukeWCS just go to: C:\Program Files (x86)\AutoIt3\SciTE\SciTE Jump\SciTE Jump.au3 Add Global $__WINVER at Top of script: SciTE Jump.au3 and Save it and Close it that it.1 point
-
The collection of examples in .NET Common Language Runtime (CLR) Framework shows that there are virtually no limits to the possibilities that the usage of .NET Framework and .NET code in AutoIt opens up for. One possibility which certainly is very interesting is the possibility of using C# and VB code in AutoIt. That is, to create, compile and execute C# and VB source code directly through an AutoIt script without the need for any external tools at all, eg. an integrated development environment (IDE) program or similar. You can even create a .NET assembly dll-file with your C# or VB code that you can simply load and execute. Why is it interesting to execute C# or VB code in an AutoIt script? It's interesting because C# and VB code is executed as compiled code and not as interpreted code like AutoIt code. Compiled code is very fast compared to interpreted code. In AutoIt and all other interpreted languages probably 99% or more of the total execution time is spend by the code interpretor to interpret the code lines, while only 1% or less of the total execution time is spend by executing the actual code. Compiled code is directly executable without the need for a code interpretor. That's the reason why compiled code is so much faster than interpreted code. Using C# and VB code in AutoIt is interesting because it can be used to performance optimize the AutoIt code. There may be many other good reasons for using C# and VB code in AutoIt, but here the focus is on code optimization. In the help and support forums you can regularly find questions related to this topic. You can find many examples where assembler code is used in connection with performance optimization. Recently, there has been some interest in FreeBASIC. Code optimization is clearly a topic that has some interest. How difficult is writing C# and VB code compared to assembler and FreeBASIC code? It's certainly much easier and faster than writing assembler code. Because you can do everything through AutoIt without the need for an IDE, it's probably also easier than FreeBASIC. As usually you get nothing for free. The cost is that there is some overhead associated with executing compiled code. You must load and start the code. You need methods to move data back and forth between the AutoIt code and the compiled code. You'll not see that all compiled code is 100 times faster than AutoIt code. Somewhere between 10 and 100 times faster is realistic depending on the complexity of the code. And probably also only code running in loops is interesting and preferably a lot of loops. How C# and VB code can be used in AutoIt through .NET Framework is what this example is about. The rest of first post is a review of introductory C# and VB examples. The purpose of the examples is to make it easier to use C# and VB code in AutoIt. They show how to do some of the basic things in C#/VB that you can do in AutoIt. They focus on topics that are relevant when both AutoIt and C#/VB code is involved. Eg. how to pass variables or arrays back and forth between AutoIt and C#/VB code. The examples are not meant to be a regular C#/VB tutorial. C# and VB Guides in Microsoft .NET Documentation is a good place to find information about C# and VB code. Dot Net Perls example pages have some nice examples. To avoid first post being too long, three posts are reserved for topics that will be presented in the coming weeks. DotNet.au3 UDF DotNet.au3 UDF to access .NET Framework from AutoIt is used to access the .NET Framework. But you do not at all need a detailed knowledge of the code in DotNet.au3 to use C#/VB code in AutoIt. The UDF is stored as DotNetAll.au3 in Includes\ in the zip-file in bottom of post. Includes\ only contains this file. Introductory C# and VB examples The code in the examples below is VB code. But the zip-file in bottom of post contains both C# and VB versions of the examples. Code templates This is the vb and au3 code templates that's used in all of the examples. TemplateVB.vb (TemplateVB-a.vb is provided with comments): Imports System Class Au3Class Public Sub MyMethod() Console.WriteLine( "Hello world from VB!" ) End Sub End Class Note that Console.WriteLine writes output to SciTE console. TemplateVB.au3: #include "..\..\..\Includes\DotNetAll.au3" Opt( "MustDeclareVars", 1 ) Example() Func Example() Local $oNetCode = DotNet_LoadVBcode( FileRead( "TemplateVB.vb" ), "System.dll" ) Local $oAu3Class = DotNet_CreateObject( $oNetCode, "Au3Class" ) $oAu3Class.MyMethod() EndFunc Usually, 2 code lines are sufficient to make .NET code available in AutoIt. DotNet_LoadVBcode() compiles the VB code, creates the .NET code in memory, loads the code into the default domain and returns a .NET code object which is a reference to the .NET code. DotNet_CreateObject() takes the .NET code object and a class name as input parameters and creates an object from the class. See DotNet.au3 UDF. Now the sub procedure MyMethod in the VB code can be executed as an object method. Most examples contains just a few code lines like the templates. I don't want to review all examples, but to get an idea of what this is about, here's a list of the top level folders in the zip-file: Code templates Introductory topics Comments Comment block Line continuation ConsoleWrite MessageBox Public keyword Multiple methods Subs, functions Global variable Error handling Missing DLL-file Imports, using CS-VB mismatch Code typing errors Set @error macro Passing variables Passing 1D arrays Passing 2D arrays Simple examples Prime numbers Create DLL Prime numbers So far, there is only one example with more than just a few code lines. This is an example of calculating prime numbers. This example is also used to show how to create a .NET assembly dll-file. These two examples are reviewed with more details below. Prime numbers The example calculates a certain number of prime numbers and returns the prime numbers as a 1D array. It shows how to pass an AutoIt variable (number of prime numbers) to the C#/VB code and how to return a 1D array of integers (the prime numbers) from the C#/VB code to AutoIt. Especially arrays are interesting in relation to compiled code. This is Microsoft documentation for VB arrays and C# arrays. Design considerations If you want to create a UDF that uses advanced techniques such as compiled code, and you want to make it available to other members, you should consider the design. Consider how the code should be designed to be attractive to other members. You should probably not design the code so other members will need to execute .NET code, create objects, and call object methods in their own code. This should be done in a function in the UDF so that a user can simply call an easy-to-use AutoIt function in the usual way. AutoIt and VB code There are three versions of the example. A pure AutoIt version in the au3-folder, an AutoIt/VB version in the VB-folder and an AutoIt/C# version in the CS-folder. The pure AutoIt and the AutoIt/VB versions are reviewed below. AutoIt code in au3\CalcPrimes.au3. This is the pure AutoIt UDF to calculate primes: #include-once Func CalcPrimes( $nPrimes ) Local $aPrimes[$nPrimes], $iPrime = 2, $iPrimes = 0 If $nPrimes <= 100 Then ConsoleWrite( $iPrime & @CRLF ) ; Store first prime $aPrimes[$iPrimes] = $iPrime $iPrimes += 1 $iPrime += 1 ; Loop to calculate primes While $iPrimes < $nPrimes For $i = 0 To $iPrimes - 1 If Mod( $iPrime, $aPrimes[$i] ) = 0 Then ExitLoop Next If $i = $iPrimes Then If $nPrimes <= 100 Then ConsoleWrite( $iPrime & @CRLF ) $aPrimes[$iPrimes] = $iPrime $iPrimes += 1 EndIf $iPrime += 1 WEnd Return $aPrimes EndFunc Note the similarity between the AutoIt code above and the VB code below. If you can write the AutoIt code you can also write the VB code. VB code in VB\CalcPrimesVB.vb to calculate primes: Imports System Class PrimesClass Public Function CalcPrimes( nPrimes As Integer ) As Integer() Dim aPrimes(nPrimes-1) As Integer, iPrime As Integer = 2, iPrimes As Integer = 0, i As Integer If nPrimes <= 100 Then Console.WriteLine( iPrime ) 'Store first prime aPrimes(iPrimes) = iPrime iPrimes += 1 iPrime += 1 'Loop to calculate primes While iPrimes < nPrimes For i = 0 To iPrimes - 1 If iPrime Mod aPrimes(i) = 0 Then Exit For Next If i = iPrimes Then If nPrimes <= 100 Then Console.WriteLine( iPrime ) aPrimes(iPrimes) = iPrime iPrimes += 1 End If iPrime += 1 End While Return aPrimes End Function End Class AutoIt code in VB\CalcPrimesVB.au3. This is the AutoIt/VB UDF to calculate primes. #include-once #include "..\..\..\..\..\Includes\DotNetAll.au3" Func CalcPrimesVBInit() CalcPrimesVB( 0 ) EndFunc Func CalcPrimesVB( $nPrimes ) Static $oNetCode = 0, $oPrimesClass = 0 If $nPrimes = 0 Or $oNetCode = 0 Then ; Compile and load VB code, create PrimesClass object $oNetCode = DotNet_LoadVBcode( FileRead( "CalcPrimesVB.vb" ), "System.dll" ) $oPrimesClass = DotNet_CreateObject( $oNetCode, "PrimesClass" ) If $nPrimes = 0 Then Return EndIf ; Execute CalcPrimes method and return 1D array of primes Return $oPrimesClass.CalcPrimes( $nPrimes ) EndFunc Note the initialization code in CalcPrimesVB() where the VB code is compiled and loaded and the $oPrimesClass object is created. If the user forgets to call CalcPrimesVBInit() it'll work anyway. Examples with pure AutoIt code in au3\Examples.au3. This is user code: #include <Array.au3> #include "CalcPrimes.au3" Opt( "MustDeclareVars", 1 ) Examples() Func Examples() ShowPrimes( 10 ) ; Used under development ShowPrimes( 1000 ) ; 400 milliseconds ShowPrimes( 5000 ) ; 8 seconds EndFunc Func ShowPrimes( $nPrimes ) ConsoleWrite( "$nPrimes = " & _ $nPrimes & @CRLF ) Local $hTimer = TimerInit() Local $aPrimes = CalcPrimes( $nPrimes ) ConsoleWrite( "Time = " & _ TimerDiff( $hTimer ) & @CRLF & @CRLF ) _ArrayDisplay( $aPrimes ) EndFunc Note again that the user code in the pure AutoIt examples above is almost identical to the user code in the AutoIt/VB examples below. The only difference the user will notice is the speed. To calculate 5000 prime numbers, the C#/VB code is 100 times faster. Try yourself. Examples with AutoIt/VB code in VB\ExamplesVB.au3. This is user code: #include <Array.au3> #include "CalcPrimesVB.au3" Opt( "MustDeclareVars", 1 ) ExamplesVB() Func ExamplesVB() CalcPrimesVBInit() ShowPrimesVB( 10 ) ; Used under development ShowPrimesVB( 1000 ) ; 10 milliseconds ShowPrimesVB( 5000 ) ; 80 milliseconds ShowPrimesVB( 10000 ) ; 200 milliseconds ;ShowPrimesVB( 50000 ) ; 5 seconds EndFunc Func ShowPrimesVB( $nPrimes ) ConsoleWrite( "$nPrimes = " & _ $nPrimes & @CRLF ) Local $hTimer = TimerInit() Local $aPrimes = CalcPrimesVB( $nPrimes ) ConsoleWrite( "Time = " & _ TimerDiff( $hTimer ) & @CRLF & @CRLF ) _ArrayDisplay( $aPrimes ) EndFunc .NET assembly dll-file In a production environment the compiled VB code should be stored in a .NET assembly dll-file. The first step is to create the dll-file from the VB source code: #include "..\..\..\..\..\Includes\DotNetAll.au3" ; Compile VB code and load the code into CalcPrimesVB.dll: A .NET assembly dll-file DotNet_LoadVBcode( FileRead( "CalcPrimesVB.vb" ), "System.dll", 0, "CalcPrimesVB.dll" ) ; You can delete the PDB-file (binary file containing debug information) If you inspect the dll-file with ILSpy.exe (see DotNet.au3 UDF) you'll see these comments in top of the output in the right pane window: // ...\7) Create DLL\Prime numbers\VB\CalcPrimesVB.dll // CalcPrimesVB, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null // Global type: <Module> // Architecture: AnyCPU (64-bit preferred) // Runtime: .NET 4.0 Note that the dll-file can be used in both 32 and 64 bit code (Architecture: AnyCPU). The second step is to modify the AutoIt/VB UDF to load the code from the dll-file: #include-once #include "..\..\..\..\..\Includes\DotNetAll.au3" Func CalcPrimesVBInit() CalcPrimesVB( 0 ) EndFunc Func CalcPrimesVB( $nPrimes ) Static $oNetCode = 0, $oPrimesClass = 0 If $nPrimes = 0 Or $oNetCode = 0 Then ; Load CalcPrimesVB.dll and create PrimesClass object $oNetCode = DotNet_LoadAssembly( "CalcPrimesVB.dll" ) $oPrimesClass = DotNet_CreateObject( $oNetCode, "PrimesClass" ) If $nPrimes = 0 Then Return EndIf ; Execute CalcPrimes method and return 1D array of primes Return $oPrimesClass.CalcPrimes( $nPrimes ) EndFunc The user code in the examples is exactly the same. But in a production environment the AutoIt user code is usually compiled into an exe-file. Please compile the user code and double click the exe-file to run it. If the AutoIt user code is compiled into an exe-file and the VB dll-file is stored in the same folder as the exe-file, the AutoIt code is always able to find and load the VB dll-file. Summary C# and VB code through .NET Framework is without any doubt the absolute easiest way to execute compiled code in an AutoIt script. It's especially easy because everything (write, compile, load and execute the code and even create an assembly dll-file) can be done through AutoIt. There is no need for any external tools at all. Usually, only 2 lines of AutoIt code are required to make the compiled code available in an AutoIt script. When it comes to calculations and array manipulations, the difference between C#/VB code and AutoIt code is not that big. Under development of C#/VB code (debug) information can be written to SciTE console or a message box. Syntax errors in the code are reported in SciTE console. Because the compiled code is executed as object methods, this solves an otherwise impossible problem of passing arrays back and forth between AutoIt code and compiled code. Posts below Real C# and VB examples. Four examples about generating a 2D array of random data, sorting the array by one or more columns through an index, converting the 2D array to a 1D array in CSV format, and finally saving the 1D array as a CSV file. Post 2. UDF version of examples in post 2. Also a version with a .NET assembly dll-file. Post 3. Adv. C# and VB examples. An introduction to threading. Post 4. Some considerations regarding calculation of prime numbers. Post 7. Optimizing C# and VB code. Optimizing code through multithreading. Optimizing code by storing array as global variable in VB code, thereby avoiding spending time passing arrays back and forth between AutoIt code and VB code. Post 8. Zip-file The zip-file contains two folders: Examples\ and Includes\. Includes\ only contains DotNetAll.au3. You need AutoIt 3.3.10 or later. Tested on Windows 10, Windows 7 and Windows XP. Comments are welcome. Let me know if there are any issues. UsingCSandVB.7z1 point
-
I was needing to check all my connected networks and check if there is internet connection. so I wrote this function. #include <MsgBoxConstants.au3> #include <Array.au3> Global $NLM_ENUM_NETWORK_CONNECTED = 0x01 ;~ Global $NLM_ENUM_NETWORK_DISCONNECTED = 0x02 ;~ Global $NLM_ENUM_NETWORK_ALL = 0x03 Global Enum $eName, $eIsConectedtoInternet Local $aNetworks = GetNetWorks() If @extended Then For $i = 0 To @extended - 1 ConsoleWrite("NetWork Name: " & $aNetworks[$i][$eName] & "| IsConectedToInternet: " & $aNetworks[$i][$eIsConectedtoInternet] & @CRLF) Next _ArrayDisplay($aNetworks, "NetWork Name|NetWork Is Conected to Internet") EndIf ;~ Success: Return an 2DArray[][] and sets @extended Ubound of Array ;~ Failure: Return 0 and set @extended 0 Func GetNetWorks($NLM_ENUM_NETWORK = $NLM_ENUM_NETWORK_CONNECTED) Local $aNetworks[0][2] ;[n][0]NetWorks Name|[n][1]isConnectedtoInternet Local $INetworks = 0 Local $ReDim = 0 Local $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Local $oINetworkListManager = ObjCreate("{DCB00C01-570F-4A9B-8D69-199FDBA5723B}") ;Create INetworkListManager Object by CLSID If Not IsObj($oINetworkListManager) Then Return 0 $INetworks = $oINetworkListManager.GetNetworks($NLM_ENUM_NETWORK) If Not IsObj($INetworks) Then Return 0 For $INetwork In $INetworks $ReDim = UBound($aNetworks, 1) + 1 ReDim $aNetworks[$ReDim][2] $aNetworks[$ReDim - 1][0] = $INetwork.GetName $aNetworks[$ReDim - 1][1] = $INetwork.isConnectedtoInternet Next $oINetworkListManager = 0 ;Free Return SetExtended($ReDim, $aNetworks) EndFunc ;==>GetNetWorks ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc Saludos1 point