Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 16:59

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



AutoIT - WinList

Discussion on AutoIT - WinList within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2007
Posts: 393
Received Thanks: 78
AutoIT - WinList

Hello, I am making a program, which can detect mBot (SRO Bot) and then Hide it. I got the CLASS of the mBot window so a part of the code looks like this:
Code:
Func _RefreshBot()
    _GUICtrlListView_BeginUpdate($listviewmBot)
    _GUICtrlListView_DeleteAllItems($listviewmBot)
    $Client = WinList ("[CLASS:#32770]")
    If $Client[0][0] > 0 Then
        For $X = 1 To $Client[0][0]
            GUICtrlCreateListViewItem($Client[$X][0], $listviewmBot)
        Next
    Else
        GUICtrlCreateListViewItem("No Bots Found", $listviewmBot)
    EndIf
    _GUICtrlListView_EndUpdate($listviewmBot)
EndFunc
but
when I launch the script, it shows me all programs with CLASS:#32770...Is there any way to specify that I want to see only mBot windows?
I hope you understand what i want to do...If not, ask me, I can add screens...
Thanks in advance
blackeagle93 is offline  
Old 12/25/2010, 00:12   #2
 
elite*gold: 0
Join Date: Dec 2007
Posts: 393
Received Thanks: 78
oh, wrong section? sry then, where should I place it?

and i dont list windows with mbot name coz the title of the bot is: [X] mBot vY (ZSRO)
X=character name
Y=bot version
Z=silkroad version
blackeagle93 is offline  
Old 12/25/2010, 00:17   #3
 
ZeraPain's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
we got an autoit section here..



Code:
$windows = WinList()
For $i = 1 To $windows[0][0]
	If StringRegExp($windows[$i][0], "mBot") = 1 Then
		MsgBox(0,0,$windows[$i][0])
	EndIf
Next
ZeraPain is offline  
Thanks
1 User
Old 12/25/2010, 00:44   #4
 
elite*gold: 0
Join Date: Dec 2007
Posts: 393
Received Thanks: 78
thanks, but I am a newbie and dont rly know how to get it work that the mbot window appears in the GUI WinList...can send u the source by PM
blackeagle93 is offline  
Old 12/25/2010, 01:53   #5
 
ZeraPain's Avatar
 
elite*gold: 0
Join Date: Jan 2010
Posts: 360
Received Thanks: 249
instead of the msgbox create a listview item.
ZeraPain is offline  
Old 12/25/2010, 10:59   #6
 
elite*gold: 0
Join Date: Dec 2007
Posts: 393
Received Thanks: 78
Code:
Func _RefreshBot()
    _GUICtrlListView_BeginUpdate($listviewmBot)
    _GUICtrlListView_DeleteAllItems($listviewmBot)
    $windows = WinList()
For $i = 1 To $windows[0][0]
	If StringRegExp($windows[$i][0], "mBot") = 1 Then
		GUICtrlCreateListViewItem($windows[$i][0], $listviewmBot)
	EndIf
Next
EndFunc
like this? it doesnt show the bot windows in the list
blackeagle93 is offline  
Old 12/25/2010, 11:22   #7
 
elite*gold: 0
Join Date: Jul 2009
Posts: 2,241
Received Thanks: 848
Quote:
Originally Posted by blackeagle93 View Post
Code:
Func _RefreshBot()
    _GUICtrlListView_BeginUpdate($listviewmBot)
    _GUICtrlListView_DeleteAllItems($listviewmBot)
    $windows = WinList()
For $i = 1 To $windows[0][0]
	If StringRegExp($windows[$i][0], "mBot") = 1 Then
		GUICtrlCreateListViewItem($windows[$i][0], $listviewmBot)
	EndIf
Next
EndFunc
like this? it doesnt show the bot windows in the list
There you go:
Code:
$win = WinList()
			GUICtrlSetData($List1,"")
			For $i = 1 To $win[0][0]
				If $win[$i][0] <> "" AND $win[$i][0] <> "Program Manager" AND $win[$i][0] <>  "Start" AND _WinAPI_IsWindowVisible($win[$i][1]) Then 
					GUICtrlSetData($List1,$win[$i][0],"")
				EndIf
			Next
mipez is offline  
Thanks
1 User
Old 12/25/2010, 11:47   #8
 
elite*gold: 0
Join Date: Dec 2007
Posts: 393
Received Thanks: 78
^I do not understand your code

btw is there any way to minimize the AutoIT program to the bar next to the clock?
pardon the language :X:X
blackeagle93 is offline  
Old 12/25/2010, 12:06   #9
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
AFAIK this should work:
Code:
Func _RefreshBot()
    _GUICtrlListView_BeginUpdate($listviewmBot)
    _GUICtrlListView_DeleteAllItems($listviewmBot)
    $Client = WinList("[CLASS:#32770[COLOR="Red"];TITLE:mBot[/COLOR]]")
    If $Client[0][0] > 0 Then
        For $X = 1 To $Client[0][0]
            GUICtrlCreateListViewItem($Client[$X][0], $listviewmBot)
        Next
    Else
        GUICtrlCreateListViewItem("No Bots Found", $listviewmBot)
    EndIf
    _GUICtrlListView_EndUpdate($listviewmBot)
EndFunc
KDeluxe is offline  
Old 12/25/2010, 12:24   #10
 
elite*gold: 0
Join Date: Dec 2007
Posts: 393
Received Thanks: 78
ok so, i made it...mostly
ty all for your help
big thanks to mipez
blackeagle93 is offline  
Reply




All times are GMT +1. The time now is 17:00.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.