Jump to content

Leaderboard

Popular Content

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

  1. jchd

    Dynamic Variable Creations?

    @Burgs, Don't do that. You're going to make your code uselessly complex and difficult to read/maintain for no good reason. Assign & Eval are only useful in a very few specific situations and yours isn't one of them. Work with arrays and if you feel uncomfortable with numerical indices, use Enum to makes them verbose and user-friendly.
    2 points
  2. Hello guys yestarday I was needing to print a Directory Tree Scheme But I don't like windows command Tree symbols so I just did this small function that allow me to extend the symbols. It's not optimized. Code: #include <File.au3> #include <Array.au3> #include <String.au3> Local $aSymbols[][] = [['\', '|', '-'] _ , ['⚽', '│', '─'] _ , ['⬮', '⁞', '.'] _ , ['⬯', '︴', '~'] _ , ['■', '║', '═'] _ , ['├', '│', '─'] _ , ['╞', '│', '─'] _ , ['┠', '┋', '─'] _ , ['〻', '︱', '─'] _ , ['★', '│', '─'] _ , ['♦', '│', '─'] _ , ['☑', '│', '─']] ;~ _ArrayDisplay($aSymbols) Local $sDirectoryPath = @ScriptDir & "\TestTree" Local $sTree = "" Local $sFileName = "" For $i = 0 To UBound($aSymbols) - 1 $sTree = _CreateDirTree($sDirectoryPath,$aSymbols[$i][0],$aSymbols[$i][1],$aSymbols[$i][2]) $sFileName = @ScriptDir & "\TreeScheme-" & String($i + 1) & ".txt" FileDelete($sFileName) FileWrite($sFileName, $sTree) ConsoleWrite($sTree & @CRLF) Next ;Danyfirex - 18/06/2018 Func _CreateDirTree($sDirectoryPath, $sFolderBar = "\", $sTreeBar = "|", $sSeparator = "-", $iNSeparator = 3) Local $aFiles = _FileListToArrayRec($sDirectoryPath, "*", $FLTAR_FILESFOLDERS, $FLTAR_RECUR, $FLTAR_SORT) Local $sFilePath = "" Local $sAttrib = "" Local $sFolderName = "" Local $sIndentation = "" Local $sRelativePath = "" Local $sFinalTree = "" If $aFiles[0] Then Local $sNode = $aFiles[1] For $i = 1 To $aFiles[0] $sRelativePath = $aFiles[$i] $sFilePath = $sDirectoryPath & "\" & $sRelativePath $sAttrib = FileGetAttrib($sFilePath) If StringInStr($sAttrib, "D") Then $sFolderName = _GetFolderName($sFilePath) $sIndentation = _GenerateIndentNodes($sDirectoryPath, $sRelativePath, $sFolderBar, $sTreeBar, $sSeparator) ;~ ConsoleWrite($sIndentation & $sFolderName & @CRLF) $sFinalTree &= $sIndentation & $sFolderName & @CRLF Else $sFolderName = _GetFileName($sFilePath) $sIndentation = _GenerateIndentNodes($sDirectoryPath, $sRelativePath, $sFolderBar, $sTreeBar, $sSeparator) ;~ ConsoleWrite($sIndentation & $sFolderName & @CRLF) $sFinalTree &= $sIndentation & $sFolderName & @CRLF EndIf Next EndIf Return $sFinalTree EndFunc ;==>_CreateDirTree Func _CheckFolderMore2Files($sDirectoryPath) Local $iRet = 0 Local $hSearch = FileFindFirstFile($sDirectoryPath & "\" & "*.*") If $hSearch = -1 Then Return $iRet EndIf Local $sFileName = "" Local $iCount = 0 While 1 $sFileName = FileFindNextFile($hSearch) If @error Then ExitLoop EndIf $iCount += 1 If $iCount > 1 Then $iRet = $iCount ExitLoop EndIf WEnd FileClose($hSearch) Return $iCount EndFunc ;==>_CheckFolderMore2Files Func _GenerateIndentNodes($sDirectoryPath, $sFolderRelativePath, $sFolderBar, $sTreeBar, $sSeparator, $iNSeparator = 3) Local $aSplit = StringSplit($sFolderRelativePath, "\") If $aSplit[0] > 1 Then Local $sBars = "" Local $iFiles = "" Local $sFilePath = "" For $i = 1 To $aSplit[0] - 1 $sFilePath = _ArrayToString($aSplit, "\", 1, $i) $iFiles = _CheckFolderMore2Files($sDirectoryPath & "\" & $sFilePath) If @error Then ContinueLoop EndIf If $iFiles > 1 Or $aSplit[0] - 1 = $i Then $sBars &= ($i = $aSplit[0] - 1) ? $sFolderBar & _StringRepeat($sSeparator, $iNSeparator) : $sTreeBar & _StringRepeat(" ", $iNSeparator) Else $sBars &= " " & _StringRepeat(" ", $iNSeparator) EndIf Next Return $sBars EndIf Return "" EndFunc ;==>_GenerateIndentNodes Func _GetFileName($sFullPath) Local $aSplit = StringSplit($sFullPath, "\") If $aSplit[0] Then Return $aSplit[$aSplit[0]] EndIf EndFunc ;==>_GetFileName Func _GetFolderName($sFullPath) Local $aSplit = StringSplit($sFullPath, "\") If $aSplit[0] Then Return $aSplit[$aSplit[0]] EndIf EndFunc ;==>_GetFolderName Some Outputs: Customers \---Daniel Rivero | \---CustomerInformation.txt | \---BankChromeAutomation | | \---1.0.0.0 | | \---bin | | | \---x64 | | | | \---BankChromeAutomation.exe | | | \---x86 | | | | \---BankChromeAutomation.exe | | | | \---readme.txt | | \---build | | | \---Linux | | | \---Mac | | | \---Windows | | \---examples | | | \---Example-1 | | | \---Example-2 | | \---include | | \---libs | | | \---AutoIt.dll | | \---resources | | | \---Folder.ico | | \---source | | | \---Source.au3 | | \---tests | | | \---Test-1.au3 | | | \---Test-2.au3 | | \---tools | | | \---sometools.txt | \---DownloadInvoices | | \---ProjectInformation.txt | | \---database | \---ScrapperGoogle | | \---ProjectInformation.txt | | \---html \---Neil Diamond | \---AudioDownloader | | \---1.0.0.0 | | | \---bin | | | | \---x64 | | | | | \---BankChromeAutomation.exe | | | | \---x86 | | | | | \---BankChromeAutomation.exe | | | | | \---readme.txt | | | \---build | | | | \---Linux | | | | \---Mac | | | | \---Windows | | | \---examples | | | | \---Example-1 | | | | \---Example-2 | | | \---include | | | \---libs | | | | \---AutoIt.dll | | | \---resources | | | | \---Folder.ico | | | \---source | | | | \---Source.au3 | | | \---tests | | | | \---Test-1.au3 | | | | \---Test-2.au3 | | | \---tools | | | | \---sometools.txt | | \---1.0.0.1 | | | \---bin | | | | \---x64 | | | | \---x86 | | | | | \---readme.txt | | | \---build | | | | \---Linux | | | | \---Mac | | | | \---Windows | | | \---examples | | | | \---Example-1 | | | | \---Example-2 | | | \---include | | | \---libs | | | | \---AutoIt.dll | | | \---resources | | | | \---Folder.ico | | | \---source | | | | \---Source.au3 | | | \---tests | | | | \---Test-1.au3 | | | | \---Test-2.au3 | | | \---tools | | | | \---sometools.txt | \---TagsWriter | | \---ProjectInformation.txt | | \---database Personal \---CreateFolderTree \---DialogAutomate \---WebDriver Customers ■═══Daniel Rivero ║ ■═══CustomerInformation.txt ║ ■═══BankChromeAutomation ║ ║ ■═══1.0.0.0 ║ ║ ■═══bin ║ ║ ║ ■═══x64 ║ ║ ║ ║ ■═══BankChromeAutomation.exe ║ ║ ║ ■═══x86 ║ ║ ║ ║ ■═══BankChromeAutomation.exe ║ ║ ║ ║ ■═══readme.txt ║ ║ ■═══build ║ ║ ║ ■═══Linux ║ ║ ║ ■═══Mac ║ ║ ║ ■═══Windows ║ ║ ■═══examples ║ ║ ║ ■═══Example-1 ║ ║ ║ ■═══Example-2 ║ ║ ■═══include ║ ║ ■═══libs ║ ║ ║ ■═══AutoIt.dll ║ ║ ■═══resources ║ ║ ║ ■═══Folder.ico ║ ║ ■═══source ║ ║ ║ ■═══Source.au3 ║ ║ ■═══tests ║ ║ ║ ■═══Test-1.au3 ║ ║ ║ ■═══Test-2.au3 ║ ║ ■═══tools ║ ║ ║ ■═══sometools.txt ║ ■═══DownloadInvoices ║ ║ ■═══ProjectInformation.txt ║ ║ ■═══database ║ ■═══ScrapperGoogle ║ ║ ■═══ProjectInformation.txt ║ ║ ■═══html ■═══Neil Diamond ║ ■═══AudioDownloader ║ ║ ■═══1.0.0.0 ║ ║ ║ ■═══bin ║ ║ ║ ║ ■═══x64 ║ ║ ║ ║ ║ ■═══BankChromeAutomation.exe ║ ║ ║ ║ ■═══x86 ║ ║ ║ ║ ║ ■═══BankChromeAutomation.exe ║ ║ ║ ║ ║ ■═══readme.txt ║ ║ ║ ■═══build ║ ║ ║ ║ ■═══Linux ║ ║ ║ ║ ■═══Mac ║ ║ ║ ║ ■═══Windows ║ ║ ║ ■═══examples ║ ║ ║ ║ ■═══Example-1 ║ ║ ║ ║ ■═══Example-2 ║ ║ ║ ■═══include ║ ║ ║ ■═══libs ║ ║ ║ ║ ■═══AutoIt.dll ║ ║ ║ ■═══resources ║ ║ ║ ║ ■═══Folder.ico ║ ║ ║ ■═══source ║ ║ ║ ║ ■═══Source.au3 ║ ║ ║ ■═══tests ║ ║ ║ ║ ■═══Test-1.au3 ║ ║ ║ ║ ■═══Test-2.au3 ║ ║ ║ ■═══tools ║ ║ ║ ║ ■═══sometools.txt ║ ║ ■═══1.0.0.1 ║ ║ ║ ■═══bin ║ ║ ║ ║ ■═══x64 ║ ║ ║ ║ ■═══x86 ║ ║ ║ ║ ║ ■═══readme.txt ║ ║ ║ ■═══build ║ ║ ║ ║ ■═══Linux ║ ║ ║ ║ ■═══Mac ║ ║ ║ ║ ■═══Windows ║ ║ ║ ■═══examples ║ ║ ║ ║ ■═══Example-1 ║ ║ ║ ║ ■═══Example-2 ║ ║ ║ ■═══include ║ ║ ║ ■═══libs ║ ║ ║ ║ ■═══AutoIt.dll ║ ║ ║ ■═══resources ║ ║ ║ ║ ■═══Folder.ico ║ ║ ║ ■═══source ║ ║ ║ ║ ■═══Source.au3 ║ ║ ║ ■═══tests ║ ║ ║ ║ ■═══Test-1.au3 ║ ║ ║ ║ ■═══Test-2.au3 ║ ║ ║ ■═══tools ║ ║ ║ ║ ■═══sometools.txt ║ ■═══TagsWriter ║ ║ ■═══ProjectInformation.txt ║ ║ ■═══database Personal ■═══CreateFolderTree ■═══DialogAutomate ■═══WebDriver Customers ├───Daniel Rivero │ ├───CustomerInformation.txt │ ├───BankChromeAutomation │ │ ├───1.0.0.0 │ │ ├───bin │ │ │ ├───x64 │ │ │ │ ├───BankChromeAutomation.exe │ │ │ ├───x86 │ │ │ │ ├───BankChromeAutomation.exe │ │ │ │ ├───readme.txt │ │ ├───build │ │ │ ├───Linux │ │ │ ├───Mac │ │ │ ├───Windows │ │ ├───examples │ │ │ ├───Example-1 │ │ │ ├───Example-2 │ │ ├───include │ │ ├───libs │ │ │ ├───AutoIt.dll │ │ ├───resources │ │ │ ├───Folder.ico │ │ ├───source │ │ │ ├───Source.au3 │ │ ├───tests │ │ │ ├───Test-1.au3 │ │ │ ├───Test-2.au3 │ │ ├───tools │ │ │ ├───sometools.txt │ ├───DownloadInvoices │ │ ├───ProjectInformation.txt │ │ ├───database │ ├───ScrapperGoogle │ │ ├───ProjectInformation.txt │ │ ├───html ├───Neil Diamond │ ├───AudioDownloader │ │ ├───1.0.0.0 │ │ │ ├───bin │ │ │ │ ├───x64 │ │ │ │ │ ├───BankChromeAutomation.exe │ │ │ │ ├───x86 │ │ │ │ │ ├───BankChromeAutomation.exe │ │ │ │ │ ├───readme.txt │ │ │ ├───build │ │ │ │ ├───Linux │ │ │ │ ├───Mac │ │ │ │ ├───Windows │ │ │ ├───examples │ │ │ │ ├───Example-1 │ │ │ │ ├───Example-2 │ │ │ ├───include │ │ │ ├───libs │ │ │ │ ├───AutoIt.dll │ │ │ ├───resources │ │ │ │ ├───Folder.ico │ │ │ ├───source │ │ │ │ ├───Source.au3 │ │ │ ├───tests │ │ │ │ ├───Test-1.au3 │ │ │ │ ├───Test-2.au3 │ │ │ ├───tools │ │ │ │ ├───sometools.txt │ │ ├───1.0.0.1 │ │ │ ├───bin │ │ │ │ ├───x64 │ │ │ │ ├───x86 │ │ │ │ │ ├───readme.txt │ │ │ ├───build │ │ │ │ ├───Linux │ │ │ │ ├───Mac │ │ │ │ ├───Windows │ │ │ ├───examples │ │ │ │ ├───Example-1 │ │ │ │ ├───Example-2 │ │ │ ├───include │ │ │ ├───libs │ │ │ │ ├───AutoIt.dll │ │ │ ├───resources │ │ │ │ ├───Folder.ico │ │ │ ├───source │ │ │ │ ├───Source.au3 │ │ │ ├───tests │ │ │ │ ├───Test-1.au3 │ │ │ │ ├───Test-2.au3 │ │ │ ├───tools │ │ │ │ ├───sometools.txt │ ├───TagsWriter │ │ ├───ProjectInformation.txt │ │ ├───database Personal ├───CreateFolderTree ├───DialogAutomate ├───WebDriver Customers ╞───Daniel Rivero │ ╞───CustomerInformation.txt │ ╞───BankChromeAutomation │ │ ╞───1.0.0.0 │ │ ╞───bin │ │ │ ╞───x64 │ │ │ │ ╞───BankChromeAutomation.exe │ │ │ ╞───x86 │ │ │ │ ╞───BankChromeAutomation.exe │ │ │ │ ╞───readme.txt │ │ ╞───build │ │ │ ╞───Linux │ │ │ ╞───Mac │ │ │ ╞───Windows │ │ ╞───examples │ │ │ ╞───Example-1 │ │ │ ╞───Example-2 │ │ ╞───include │ │ ╞───libs │ │ │ ╞───AutoIt.dll │ │ ╞───resources │ │ │ ╞───Folder.ico │ │ ╞───source │ │ │ ╞───Source.au3 │ │ ╞───tests │ │ │ ╞───Test-1.au3 │ │ │ ╞───Test-2.au3 │ │ ╞───tools │ │ │ ╞───sometools.txt │ ╞───DownloadInvoices │ │ ╞───ProjectInformation.txt │ │ ╞───database │ ╞───ScrapperGoogle │ │ ╞───ProjectInformation.txt │ │ ╞───html ╞───Neil Diamond │ ╞───AudioDownloader │ │ ╞───1.0.0.0 │ │ │ ╞───bin │ │ │ │ ╞───x64 │ │ │ │ │ ╞───BankChromeAutomation.exe │ │ │ │ ╞───x86 │ │ │ │ │ ╞───BankChromeAutomation.exe │ │ │ │ │ ╞───readme.txt │ │ │ ╞───build │ │ │ │ ╞───Linux │ │ │ │ ╞───Mac │ │ │ │ ╞───Windows │ │ │ ╞───examples │ │ │ │ ╞───Example-1 │ │ │ │ ╞───Example-2 │ │ │ ╞───include │ │ │ ╞───libs │ │ │ │ ╞───AutoIt.dll │ │ │ ╞───resources │ │ │ │ ╞───Folder.ico │ │ │ ╞───source │ │ │ │ ╞───Source.au3 │ │ │ ╞───tests │ │ │ │ ╞───Test-1.au3 │ │ │ │ ╞───Test-2.au3 │ │ │ ╞───tools │ │ │ │ ╞───sometools.txt │ │ ╞───1.0.0.1 │ │ │ ╞───bin │ │ │ │ ╞───x64 │ │ │ │ ╞───x86 │ │ │ │ │ ╞───readme.txt │ │ │ ╞───build │ │ │ │ ╞───Linux │ │ │ │ ╞───Mac │ │ │ │ ╞───Windows │ │ │ ╞───examples │ │ │ │ ╞───Example-1 │ │ │ │ ╞───Example-2 │ │ │ ╞───include │ │ │ ╞───libs │ │ │ │ ╞───AutoIt.dll │ │ │ ╞───resources │ │ │ │ ╞───Folder.ico │ │ │ ╞───source │ │ │ │ ╞───Source.au3 │ │ │ ╞───tests │ │ │ │ ╞───Test-1.au3 │ │ │ │ ╞───Test-2.au3 │ │ │ ╞───tools │ │ │ │ ╞───sometools.txt │ ╞───TagsWriter │ │ ╞───ProjectInformation.txt │ │ ╞───database Personal ╞───CreateFolderTree ╞───DialogAutomate ╞───WebDriver Customers ♦───Daniel Rivero │ ♦───CustomerInformation.txt │ ♦───BankChromeAutomation │ │ ♦───1.0.0.0 │ │ ♦───bin │ │ │ ♦───x64 │ │ │ │ ♦───BankChromeAutomation.exe │ │ │ ♦───x86 │ │ │ │ ♦───BankChromeAutomation.exe │ │ │ │ ♦───readme.txt │ │ ♦───build │ │ │ ♦───Linux │ │ │ ♦───Mac │ │ │ ♦───Windows │ │ ♦───examples │ │ │ ♦───Example-1 │ │ │ ♦───Example-2 │ │ ♦───include │ │ ♦───libs │ │ │ ♦───AutoIt.dll │ │ ♦───resources │ │ │ ♦───Folder.ico │ │ ♦───source │ │ │ ♦───Source.au3 │ │ ♦───tests │ │ │ ♦───Test-1.au3 │ │ │ ♦───Test-2.au3 │ │ ♦───tools │ │ │ ♦───sometools.txt │ ♦───DownloadInvoices │ │ ♦───ProjectInformation.txt │ │ ♦───database │ ♦───ScrapperGoogle │ │ ♦───ProjectInformation.txt │ │ ♦───html ♦───Neil Diamond │ ♦───AudioDownloader │ │ ♦───1.0.0.0 │ │ │ ♦───bin │ │ │ │ ♦───x64 │ │ │ │ │ ♦───BankChromeAutomation.exe │ │ │ │ ♦───x86 │ │ │ │ │ ♦───BankChromeAutomation.exe │ │ │ │ │ ♦───readme.txt │ │ │ ♦───build │ │ │ │ ♦───Linux │ │ │ │ ♦───Mac │ │ │ │ ♦───Windows │ │ │ ♦───examples │ │ │ │ ♦───Example-1 │ │ │ │ ♦───Example-2 │ │ │ ♦───include │ │ │ ♦───libs │ │ │ │ ♦───AutoIt.dll │ │ │ ♦───resources │ │ │ │ ♦───Folder.ico │ │ │ ♦───source │ │ │ │ ♦───Source.au3 │ │ │ ♦───tests │ │ │ │ ♦───Test-1.au3 │ │ │ │ ♦───Test-2.au3 │ │ │ ♦───tools │ │ │ │ ♦───sometools.txt │ │ ♦───1.0.0.1 │ │ │ ♦───bin │ │ │ │ ♦───x64 │ │ │ │ ♦───x86 │ │ │ │ │ ♦───readme.txt │ │ │ ♦───build │ │ │ │ ♦───Linux │ │ │ │ ♦───Mac │ │ │ │ ♦───Windows │ │ │ ♦───examples │ │ │ │ ♦───Example-1 │ │ │ │ ♦───Example-2 │ │ │ ♦───include │ │ │ ♦───libs │ │ │ │ ♦───AutoIt.dll │ │ │ ♦───resources │ │ │ │ ♦───Folder.ico │ │ │ ♦───source │ │ │ │ ♦───Source.au3 │ │ │ ♦───tests │ │ │ │ ♦───Test-1.au3 │ │ │ │ ♦───Test-2.au3 │ │ │ ♦───tools │ │ │ │ ♦───sometools.txt │ ♦───TagsWriter │ │ ♦───ProjectInformation.txt │ │ ♦───database Personal ♦───CreateFolderTree ♦───DialogAutomate ♦───WebDriver Customers ☑───Daniel Rivero │ ☑───CustomerInformation.txt │ ☑───BankChromeAutomation │ │ ☑───1.0.0.0 │ │ ☑───bin │ │ │ ☑───x64 │ │ │ │ ☑───BankChromeAutomation.exe │ │ │ ☑───x86 │ │ │ │ ☑───BankChromeAutomation.exe │ │ │ │ ☑───readme.txt │ │ ☑───build │ │ │ ☑───Linux │ │ │ ☑───Mac │ │ │ ☑───Windows │ │ ☑───examples │ │ │ ☑───Example-1 │ │ │ ☑───Example-2 │ │ ☑───include │ │ ☑───libs │ │ │ ☑───AutoIt.dll │ │ ☑───resources │ │ │ ☑───Folder.ico │ │ ☑───source │ │ │ ☑───Source.au3 │ │ ☑───tests │ │ │ ☑───Test-1.au3 │ │ │ ☑───Test-2.au3 │ │ ☑───tools │ │ │ ☑───sometools.txt │ ☑───DownloadInvoices │ │ ☑───ProjectInformation.txt │ │ ☑───database │ ☑───ScrapperGoogle │ │ ☑───ProjectInformation.txt │ │ ☑───html ☑───Neil Diamond │ ☑───AudioDownloader │ │ ☑───1.0.0.0 │ │ │ ☑───bin │ │ │ │ ☑───x64 │ │ │ │ │ ☑───BankChromeAutomation.exe │ │ │ │ ☑───x86 │ │ │ │ │ ☑───BankChromeAutomation.exe │ │ │ │ │ ☑───readme.txt │ │ │ ☑───build │ │ │ │ ☑───Linux │ │ │ │ ☑───Mac │ │ │ │ ☑───Windows │ │ │ ☑───examples │ │ │ │ ☑───Example-1 │ │ │ │ ☑───Example-2 │ │ │ ☑───include │ │ │ ☑───libs │ │ │ │ ☑───AutoIt.dll │ │ │ ☑───resources │ │ │ │ ☑───Folder.ico │ │ │ ☑───source │ │ │ │ ☑───Source.au3 │ │ │ ☑───tests │ │ │ │ ☑───Test-1.au3 │ │ │ │ ☑───Test-2.au3 │ │ │ ☑───tools │ │ │ │ ☑───sometools.txt │ │ ☑───1.0.0.1 │ │ │ ☑───bin │ │ │ │ ☑───x64 │ │ │ │ ☑───x86 │ │ │ │ │ ☑───readme.txt │ │ │ ☑───build │ │ │ │ ☑───Linux │ │ │ │ ☑───Mac │ │ │ │ ☑───Windows │ │ │ ☑───examples │ │ │ │ ☑───Example-1 │ │ │ │ ☑───Example-2 │ │ │ ☑───include │ │ │ ☑───libs │ │ │ │ ☑───AutoIt.dll │ │ │ ☑───resources │ │ │ │ ☑───Folder.ico │ │ │ ☑───source │ │ │ │ ☑───Source.au3 │ │ │ ☑───tests │ │ │ │ ☑───Test-1.au3 │ │ │ │ ☑───Test-2.au3 │ │ │ ☑───tools │ │ │ │ ☑───sometools.txt │ ☑───TagsWriter │ │ ☑───ProjectInformation.txt │ │ ☑───database Personal ☑───CreateFolderTree ☑───DialogAutomate ☑───WebDriver Customers ┠───Daniel Rivero ┋ ┠───CustomerInformation.txt ┋ ┠───BankChromeAutomation ┋ ┋ ┠───1.0.0.0 ┋ ┋ ┠───bin ┋ ┋ ┋ ┠───x64 ┋ ┋ ┋ ┋ ┠───BankChromeAutomation.exe ┋ ┋ ┋ ┠───x86 ┋ ┋ ┋ ┋ ┠───BankChromeAutomation.exe ┋ ┋ ┋ ┋ ┠───readme.txt ┋ ┋ ┠───build ┋ ┋ ┋ ┠───Linux ┋ ┋ ┋ ┠───Mac ┋ ┋ ┋ ┠───Windows ┋ ┋ ┠───examples ┋ ┋ ┋ ┠───Example-1 ┋ ┋ ┋ ┠───Example-2 ┋ ┋ ┠───include ┋ ┋ ┠───libs ┋ ┋ ┋ ┠───AutoIt.dll ┋ ┋ ┠───resources ┋ ┋ ┋ ┠───Folder.ico ┋ ┋ ┠───source ┋ ┋ ┋ ┠───Source.au3 ┋ ┋ ┠───tests ┋ ┋ ┋ ┠───Test-1.au3 ┋ ┋ ┋ ┠───Test-2.au3 ┋ ┋ ┠───tools ┋ ┋ ┋ ┠───sometools.txt ┋ ┠───DownloadInvoices ┋ ┋ ┠───ProjectInformation.txt ┋ ┋ ┠───database ┋ ┠───ScrapperGoogle ┋ ┋ ┠───ProjectInformation.txt ┋ ┋ ┠───html ┠───Neil Diamond ┋ ┠───AudioDownloader ┋ ┋ ┠───1.0.0.0 ┋ ┋ ┋ ┠───bin ┋ ┋ ┋ ┋ ┠───x64 ┋ ┋ ┋ ┋ ┋ ┠───BankChromeAutomation.exe ┋ ┋ ┋ ┋ ┠───x86 ┋ ┋ ┋ ┋ ┋ ┠───BankChromeAutomation.exe ┋ ┋ ┋ ┋ ┋ ┠───readme.txt ┋ ┋ ┋ ┠───build ┋ ┋ ┋ ┋ ┠───Linux ┋ ┋ ┋ ┋ ┠───Mac ┋ ┋ ┋ ┋ ┠───Windows ┋ ┋ ┋ ┠───examples ┋ ┋ ┋ ┋ ┠───Example-1 ┋ ┋ ┋ ┋ ┠───Example-2 ┋ ┋ ┋ ┠───include ┋ ┋ ┋ ┠───libs ┋ ┋ ┋ ┋ ┠───AutoIt.dll ┋ ┋ ┋ ┠───resources ┋ ┋ ┋ ┋ ┠───Folder.ico ┋ ┋ ┋ ┠───source ┋ ┋ ┋ ┋ ┠───Source.au3 ┋ ┋ ┋ ┠───tests ┋ ┋ ┋ ┋ ┠───Test-1.au3 ┋ ┋ ┋ ┋ ┠───Test-2.au3 ┋ ┋ ┋ ┠───tools ┋ ┋ ┋ ┋ ┠───sometools.txt ┋ ┋ ┠───1.0.0.1 ┋ ┋ ┋ ┠───bin ┋ ┋ ┋ ┋ ┠───x64 ┋ ┋ ┋ ┋ ┠───x86 ┋ ┋ ┋ ┋ ┋ ┠───readme.txt ┋ ┋ ┋ ┠───build ┋ ┋ ┋ ┋ ┠───Linux ┋ ┋ ┋ ┋ ┠───Mac ┋ ┋ ┋ ┋ ┠───Windows ┋ ┋ ┋ ┠───examples ┋ ┋ ┋ ┋ ┠───Example-1 ┋ ┋ ┋ ┋ ┠───Example-2 ┋ ┋ ┋ ┠───include ┋ ┋ ┋ ┠───libs ┋ ┋ ┋ ┋ ┠───AutoIt.dll ┋ ┋ ┋ ┠───resources ┋ ┋ ┋ ┋ ┠───Folder.ico ┋ ┋ ┋ ┠───source ┋ ┋ ┋ ┋ ┠───Source.au3 ┋ ┋ ┋ ┠───tests ┋ ┋ ┋ ┋ ┠───Test-1.au3 ┋ ┋ ┋ ┋ ┠───Test-2.au3 ┋ ┋ ┋ ┠───tools ┋ ┋ ┋ ┋ ┠───sometools.txt ┋ ┠───TagsWriter ┋ ┋ ┠───ProjectInformation.txt ┋ ┋ ┠───database Personal ┠───CreateFolderTree ┠───DialogAutomate ┠───WebDriver Zip File Version. CreateFolderTree.zip Saludos
    1 point
  3. @Entkalker pretty much every question you have asked could easily be answered by trying it for yourself. You would find you get the answers a lot faster than posting and waiting for someone to respond.
    1 point
  4. Your app always runs with elevated security privileges. RIP anything with #RequireAdmin Your app writes to the install directory for your app RIP anything written with a "portable" option Your app uses the Current Working Directory RIP anything with @WorkingDir Your app uses a dependency in the System32/SysWOW64 folder Uhhhh? DLLs?
    1 point
  5. @JonnyQuy ChromeDriver supports multiple standards, so you need to specifically designate that you want the W3C standard. Try changing your desired capabilities line to $sDesiredCapabilities = '{"capabilities": {"alwaysMatch": {"chromeOptions": {"w3c": true }}}}'
    1 point
  6. @Jury Apparently you didn't read/decrypt/understand the post from Jos
    1 point
  7. Hello Thank you very much, my dear ones I apologize for delaying the response, but we were in the days of Eid Once again Thank you The code that worked with me is #include <WinAPILocale.au3> #include <Date.au3> MsgBox(0, "Today's Date", ArabicDate(@YEAR, @MON, @MDAY)) Func ArabicDate($iYYYY, $iMM, $iDD) Local $iLangCID = 1025 ; Arabic - Saudi Arabia Local $tSYSTEMTIME = DllStructCreate($tagSYSTEMTIME) DllStructSetData($tSYSTEMTIME, "Year", $iYYYY) DllStructSetData($tSYSTEMTIME, "Month", $iMM) DllStructSetData($tSYSTEMTIME, "Day", $iDD) Return _WinAPI_GetDateFormat($iLangCID, $tSYSTEMTIME, 0, "yyyy/MM/dd") EndFunc I want to thank everyone who interacted with this topic or read it Regards to all of you: management, members, supervisors, and visitors. Thank you so much good Bye
    1 point
  8. alienclone

    Solved

    you cannot delete the post because you are not supposed to. if you solved it yourself then you should have left the title in tact and amended the title with [Solved], left the original post, then maybe explain how you solved it in a reply so that it may help the next person who comes along with the same problem that you had.
    1 point
  9. Bilgus, I see, how could I missed the sentence, "There are currently no attributes defined for user security identifiers (SIDs)." It turns out that I had provided an improper example. Thanks anyway.
    1 point
  10. there aren't any attributes for token_user.. https://msdn.microsoft.com/en-us/library/windows/desktop/aa379634(v=vs.85).aspx Specifies a SID_AND_ATTRIBUTES structure representing the user associated with the access token. There are currently no attributes defined for user security identifiers (SIDs).
    1 point
  11. sorry I missed the second pointer Local $pSid = DllStructGetData($tPtrSid, 1) If Not _Security__IsValidSid($pSid) Then ; Just to make sure $pSid is a pointer to a valid SID MsgBox($MB_SYSTEMMODAL, "", "The SID is invalid.") ExitLoop EndIf Local $iSidBytesLen = _Security__GetLengthSid($pSid) I believe he has pretty much what you have there danyfirex also I'm guessing (.) dot access of structs is here to stay its been there over 4 years since you asked?? Thats wonderful news! #include <SecurityConstants.au3> #include <WinAPI.au3> Example_TokInfo() Func Example_TokInfo() Local $hProcess = _WinAPI_GetCurrentProcess() If @error Then Return ; check for possible errors Local $hToken = _Security__OpenProcessToken($hProcess, $TOKEN_ALL_ACCESS) ; If token is get... If $hToken Then Local Const $sTag_SID_AND_ATTRIBUTES = "ptr psid;dword Attributes" ; Get information about the type of this token: Local $tInfo = _Security__GetTokenInformation($hToken, $TOKENUSER) Local $tsa = DllStructCreate($sTag_SID_AND_ATTRIBUTES, DllStructGetPtr($tInfo)) Local $pSid = $tsa.psid Local $IsValidSid = _Security__IsValidSid($pSid) Local $tBytes, $iSidLength If $IsValidSid Then $iSidLength = _Security__GetLengthSid($pSid) $tBytes = DllStructCreate("ALIGN 4;byte[" & $iSidLength & "]", $pSid) ConsoleWrite("Sid Hex: " & DllStructGetData($tBytes, 1) & @CRLF) ConsoleWrite("Sid: " & _Security__SidToStringSid ($pSid) & @CRLF) EndIf ; Close the token handle _WinAPI_CloseHandle($hToken) EndIf Return EndFunc ;==>Example_TokInfo I'm still not sure what having the raw struct does for you I was under the impression that you were to pass the pointer directly or convert the sid to a string first and use that form in other functions @tukangusil7 I think you will have to supply more information as far as what you want to do with this data
    1 point
  12. Hello You need to declare _SID_AND_ATTRIBUTES like this: "ptr psid;dword Attributes" The you can the correct Windows API to manage the SID So then you can do this: #include <SecurityConstants.au3> #include <WinAPI.au3> Example_TokInfo() Func Example_TokInfo() Local $hProcess = _WinAPI_GetCurrentProcess() If @error Then Return ; check for possible errors Local $hToken = _Security__OpenProcessToken($hProcess, $TOKEN_ALL_ACCESS) ; If token is get... If $hToken Then Local Const $sTag_SID_AND_ATTRIBUTES = "ptr psid;dword Attributes" ; Get information about the type of this token: Local $tInfo = _Security__GetTokenInformation($hToken, $TOKENUSER) Local $tsa = DllStructCreate($sTag_SID_AND_ATTRIBUTES, DllStructGetPtr($tInfo)) Local $pSID = $tsa.psid Local $aCall = DllCall("Advapi32.dll", "dword", "GetLengthSid", "ptr", $pSID) Local $iSidLength = $aCall[0] $aCall = DllCall("Advapi32.dll", "bool", "IsValidSid", "ptr", $pSID) Local $IsValidSid = $aCall[0] If $IsValidSid Then Local $tBytes = DllStructCreate("byte[" & $iSidLength & "]", $pSID) ConsoleWrite("Sid Hex: " & DllStructGetData($tBytes, 1) & @CRLF) EndIf ; Close the token handle _WinAPI_CloseHandle($hToken) EndIf EndFunc ;==>Example_TokInfo Saludos
    1 point
  13. @AutoBert is right. And this is quite interesting feature (I never used it before). https://msdn.microsoft.com/en-us/library/windows/desktop/bb774936(v=vs.85).aspx btw. Using the example from HelpFile for: _GUICtrlListView_SetGroupInfo if you change: ; change this following line ; _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1") ; to this two following line _GUICtrlListView_SetGroupInfo($idListview, 1, "New Group 1", 0, $LVGS_COLLAPSIBLE + $LVGS_COLLAPSED) _GUICtrlListView_SetGroupInfo($idListview, 2, "New Group 2", 0, $LVGS_COLLAPSIBLE + $LVGS_SELECTED) Then you get exactly effect which you ask in OP.
    1 point
  14. SmOke_N

    Hide/Show Mouse

    This should hide it over your GUI:_SetCursorState(0) Func _SetCursorState($bValue = 1) DllCall('User32.dll', 'int', 'ShowCursor', 'int', $bValue) EndFunc Edit: 1 (True) will make it show / 0 (False) will hide it
    1 point
×
×
  • Create New...