Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/18/2018 in all areas

  1. JLogan3o13

    Help with variable

    Variables, by their nature, live while your program is alive. You cannot expect the computer to remember the variable setting between runs of your program unless you are writing it somewhere outside of memory (it is called volatile for a reason). That would be an INI file, a Registry entry, a DLL even, but somewhere on the physical drive. If you do not want to use a file, go with a registry entry written on first run and then checked on subsequent runs.
    2 points
  2. -1 in WMI usually means: UNKNOWN In powershell... 4294967295 converts to 0xFFFFFFFF which usually means allow or enabled and 0x00000000 usualy means disabled. Not 100% sure this is the case for your issue though.
    1 point
  3. -2144272376 converts to 0x80310008 (FVE_E_NOT_ACTIVATED) MsgBox(0, '', '0x' & Hex(-2144272376))
    1 point
  4. Or you can keep your script with a little change to have it work $aID = "BLUS12345" $aID2 = StringTrimLeft($aID, 4) If StringInStr($aID, 'BCES') Then ConsoleWrite(@ScriptLineNumber & " : " & "NPEA" & $aID2 & @CRLF) EndIf If StringInStr($aID, 'BLES') Then ConsoleWrite(@ScriptLineNumber & " : " & "NPEB" & $aID2 & @CRLF) EndIf If StringInStr($aID, 'BCUS') Then ConsoleWrite(@ScriptLineNumber & " : " & "NPUA" & $aID2 & @CRLF) EndIf If StringInStr($aID, 'BLUS') Then ConsoleWrite(@ScriptLineNumber & " : " & "NPUB" & $aID2 & @CRLF) EndIf If StringInStr($aID, 'BCJS') Then ConsoleWrite(@ScriptLineNumber & " : " & "NPJA" & $aID2 & @CRLF) EndIf If StringInStr($aID, 'BLJM') Then ConsoleWrite(@ScriptLineNumber & " : " & "NPJB" & $aID2 & @CRLF) EndIf If StringInStr($aID, 'BCAS') Then ConsoleWrite(@ScriptLineNumber & " : " & "NPHA" & $aID2 & @CRLF) EndIf If StringInStr($aID, 'BLAS') Then ConsoleWrite(@ScriptLineNumber & " : " & "NPHB" & $aID2 & @CRLF) EndIf
    1 point
  5. Hi youtuber, this could do it : Global $aArray[8][2] = _ [["BCES", "NPEA"], _ ["BLES", "NPEB"], _ ["BCUS", "NPUA"], _ ["BLUS", "NPUB"], _ ["BCJS", "NPJA"], _ ["BLJM", "NPJB"], _ ["BCAS", "NPHA"], _ ["BLAS", "NPHB"]] Global $aID = "BLUS12345", $aID_New = "", $aID_Left = StringLeft($aID, 4) For $i = 0 To 7 If $aID_Left = $aArray[$i][0] Then $aID_New = $aArray[$i][1] & StringMid($aID, 5) ExitLoop EndIf Next If $aID_New <> "" Then MsgBox(0, "Found", $aID & " => " & $aID_New) Else MsgBox(0, "Not Found", "No replacement done") EndIf Good luck
    1 point
  6. Once you copy with the ctrl+c you can then use ClipGet ( ) to assign to a variable.
    1 point
  7. TheSaint

    INItoSQL DB

    Please be advised, that my program only does very basic things and takes quite a simplistic approach. It does not setup any cross-referencing or indexing. To be sure, there is plenty of room for improvement, especially as my background is primarily INI files and Spreadsheets (Excel). One of the great benefits from sharing, is that you sometimes get input from others, even if it is only in private, and I always appreciate the time and effort taken to do so, so thank you @jchd for doing so in this instance ... quite the expert in SQL so I am told. It is clear to me, that I am only at the beginning of what is likely to be a long journey with SQL, especially as its possibilities impress me greatly. I also like to share my learning with others, hence the scripts and programs I provide ... hopefully they assist others on occasion ... even if it's just what not to do. P.S. If some of you have been observant enough, you will have noticed I am involved in a few SQL based projects right now ( CalibBrowser and most recently SimpleSQL_UDF ), and I am basically teaching myself as I go. For me, that means simplify in the first instance, paring things back to a level that I can understand, even if that means oversimplified and not fully correct. It is a beginning that I will continue to work upon as my experience and understanding grows. I first talked about eventually trying out SQL a few years ago, and earlier this year, I finally made the jump. I once went through a similar process with XML, but I never really took to it ... I learnt enough to utilize it in some projects of my own, plus work with XML files in general ... I never found it intuitive enough to ever really like it though ... and I always felt like I was reinventing the wheel almost, every time I used it ... no doubt due to some limitation of my own mind and how I recall things ... certainly if not used constantly enough. I already like SQL far more than I ever liked XML.
    1 point
  8. You are welcome p.s. better to also add an ProgressOff() statement right after the line "If @error Then ; Trap COM error, report and return" so that the progress bar will be closed also in case of errors.
    1 point
  9. FranckGr

    Help with variable

    Why not FileDelete(@ScriptFullPath) at the end of your script ...
    1 point
  10. Try this: global $a,$b,$c $strComputer = @ComputerName $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\" & $strComputer & "\root\CIMV2\Security\MicrosoftVolumeEncryption") $objWMIQuery = $objWMIService.ExecQuery("SELECT * FROM Win32_EncryptableVolume WHERE DriveLetter='C:'", "WQL", 0) For $objDrive In $objWMIQuery $res = $objDrive.GetConversionStatus($a,$b,$c) ConsoleWrite("> " & $res & @CRLF) ConsoleWrite("> " & $a & @CRLF) ConsoleWrite("> " & $b & @CRLF) ConsoleWrite("> " & $c & @CRLF) Next Exit And here is the documentation: uint32 GetConversionStatus( [out] uint32 ConversionStatus, [out] uint32 EncryptionPercentage, [out] uint32 EncryptionFlags, [out] uint32 WipingStatus, [out] uint32 WipingPercentage, [in] uint32 PrecisionFactor );
    1 point
  11. https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=21581 free, and includes MODI (I think you have to specify to install it through custom installation steps) ^
    1 point
  12. A quick research on the Forum GUICtrlPic.au3
    1 point
×
×
  • Create New...