Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/24/2022 in all areas

  1. I really like this tool! @Exit In English, I have a similar output "Unrestricted". For me, the offset is 7 instead of 6. Return $aOutput[UBound($aOutput) - 7] Here is my solution. How does this work on German version? #include <Array.au3> #include <string.au3> Global $hDLL = DllOpen("user32.dll") $aSSIDs = _GetSSIDs() For $i = 0 To UBound($aSSIDs) - 1 $key = _GetKeyFromSSID($aSSIDs[$i]) ConsoleWrite(@TAB & $aSSIDs[$i] & @TAB & @TAB & $key & @CRLF) Next Func _GetSSIDs() Local $iPID = Run(@ComSpec & " /c " & 'netsh wlan show profile', @ScriptDir, @SW_HIDE, $STDOUT_CHILD + $STDERR_CHILD) ProcessWaitClose($iPID) Local $sOutput = StdoutRead($iPID) Local $aOutput = DllCall($hDLL, 'Int', 'OemToChar', 'str', $sOutput, 'str', '') $aOutput = _StringExplode($aOutput[2], "-" & @CRLF) $sOutput = $aOutput[UBound($aOutput) - 1] Local $aSSIDs = _StringBetween($sOutput, " : ", @CRLF) Return $aSSIDs EndFunc ;==>_GetSSIDs Func _GetKeyFromSSID($sSSID) ;returns "1" if key is not present Local $iPID = Run(@ComSpec & " /c " & 'netsh wlan show profile name="' & $sSSID & '" key=clear', @ScriptDir, @SW_HIDE, $STDOUT_CHILD + $STDERR_CHILD) ProcessWaitClose($iPID) Local $sOutput = StdoutRead($iPID) Local $aOutput = DllCall($hDLL, 'Int', 'OemToChar', 'str', $sOutput, 'str', '') $aOutput = StringSplit($aOutput[2], @CRLF & "-", $STR_ENTIRESPLIT + $STR_NOCOUNT) $aOutput = _StringBetween($aOutput[3], " : ", @CRLF) Return $aOutput[UBound($aOutput) - 1] EndFunc ;==>_GetKeyFromSSID For reference, here is my English netsh output BTW, there are still some nuances to work out, like this scenario.
    2 points
  2. ioa747

    SciTE PlusBar

    SciTE PlusBar a attached Menu bar for SciTE Version 1.0.0.32 SciTE_PlusBar.zip Please, leave your comments and experiences here Thanks !
    1 point
  3. Here we have a Babylonian confusion of languages. The Water solution only works with German locale. The Hunter070 solution only works with English locale. This is because the netsh output is parsed with locale constants. e.g. Global Const $sProfile = "All User Profile" Global Const $sProfile = "Profil für alle Benutzer" A language-independent version would be desirable.
    1 point
  4. How to get data from desired/specified window ? As so far I try: #include <ScreenCapture.au3> #include <GDIPlus.au3> #include "..\UWPOCR.au3" _Example() Func _Example() #Region - create example bitmap - take a screenshot _GDIPlus_Startup() ;hImage/hBitmap GDI Local $hTimer = TimerInit() Local $hHBitmap = _ScreenCapture_CaptureWnd("", WinWait("[REGEXPTITLE:(?i)(.*SciTE.*)]")) Local $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap) #EndRegion - create example bitmap - take a screenshot #Region - do the OCR Stuff ;Get OCR Text From hImage/hBitmap ;~ _UWPOCR_Log(__UWPOCR_Log) ;Enable Log Local $sOCRTextResult = _UWPOCR_GetText($hBitmap, Default, True) MsgBox(0, "Time Elapsed: " & TimerDiff($hTimer), $sOCRTextResult) #EndRegion - do the OCR Stuff #Region - bitmap clean up _WinAPI_DeleteObject($hHBitmap) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() #EndRegion - bitmap clean up EndFunc ;==>_Example But this not works properly.
    1 point
  5. Another possibility is that your timer expires before the window shows up. ControlClick would error out then. BTW, I cannot emphase it more, put some error handling in your code. It will not hurt you. And at least you would know when a statement fails...
    1 point
  6. @ExitIn English, that doesn't correctly retrieve the passkey for me (they all displayed "Unrestricted"). I took a quick glance at the array contents, and I think a more complex method will be required to retrieve the correct array element.
    0 points
×
×
  • Create New...