Sign in to follow this  
Followers 0
DarkCloud

Help Please!

17 posts in this topic

Hello, im new to autoit and I wanted to start off with something small.

I have this little program on my computer that pops up with a "Buy it now" popup.

It's not a real popup, its like a little box that just pops up in the exe.

I want autoit to scan for the window, then close it.

WinWaitActive()

I figured that statement would wait for the window to become active.

but how do i close it, and how do i do a loop properly?

yes im a newb... flame away =D

Thank you all for viewing, and especally thanks to the people who try to help!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

First, please be more descriptive in your title.

Second, use the AutoIt Window Info Tool to find out the real title of the window (sometimes has leading spaces) and the control names. Then you can use something like ControlClick("Window Title", "", "Button1") to close the pop-up after you use the WinWait("WindowTitle") to look for the window.

<edit>

However, the best thing to do would be to use AdAware and/or SpyBot S&D to search for whatever malware/crimeware/spyware is on your computer making the pop-up in the first place.

Edited by SerialKiller

Share this post


Link to post
Share on other sites

First, please be more descriptive in your title.

Second, use the AutoIt Window Info Tool to find out the real title of the window (sometimes has leading spaces) and the control names. Then you can use something like ControlClick("Window Title", "", "Button1") to close the pop-up after you use the WinWait("WindowTitle") to look for the window.

<edit>

However, the best thing to do would be to use AdAware and/or SpyBot S&D to search for whatever malware/crimeware/spyware is on your computer making the pop-up in the first place.

Thanks.

It's not spyware or malware.

Its just some program im useing as a trial verson and it pops up asking me to buy it like every 5 minutes.

Problem is, when it pops up, the program stops working untill I close it. And usualyl when i run the program im not at the computer.

I know how to control click, but the "X" button at the top right does not have a control name..

So what would I do in this situation?

Share this post


Link to post
Share on other sites

When it becomes active, kill it with WinKill().


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

WinWaitActive(Buy Now!)

WinKill(Buy Now!)

How do I loop this?

Also,

Does WinWaitActive mean its active?? Can it be minimzed or not selected for the winkill to take place?

Share this post


Link to post
Share on other sites

no, it means it will wait until it is actually active. Change the WinWaitActive to WinWait if you need it to work when not selected.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Try This

while 1
if winexists("Buy Now!") Then
    WinKill("Buy Now!")
EndIf
WEnd

Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Maybe this will help you:

Opt("WinTitleMatchMode", 2)
$WinTitle = "Buy Now!" ;change this to the title of the window
While 1
   If WinExists($WinTitle) Then
       Do 
         WinKill($WinTitle) 
       Until Not WinExists($WinTitle)
   EndIf
Wend
Edited by D-Generation X

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Pauses execution of the script until the requested window is active.

Couldn't have been explained any clearer in my eyes, so what's to be confused by ? Edited by Helge

Share this post


Link to post
Share on other sites

Maybe this will help you:

Opt("WinTitleMatchMode", 2)
$WinTitle = "Buy Now!" ;change this to the title of the window
While 1
   If WinExists($WinTitle) Then
       Do 
         WinKill($WinTitle) 
       Until Not WinExists($WinTitle)
   EndIf
Wend

Ok, i understand all of that except for the very very first line you have there.

Whats "Opt("WinTitleMatchMode", 2)" do???

Share this post


Link to post
Share on other sites

The Mode 2 of that option says that it will match any substring in the title. So if the title has trailing spaces or weird characters before or after it, it will still recognize the window.


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

The Mode 2 of that option says that it will match any substring in the title. So if the title has trailing spaces or weird characters before or after it, it will still recognize the window.

Ok, I took out the option because both of my titles are close.

Title of the popup

Title: Online Hold'em Inspector

Title of the actual program i need.

Title: Online Hold'em Inspector 2.33d4

Even when I take out the option, It closes both programs.

Why is that?

Share this post


Link to post
Share on other sites

Try mode 3 instead of 2:

Opt("WinTitleMatchMode", 3)

Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

Nope, still closes both.

Share this post


Link to post
Share on other sites

Use the Autoit Window Information tool to get some text from the pop-up you want to kill.


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

Share this post


Link to post
Share on other sites

#16 ·  Posted (edited)

What code would I use to kill it then???

$WinTitle = "Online Hold'em Inspector"

While 1

If WinExists($WinTitle) Then

Do

WinActivate($WinTitle)

WinKill($WinTitle)

Until Not WinExists($WinTitle)

EndIf

Wend

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

Buy Now (web)

evaluate

Party Poker

Coral Poker

UltimateBet

Poker Stars

Gaming Club

Royal Vegas

Empire Poker

Full Tilt Poker

PokerRoom

Eurobet Poker

Paradise Poker

Absolute Poker

WPEX

7 Sultans Poker

Ladbrokes Poker

Hollywood Poker

(29 days left)

InterPoker

Littlewoods Poker

William Hill Poker

Unibet Poker

Bet365 Poker

River Belle Poker

Intertops Poker

BetHoldem

Crazy Poker

Poker Plex

Sun Poker

Edited by DarkCloud

Share this post


Link to post
Share on other sites

$WinTitle = "Online Hold'em Inspector"
While 1
If WinExists($WinTitle, "Buy Now") Then
Do
WinKill($WinTitle,"Buy Now")
Until Not WinExists($WinTitle,"Buy Now")
EndIf
Wend


Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house.

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