ptrex Posted October 20, 2017 Author Posted October 20, 2017 @STetters Using the WinSCP this way is the hard way ... Especially if you are not acquainted with .NET CLR. I would recommend you to using either the traditional COM object approach : Or the PowerShell .NET way. I will see if I can make an example using the PS .NET way. But it will no be soon though ... rgds 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
STetters Posted October 20, 2017 Posted October 20, 2017 Many thanks PTrex for replying so promptly - the reference to the UDF option is really useful. Many thanks
wuruoyu Posted October 25, 2017 Posted October 25, 2017 Hi @ptrex, if it possible to use your framework to add .Net control "MenuStrip" to AutoIt form. I posted the question here: Thank you in advance!
ptrex Posted October 25, 2017 Author Posted October 25, 2017 It might be possible to do... but AutoIT can do it without .NET ..? So best check these examples first Rgds 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
wuruoyu Posted October 25, 2017 Posted October 25, 2017 (edited) Thanks for your reply! @ptrex The Ribbon is a nice option, but it doesn't have the MenuStrip like style I want. The MenuStrip is just a standard menu with better looking skin. If is possible for you to show me an example of how to add a .Net Control to AutoIt GUI (not on WinForm). Edited October 25, 2017 by wuruoyu
ptrex Posted October 26, 2017 Author Posted October 26, 2017 (edited) There is no way that I know to get .NET controls on AutoIT GUI's ? Where did you pick this up ? The examples shown here is the opposite ... AutoIT controls on WinForms. Sorry if this was not clear. According to me you are just looking for this ? https://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateMenu.htm Edited October 26, 2017 by 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
Deye Posted November 11, 2017 Posted November 11, 2017 As an idea: An interesting approach for this development would be to some how build a layer into scite using some special config file where known function calls can be switched (#UseCLR) to using CLR , for instance porting the simple Basic File I/O functions at first which is significant, then move on from there .., might get more interested and get the development speed to where it should be ..
Danyfirex Posted December 3, 2017 Posted December 3, 2017 Hello. I was needing to zip and unzip some folders. So I found an easy way using CLR. here a simple example. #include ".\Includes\CLR.au3" #include ".\Includes\CLR Constants.au3" Local $oAssembly = _CLR_LoadLibrary("System.IO.Compression.FileSystem") ConsoleWrite("!$oAssembly: " & IsObj($oAssembly) & @CRLF) Local $pAssemblyType = 0 $oAssembly.GetType_2("System.IO.Compression.ZipFile", $pAssemblyType) ConsoleWrite("$pAssemblyType = " & Ptr($pAssemblyType) & @CRLF) Local $oAssemblyType = ObjCreateInterface($pAssemblyType, $sIID_IType, $sTag_IType) ConsoleWrite("IsObj( $oAssemblyType ) = " & IsObj($oAssemblyType) & @CRLF) Local $sInputFolder="C:\Users\Raziel\Desktop\Files" Local $sOutZipFile="C:\Users\Raziel\Desktop\Files.zip" Local $aArray[] = [$sInputFolder,$sOutZipFile] Local $Return = 0 ;compress $oAssemblyType.InvokeMember_3("CreateFromDirectory", 0x158, 0, 0, CreateSafeArray($aArray), $Return) Local $aArray[] = [$sOutZipFile,$sInputFolder & "-Extracted"] ;decompress $oAssemblyType.InvokeMember_3("ExtractToDirectory", 0x158, 0, 0, CreateSafeArray($aArray), $Return) Exit Saludos ptrex, Skysnake and junkew 3 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
antonioj84 Posted December 3, 2017 Posted December 3, 2017 (edited) 17 minutes ago, Danyfirex said: Hello. I was needing to zip and unzip some folders. So I found an easy way using CLR. here a simple example. #include ".\Includes\CLR.au3" #include ".\Includes\CLR Constants.au3" Local $oAssembly = _CLR_LoadLibrary("System.IO.Compression.FileSystem") ConsoleWrite("!$oAssembly: " & IsObj($oAssembly) & @CRLF) Local $pAssemblyType = 0 $oAssembly.GetType_2("System.IO.Compression.ZipFile", $pAssemblyType) ConsoleWrite("$pAssemblyType = " & Ptr($pAssemblyType) & @CRLF) Local $oAssemblyType = ObjCreateInterface($pAssemblyType, $sIID_IType, $sTag_IType) ConsoleWrite("IsObj( $oAssemblyType ) = " & IsObj($oAssemblyType) & @CRLF) Local $sInputFolder="C:\Users\Raziel\Desktop\Files" Local $sOutZipFile="C:\Users\Raziel\Desktop\Files.zip" Local $aArray[] = [$sInputFolder,$sOutZipFile] Local $Return = 0 ;compress $oAssemblyType.InvokeMember_3("CreateFromDirectory", 0x158, 0, 0, CreateSafeArray($aArray), $Return) Local $aArray[] = [$sOutZipFile,$sInputFolder & "-Extracted"] ;decompress $oAssemblyType.InvokeMember_3("ExtractToDirectory", 0x158, 0, 0, CreateSafeArray($aArray), $Return) Exit Saludos About zip.au3 is the compression ratio better using your method above ? Edited December 3, 2017 by antonioj84 Earthshine 1
Danyfirex Posted December 3, 2017 Posted December 3, 2017 @antonioj84 I really don't now you should take a look at System.IO.Compression.ZipFile in msdn. I just need to zip a folder without take care of compression level. Saludos Earthshine and antonioj84 2 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
ptrex Posted December 4, 2017 Author Posted December 4, 2017 @Danyfirex Thanks for sharing... good to see someone is still posting something useful Earthshine and Danyfirex 2 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
ptrex Posted December 4, 2017 Author Posted December 4, 2017 @antonioj84 , The compression will propably be the same since the ZIP.AU3 using the same windows build in classes. The ZIP.AU3 UDF use the traditional COM approach, while the .NET version use the CLR framework to access the classes. The main difference will be speed I guess... where the CLR might win over tradinational COM approach. You can do a simple test to compress using both approaches and compress speed and compression rate... easy to find out. antonioj84 and Earthshine 2 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
junkew Posted December 4, 2017 Posted December 4, 2017 I think the approach above of .NET will be safer then the zip.au3 that is based on below logic where time / sleep function is important to function properly and script should not end before zipping is finished. expandcollapse popup#include <Array.au3> #include <File.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> Example() Func Example() ; Zip all the files and folders in the desktop directory using the default parameters. Local $aFileList = _FileListToArray(@DesktopDir, Default, Default, True) If @error = 1 Then MsgBox($MB_SYSTEMMODAL, "", "Path was invalid.") Exit EndIf If @error = 4 Then MsgBox($MB_SYSTEMMODAL, "", "No file(s) were found.") Exit EndIf ;Create empty zip file $str18zero=chr(0) & chr(0) & chr(0) & chr(0) & chr(0) & chr(0) $str18zero=$str18zero & $str18zero & $str18zero $EmptyZipFile="PK" & Chr(5) & Chr(6) & $str18zero $zipFileName=@tempdir & "\dummyfile.zip" $hZip=fileopen($zipFileName, $FO_OVERWRITE) filewrite($hZip,$emptyZipFile) fileclose($hZip) ;Add all the files $oWsh = ObjCreate("Shell.Application") for $i=0 to ubound($aFileList)-1 $oWsh.NameSpace($zipFileName).CopyHere($afilelist[$i] ) sleep(150) ;Some weird speed issue ;consolewrite($afilelist[$i] & @CRLF) Next ; Display the results returned by _FileListToArray. ;_ArrayDisplay($aFileList, "$aFileList") EndFunc ;==>Example FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Earthshine Posted December 5, 2017 Posted December 5, 2017 You could loop while the zipping process is running as a dynamic way to sleep My resources are limited. You must ask the right questions
junkew Posted December 5, 2017 Posted December 5, 2017 With .net version you can set compressionlevel as additional parameter. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
junkew Posted February 18, 2018 Posted February 18, 2018 Found another nice one for Delphi example to call .NET classes that are not comvisible Assm := Host.DefaultAppDomain.Load_2('NetAddr'); T := Assm.GetType_2('DelphiNET.NETAdder'); Obj := T.InvokeMember_3('ctor', BindingFlags_CreateInstance, nil, null, nil); Params := VarArrayOf([2]); WriteLn('2 + 3 = ' + IntToStr(T.InvokeMember_3('Add3', BindingFlags_InvokeMethod, nil, Obj, PSafeArray(VarArrayAsPSafeArray(Params))))); https://stackoverflow.com/questions/2048540/hosting-clr-in-delphi-with-without-jcl-example With the examples we already have above should be (whenever people are interested and have time ;-)) completing the stuff FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
junkew Posted June 23, 2018 Posted June 23, 2018 Interesting to see host api is now more accessible with more c++ based api https://github.com/dotnet/docs/blob/master/docs/core/tutorials/netcore-hosting.md Not enough time to study in detail but maybe others have time Earthshine 1 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
ptrex Posted June 24, 2018 Author Posted June 24, 2018 (edited) hi Junkew, Thanks for the article ... very interesting indeed. But DotNet Core has some good and some bad news... Dotnet Core is definitely the way forward replacing the full blown .Net environment. The bad news is that some functionality has been dropped by MS ? One of them is APPDOMAINS : Quote http://www.michael-whelan.net/replacing-appdomain-in-dotnet-core/ In the move to .Net Core, Microsoft decided to discontinue certain technologies because they were deemed to be problematic. AppDomain was one of those that did not make the cut. While AppDomains have been discontinued, some of their functionality is still being provided. What I like about .Net Core is definitely being cross platform functionality One code compiles to multiple OS's and Architectures ! I have been playing around with .Net Core a while and like that feature the most ... https://audministrator.wordpress.com/2018/04/15/windows-core-iot-dotnet-core-on-a-raspberry-pi3/ https://audministrator.wordpress.com/2018/04/15/windows-core-iot-sqlite-on-a-raspberry-pi3/ https://audministrator.wordpress.com/2018/04/20/windows-core-iot-asp-dotnet-core-razor-pages-on-a-raspberry-pi3/ https://audministrator.wordpress.com/2017/01/23/windows-core-iot-accessing-a-dotnet-dll-assembly-on-a-raspberry-pi3/ ... Edited July 4, 2018 by 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
ptrex Posted July 4, 2018 Author Posted July 4, 2018 Hi All, PowersShell 6.0 Core has been released for .Net Core +2.0 SDK https://docs.microsoft.com/en-us/powershell/scripting/whats-new/what-s-new-in-powershell-core-60?view=powershell-6 TESTED : AutoItX PowerShell Module on Powershell Core 6 Preview on Windows 10 https://audministrator.wordpress.com/2018/07/02/powershell-core-running-on-windows-iot-using-a-rpi3/ The module runs as well on a RPI3 ARM architecture, But the functionality au3 functions don't work of course. Because the AutoIT dll's are compiled for an Intel architecture and not for an ARM architecture. Anyhow this shows the difference between running a PowerShell host in .Net Framework and .Net Core Framework : Comparison - Hosting Windows PowerShell vs. Hosting PowerShell Core https://github.com/PowerShell/PowerShell/tree/master/docs/host-powershell#net-core-sample-application 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
ptrex Posted June 17, 2019 Author Posted June 17, 2019 Hi All, It's been a while since someone posted something in the .NET CLR post ... Here is an example that loads a fully functional Report Designer .NET Assembly using CLR Library Features : • Easy to use (WYSIWYG) • Compartible with .net 2.0 and above • Easy to integrate in an application • Supports most DBMS (SQL server, SQL Express, MYSQL, MS Access & ODBC) • Simple expressions • Grouping and sorting • 1D Barcodes (Code 39, 128 and EAN 13), QR (requires qr library) Result : CLR using the PS Automation Assembly : expandcollapse popup#AutoIt3Wrapper_UseX64=n #include "CLR.Au3" $str = _Base64Decode("JFJ1bnNwYWNlID0gW3J1bnNwYWNlZmFjdG9yeV06OkNyZWF0ZVJ1bnNwYWNlKCkNCg0KJFJ1bnNwYWNlLkFwYXJ0bWVudFN0YXRlID0gIlNUQSIgIyBDaGFuZ2UgaGVyZSAhDQokUnVuc3BhY2UuVGhyZWFkT3B0aW9ucyA9ICJSZXVzZVRocmVhZCINCiRob3N0LlJ1bnNwYWNlLlRocmVhZE9wdGlvbnMudmFsdWVfXw0KJFJ1bnNwYWNlLlJ1bnNwYWNlU3RhdGVJbmZvDQoNCiRQb3dlclNoZWxsID0gW3Bvd2Vyc2hlbGxdOjpDcmVhdGUoKQ0KDQokUG93ZXJTaGVsbC5ydW5zcGFjZSA9ICRSdW5zcGFjZQ0KDQokUnVuc3BhY2UuT3BlbigpDQoNCiRzdHJpbmcgPSB7IA0KQWRkLVR5cGUgLUFzc2VtYmx5TmFtZSBTeXN0ZW0uV2luZG93cy5Gb3Jtcw0KQWRkLVR5cGUgLVBhdGggIkM6XF9cQXBwc1xfUG93ZXJTaGVsbFxfR1VJIEZvcm1zXC5ORVQgUmVwb3J0IEJ1aWxkZXJcUmVwb3J0RGVzaWduZXI1LjEuMC43LmRsbCINCkFkZC1UeXBlIC1QYXRoICJDOlxfXEFwcHNcX1Bvd2VyU2hlbGxcX0dVSSBGb3Jtc1wuTkVUIFJlcG9ydCBCdWlsZGVyXFFSQ29kZXIuZGxsIg0KQWRkLVR5cGUgLVBhdGggIkM6XF9cQXBwc1xfUG93ZXJTaGVsbFxfR1VJIEZvcm1zXC5ORVQgUmVwb3J0IEJ1aWxkZXJcU3lzdGVtLkRhdGEuU1FMaXRlLmRsbCINCkFkZC1UeXBlIC1QYXRoICJDOlxfXEFwcHNcX1Bvd2VyU2hlbGxcX0dVSSBGb3Jtc1wuTkVUIFJlcG9ydCBCdWlsZGVyXE15U3FsLkRhdGEuZGxsIg0KDQokcmQgPSBOZXctT2JqZWN0IFJlcG9ydERlc2lnbmVyNS5EZXNpZ25lcg0KDQokcmQuUHJvZHVjdFZlcnNpb24NCg0KJHJkID0gTmV3LU9iamVjdCBSZXBvcnREZXNpZ25lcjUuRGVzaWduZXINCiRyZC5TaG93RGlhbG9nKCkNCiRyZC5TaG93UHJvcGVydHkoKQ0KJHJkLlNob3dSZXBvcnRUcmVlKCkNCn0NCg0KW3ZvaWRdJFBvd2VyU2hlbGwuQWRkU2NyaXB0KCRzdHJpbmcpDQoNCiRQb3dlclNoZWxsLkludm9rZSgpIA==") _Run_PSHost_Script(BinaryToString($str,1)) ; 1 = Ansi, 2 = UTF16 Little Endian Func _Run_PSHost_Script($PSScript) Local $oAssembly = _CLR_LoadLibrary("System.Management.Automation") ConsoleWrite("!$oAssembly: " & IsObj($oAssembly) & @CRLF) ; Create Object Local $pAssemblyType = 0 $oAssembly.GetType_2("System.Management.Automation.PowerShell", $pAssemblyType) ConsoleWrite("$pAssemblyType = " & Ptr($pAssemblyType) & @CRLF) Local $oActivatorType = ObjCreateInterface($pAssemblyType, $sIID_IType, $sTag_IType) ConsoleWrite("IsObj( $oAssemblyType ) = " & IsObj($oActivatorType) & @TAB & @CRLF) ; Create Object Local $pObjectPS = 0 $oActivatorType.InvokeMember_3("Create", 0x158, 0, 0, 0, $pObjectPS) ConsoleWrite("IsObject: " & IsObj($pObjectPS) & @TAB & "$pObject: " & ObjName($pObjectPS) & @CRLF) $pObjectPS.AddScript($PSScript) ; Add Script here $objAsync = $pObjectPS.BeginInvoke ; (2); ($oActivatorType,$oActivatorType) While $objAsync.IsCompleted = False ContinueLoop WEnd ConsoleWrite("Completed : " & $objAsync.IsCompleted & @CRLF) $objPsCollection = $pObjectPS.EndInvoke($objAsync) EndFunc Func _Base64Decode($input_string) Local $struct = DllStructCreate("int;int;int") Local $dwFlags = 1 ; Base64, no headers DllCall("Crypt32.dll", "int", "CryptStringToBinary", _ "str", $input_string, _ "int", StringLen($input_string), _ "int", $dwFlags, _ "ptr", 0, _ "ptr", DllStructGetPtr($struct, 1), _ "ptr", DllStructGetPtr($struct, 2), _ "ptr", DllStructGetPtr($struct, 3)) Local $a = DllStructCreate("byte[" & DllStructGetData($struct, 1) & "]") DllCall("Crypt32.dll", "int", "CryptStringToBinary", _ "str", $input_string, _ "int", StringLen($input_string), _ "int", $dwFlags, _ "ptr", DllStructGetPtr($a), _ "ptr", DllStructGetPtr($struct, 1), _ "ptr", DllStructGetPtr($struct, 2), _ "ptr", DllStructGetPtr($struct, 3)) Return DllStructGetData($a, 1) EndFunc ;==>_Base64Decode Downloads : RB Assembly here : https://sourceforge.net/projects/report-builder/ Prequisites : Reference 2 additional Assemblies for this version : 1. QRCoder.dll version 1.3.5 2. SQLIte.dll version 1.0.109 Many thanks for the developer of the Report Builder .NET Assembly ! Enjoy! ptrex Danyfirex, junkew and mLipok 3 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
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