Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/05/2019 in all areas

  1. @Jos, sorry for that!
    1 point
  2. Spoon-feeding will probably shorten this thread. Local $master_value = "Z" Local $value_list = ["A", "B", "C", "D"] Local $a, $aa, $aRes[0] For $i = 1 To UBound($value_list) $a = _ArrayCombinations($value_list, $i) _ArrayDelete($a, 0) For $j = 0 To UBound($a) - 1 $aa = _ArrayPermute(StringSplit($a[$j] & $master_value, "", 3), ',') _ArrayDelete($aa, 0) _ArrayAdd($aRes, $aa) Next Next $ad($aRes)
    1 point
  3. robertocm, That sounds a very sensible solution - glad you got it working. M23
    1 point
  4. Nine

    StringRegEx?

    Or : $sTest = "program1.ex_|5.0.0.42" & @CRLF & _ "file.sys|1.0.0.8" & @CRLF & _ "program2.Ex_|5.0.0.18" & @CRLF & _ "text.txt|0.0.0.0" $sTest = StringReplace ($sTest, "_|", "e|") Local $aArray [0][2] _ArrayAdd ($aArray,$sTest) _ArrayDisplay ($aArray)
    1 point
  5. Nine

    StringRegEx?

    @PedroWarlock If this is your input string, I would recommend you to use _ArrayAdd (...)
    1 point
  6. Nine

    StringRegEx?

    StringSplit : look help file for it !
    1 point
  7. Here is an other more advanced Example that uses the SSRS Reporting .NET Assembly using CLR Library Features : • Multiple Data Sources available• Can run in REMOTE or LOCAL Mode• Export possible to XLS(X) / DOC(X) / PDF Result : CLR using the PS Automation Assembly : #AutoIt3Wrapper_UseX64=y #include "..\CLR.Au3" #include <FileConstants.au3> #include <MsgBoxConstants.au3> Local $str = _Base64Decode("JFJ1bnNwYWNlID0gW3J1bnNwYWNlZmFjdG9yeV06OkNyZWF0ZVJ1bnNwYWNlKCkNCg0KJFJ1bnNwYWNlLkFwYXJ0bWVudFN0YXRlID0gIlNUQSIgIyBDaGFuZ2UgaGVyZSAhDQokUnVuc3BhY2UuVGhyZWFkT3B0aW9ucyA9ICJSZXVzZVRocmVhZCINCg0KJFBvd2VyU2hlbGwgPSBbcG93ZXJzaGVsbF06OkNyZWF0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ydi5SZWZyZXNoUmVwb3J0KCkNCg0KJHJ2LkhlaWdodCA9IDgwMCAgICAgICAgICAgIA0KJHJ2LldpZHRoID0gMTIwMCAgICAgICAgICAgIA0KJHJ2LkRvY2sgPSBbU3lzdGVtLldpbmRvd3MuRm9ybXMuRG9ja1N0eWxlXTo6RmlsbA0KICAgICAgIA0KDQojLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gICAgICAgICAgICANCiNTaG93IGFzIERpYWxvZyBVc2luZyBXaW5kb3dzIEZvcm0gICAgICAgICAgICANCiMtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgICAgICAgICAgIA0KI2NyZWF0ZSBhIG5ldyBmb3JtICAgICAgICAgICAgDQokZm9ybSA9IE5ldy1PYmplY3QgV2luZG93cy5Gb3Jtcy5Gb3JtICAgICAgICAgICAgDQogICAgICAgICAgICAgDQojd2UncmUgZ29pbmcgdG8gbWFrZSBpdCBqdXN0IHNsaWdodGx5IGJpZ2dlciB0aGFuICAgICAgICAgICAgIA0KJGZvcm0uSGVpZ2h0ID0gODEwICAgICAgICAgICAgDQokZm9ybS5XaWR0aD0gMTIxMCAgICAgICAgICAgIA0KJGZvcm0uQ29udHJvbHMuQWRkKCRydikgICAgICAgICAgICANCiRydi5TaG93KCkgICAgICAgICAgICANCiRmb3JtLlNob3dEaWFsb2coKSAgICAgICAgICAgIA0KDQoNCiRzcWwuRGlzcG9zZSgpDQokY29uLkNsb3NlKCkNCn0NCg0KDQpbdm9pZF0kUG93ZXJTaGVsbC5BZGRTY3JpcHQoJHN0cmluZykNCg0KJFBvd2VyU2hlbGwuSW52b2tlKCkgDQo=") _Run_PSHost_Script(BinaryToString($str,1)) 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) ; <<<<<<<<<<<<<<<<<<< PS COMMAND HERE >>>>>>>>>>>>>>>>>>>> $pObjectPS.AddScript($PSScript) ; Add Script here ;~ ConsoleWrite($PSScript & @CRLF) $objAsync = $pObjectPS.BeginInvoke ; (2); ($oActivatorType,$oActivatorType) While $objAsync.IsCompleted = False ;~ ConsoleWrite($objAsync.IsCompleted & @CRLF) ContinueLoop WEnd ConsoleWrite("Completed : " & $objAsync.IsCompleted & @CRLF) $objPsCollection = $pObjectPS.EndInvoke($objAsync) ;~ ConsoleWrite("$objPsCollection: " & IsObj($objPsCollection) & @TAB & "$objPsCollection: " & ObjName($objPsCollection) & " - " & ObjName($objPsCollection,6) & " - " & ObjName($objPsCollection,3) & @CRLF) 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 : SSRS Assembly here : 2008 / 2010 / 2012 or 2015 Many thanks for the developer(s) of the SSRS .NET Assembly ! Enjoy ! ptrex
    1 point
  8. Yes, it's possible use: $sCell = _Excel_RangeRead($oWorkbook, Default, $oExcel.ActiveCell.Offset(2,2).Address)
    1 point
  9. U have to run the below code. But you may need to use a sleep after this statement before exporting _IENavigate($oIE, "javascript:orderChange('desc','Descending')")
    1 point
×
×
  • Create New...