Jump to content

Search the Community

Showing results for tags 'arraydisplay'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. Hello World! So I have this code #include <Array.au3> Run("C:\Windows\System32\query user>>c:\GTScript\query.txt") $aFileArray = FileReadToArray("c:\GTScript\query.txt") -1 ; NOTE: the first line of the file is in element 0, but that only holds column headers so we start from 1! For $lineIndex = 1 to UBound($aFileArray) ; Let's take every group of non-whitespace characters from the current line and put it in an array: $aSplit = StringRegExp($aFileArray[$lineIndex], "(\S+)", $STR_REGEXPARRAYGLOBALMATCH) _ArrayDisplay($aSplit, "All elements on line") ; We know the format of the file, so we know where the values will be in the array: $userName = $aSplit[0] $userId = $aSplit[2] MsgBox(64, "Info", "Username: " & $userName & @CRLF & "ID: " & $userId) Next Do you have an Idea on how to rewrite it so it allways tells me row 2 of a certain user, no matter in which Column of ArrayDisplay he is? Post examples please, since I am still a rookie! With kind regards Eddi96
  2. Hello guys! I have a little problem in one of my function/functions. Here is my code: Func IsVisible($handle) If BitAND(WinGetState($handle), 4) Then ;If Not BitAND(WinGetState($handle), 16) Then If BitAND(WinGetState($handle), 2) Then Return 1 Else Return 0 EndIf EndIf EndFunc ;==>IsVisible Func _GetWindows() ; Global $i = 12 ;Local $anumber = 0 / or use &i? Dim $VisibleWindows[1][2] = [["0", ""]] $AllWindows = WinList() For $i = 1 To $AllWindows[0][0] If IsVisible($AllWindows[$i][1]) Then If $AllWindows[$i][0] <> "" And $AllWindows[$i][0] <> "Program Manager" Then ReDim $VisibleWindows[UBound($VisibleWindows) + 1][2] $VisibleWindows[0][0] = $VisibleWindows[0][0] + 1 $VisibleWindows[($VisibleWindows[0][0])][0] = $AllWindows[$i][0] $VisibleWindows[($VisibleWindows[0][0])][1] = $AllWindows[$i][1] EndIf Else EndIf Next _ArrayDisplay($VisibleWindows, "Visible Windows") ;If WinClose("Visible Windows", "") = 1 Then Idle() EndFunc ;==>_GetWindows This should display all windows and their respective handels that WinList function can find, and display it in a "Visible Windows" titled arraydisplay. All good there, script runs as expected. I copied the code for the _GetWindows() from here, and implemented it with minimal changes as I recall (sorry I found it more then a month ago). My problem is that If I try to close the "Visible Windows" Window, the script just reopens anotherone, basicly the only thing I can do is terminate the script somehow after I started to display this. I'm pretty sure that there is something small that I miss, but since I can't really bend my mind around the _GetWindows array creation, I can't really pinpoint why it opens it again when I close it. (I try to used WinClose but thats just stupid since there is noproblem with closing, the problem is the reopening, realized that while I was writing it) Thank you for your help!
×
×
  • Create New...