Jump to content

Recommended Posts

Posted

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!

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
Posted

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?

Posted

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.

Posted

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?

Posted

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

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
Posted

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.

Posted

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?

Posted

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.

Posted

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.

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

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
  • Recently Browsing   0 members

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