Sign in to follow this  
Followers 0
acana007

getting window titles

5 posts in this topic

CODE
#include <file.au3>

Dim $aRecords

If Not _FileReadToArray("example.idkft",$aRecords) Then

MsgBox(4096,"Error", " Error reading log to Array error:" & @error)

Exit

EndIf

while 1

Sleep(4000)

For $x = 1 to $aRecords[0]

If WinExists($aRecords[$x]) Then

WinClose($aRecords[$x])

EndIf

Next

WEnd

what i need it to do is i need to read not just the first word of the title but the entire title?

any help or suggestions

Share this post


Link to post
Share on other sites



Search the help file for WinList

it puts it into an array but i don't understand how to use it with my ententions

Share this post


Link to post
Share on other sites

CODE
#include <file.au3>

Dim $aRecords

If Not _FileReadToArray("example.idkft",$aRecords) Then

MsgBox(4096,"Error", " Error reading log to Array error:" & @error)

Exit

EndIf

while 1

Sleep(4000)

For $x = 1 to $aRecords[0]

If WinExists($aRecords[$x]) Then

WinClose($aRecords[$x])

EndIf

Next

WEnd

what i need it to do is i need to read not just the first word of the title but the entire title?

any help or suggestions

$title = WinGetTitle("Untitled -", "")

MsgBox(0, "Full title read was:", $title)

Share this post


Link to post
Share on other sites

Is this what you need?

$GUI = GUICreate("Text Reveal", 270, 120, -1, -1, "", 0x00010088)
GUICtrlCreateLabel("Pick the window", 95, 10)
$Combo1 = GUICtrlCreateCombo("", 10, 30, 250, 20)
$Button1 = GUICtrlCreateButton("Reveal Text", 90, 60)
$Button2 = GUICtrlCreateButton("R", 230, 60, 25, 25)
$Button3 = GUICtrlCreateButton("Exit", 190, 60, 40)
_Refresh()

GUISetState()
While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = $Button3
        Exit
    Case $nMsg = $Button1
        $Read = GUICtrlRead($Combo1)
        $Text = WinGetText($Read)
        MsgBox(4096 + 262144, "", $Text)
    Case $nMsg = $Button2
        _Refresh()
    EndSelect
WEnd

Func _Refresh()
$List = WinList()
For $i = 1 To $List[0][0]
    If $List[$i][0] <> "" And IsVisible($List[$i][1]) Then
        GUICtrlSetData($Combo1, $List[$i][0])
    EndIf
Next
EndFunc

Func IsVisible($Handle)
    If BitAnd(WinGetState($Handle), 2) Then 
        Return 1
    Else
        Return 0
    EndIf
EndFunc

Not the whole script. Just the: _Refresh().

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0