Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/28/2021 in all areas

  1. No problem. *Full disclosure, I’m a paid influencer for the AARP - American Association of Recursive Programmers
    1 point
  2. Can you give me the input file you ran to create this?
    1 point
  3. #pragma compile(Console,True) Local $aR=StringSplit(FileRead($CmdLine[1]),@CRLF&@CRLF,1) ForNest() Func ForNest($iLevel=1, $sLine="") Local $aOpts=StringSplit($ar[$iLevel], @CRLF,3) For $sOpt In $aOpts If $iLevel<$ar[0] Then ForNest($iLevel+1, $sLine & $sOpt &",") Else ConsoleWrite($sLine & $sOpt &@CRLF) EndIf Next EndFunc This should keep the order, tested it with three optionals only though.
    1 point
  4. Do you mean my output or your input? Can u give an example, it’s probably easily fixed...
    1 point
  5. As table shows above, from 0x80 to 0xFF. Here a way to convert properly a char : #include <Constants.au3> Local $cASCII = Chr(0xB4) Local $iUTF8 = StringToBinary($cASCII, 4) Local $cUTF8 = BinaryToString($iUTF8, 4) MsgBox ($MB_SYSTEMMODAL, $iUTF8, "is char " & $cUTF8 & @CRLF)
    1 point
  6. Dont forget to set SciTE's console to display UTF8 chars.
    1 point
  7. 0xB4 has its MSB set to 1. So it requires at least a second byte. That char in UTF-8 is 0xC2B4
    1 point
  8. I would have truly appreciated you as a teacher in those days...
    1 point
  9. Hello, I'm the guy who made initial CI and I think using chocolatey to install autoit3 could be better, would look much cleaner. Has anyone here worked with autoit3 installing from chocolatey? I don't use Windows so every change that was needed to do was (almost) a blind guess and I'm honestly surprised that it works (more or less). Rcmaehl has been a big help with his Windows expertise (and it's his project after all).
    1 point
  10. It should be like this: Local $sMyRTFFile = @ScriptDir & "\test.rtf" ; <== full path to the .rtf file RunWait(@ProgramFilesDir & '\Windows NT\Accessories\wordpad.exe "' & $sMyRTFFile & '"')
    1 point
  11. You know how to properly do it. If you believe that the "2nd version more manageable", ...we can have a chat in a few years maintaining disorganized code and see how this 2nd approach worked out. New school is the same. Might as well not declare a thing. You don't have to declare a thing in AutoIt. You'll get to repent in due time. Experience will teach you. ( we need a drop mic. emoji )🎤
    1 point
  12. #include<Date.au3> ; Read Value Func _filetime2str($RegVal = "6000000010000000") ; Create a FileTime Struct (in bytes, so you can set value) $FileTime = DllStructCreate("struct; dword hi; dword lo; endstruct") ; set data to struct ;set hi value DllStructSetData($FileTime,1,Binary("0x"&Stringleft($RegVal,8))) ;set lo value DllStructSetData($FileTime,2,Binary("0x"&StringRight($RegVal,8)) ; Convert to String $String = _Date_Time_FileTimeToStr($FileTime) ConsoleWrite($String&@CRLF) return $String EndFunc this is what i use to convert 64bit FileTime value from registry into Readable Date/Time string convert 64bit Filetime hex string into local time String
    1 point
  13. Try this - #pragma compile(Console,True) Local $aR=StringSplit(FileRead($CmdLine[1]),@CRLF&@CRLF,1) ForNest() Func ForNest($iLevel=1, $sLine="") Local $aOpts=StringSplit($ar[$iLevel], @CRLF,3) For $sOpt In $aOpts If $iLevel<$ar[0] Then ForNest($iLevel+1, $sOpt &","& $sLine) Else ConsoleWrite($sLine & $sOpt &@CRLF) EndIf Next EndFunc Input File (Per Product Line - Must Have Empty Line after each feature) Size1 Size2 Size5 Thickness1 Thickness2 Thickness3 Color1 Color2 Color3 Output (to Console): Thickness1,Size1,Color1 Thickness1,Size1,Color2 Thickness1,Size1,Color3 Thickness2,Size1,Color1 Thickness2,Size1,Color2 Thickness2,Size1,Color3 Thickness3,Size1,Color1 Thickness3,Size1,Color2 Thickness3,Size1,Color3 Thickness1,Size2,Color1 Thickness1,Size2,Color2 Thickness1,Size2,Color3 Thickness2,Size2,Color1 Thickness2,Size2,Color2 Thickness2,Size2,Color3 Thickness3,Size2,Color1 Thickness3,Size2,Color2 Thickness3,Size2,Color3 Thickness1,Size5,Color1 Thickness1,Size5,Color2 Thickness1,Size5,Color3 Thickness2,Size5,Color1 Thickness2,Size5,Color2 Thickness2,Size5,Color3 Thickness3,Size5,Color1 Thickness3,Size5,Color2 Thickness3,Size5,Color3 Usage: pl.exe <product line input file> File Attached: pl.au3 pl.txt
    1 point
  14. @argumentum Too easy, I plan to make my own editor with all sorts of features... but I need to finish working on ECI before that, challenge accepted
    1 point
  15. @seadoggie01 Thanks... I take a look at it.
    1 point
  16. AdamUL

    RunAs

    For your remote users, are you going to store the network credentials in the install script? Also, RunAs does not give you full admin rights (Admin Token), even if the user has admin right on the PC. You have to use a workaround of re-execution. Here is an example script. Global $sAdminUser = "USERNAME" Global $sAdminPassword = "PASSWORD" Global $sDomain = "AD" Global $iLogOnFlag = 0 Global $sParameters = "" ;Elevate with the Admin account. If @UserName <> $sAdminUser And Not IsAdmin() Then $sParameters = "" If Not @Compiled Then $sParameters = ' "' & @ScriptFullPath & '"' EndIf If RunAs($sAdminUser, $sDomain, $sAdminPassword, $iLogOnFlag, @AutoItExe & $sParameters) Then Exit Else Exit MsgBox(16 + 262144, "ERROR!", "Unable to run under administrator account.") EndIf EndIf ;Run with Admin Token in Windows Vista and Higher. If @UserName = $sAdminUser And Not IsAdmin() And Not StringRegExp(@OSVersion, "_(XP|200(0|3))") Then $sParameters = "" If Not @Compiled Then $sParameters = '"' & @ScriptFullPath & '"' EndIf If ShellExecute(@AutoItExe, $sParameters, "", "runas") Then Exit Else Exit MsgBox(16 + 262144, "ERROR!", "Unable to elevate to Admin due to UAC.") EndIf EndIf ;Put rest of the script here. MsgBox(16, $sAdminUser, IsAdmin()) ;ExampleAdam
    1 point
×
×
  • Create New...