Jump to content

Having trouble on Closing an active window.


AntiBNI
 Share

Recommended Posts

ok heres my code

Case $PM = 6
If PixelGetColor (122,591)=305140 Then
WinClose ("Nomad of Silver Spirit - Nostale")
EndIf
EndSelect
Select
    Case $talk = 6
If PixelGetColor (122,591)=16382457 Then
WinClose ("Nomad of Silver Spirit - Nostale","")
EndIf
EndSelect

well its just the part that dosent work.

aniways the thing is that i want the Bot to when some one Whispers me (Private Messege) the bot Closes the Game in this case Nomad of Silver Spirit - Nostale.

It aint closing the window,i dont know why but its not closing it. :P

Thanks in Advice.

Cheers,

Anti

Link to comment
Share on other sites

ok heres my code

Case $PM = 6
 If PixelGetColor (122,591)=305140 Then
 WinClose ("Nomad of Silver Spirit - Nostale")
 EndIf
 EndSelect
 Select
     Case $talk = 6
 If PixelGetColor (122,591)=16382457 Then
 WinClose ("Nomad of Silver Spirit - Nostale","")
 EndIf
 EndSelect

well its just the part that dosent work.

aniways the thing is that i want the Bot to when some one Whispers me (Private Messege) the bot Closes the Game in this case Nomad of Silver Spirit - Nostale.

It aint closing the window,i dont know why but its not closing it. :P

Thanks in Advice.

Cheers,

Anti

try using Opt in ur code.

Opt("WinTitleMatchMode", 2)

Just a guess though. Also u can try using AutoItInfo.exe to see what info it shows for your window. Another debuging trick that I use is to put a message box in the part of the code that you think doesn't work and see what it shows you. Like set up message box to show u a return error for WinClose and see why it doesn't close.

Edited by sheckandar
Live and Learn, 'cause Knowledge is Super Power.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...