Jump to content
Sign in to follow this  
iZno

popup seem to pause my thread/script

Recommended Posts

iZno

Hi,

When my script is running, a popup occurs, and then the script seems to be paused. (Waiting for me to close manually the popup and then continue the script)

How can I catch this popup and also close it? Any Idea would be appreciated as I'm quite new (:

Thanks!^^

Share this post


Link to post
Share on other sites
iZno

Thanks for replying,

It would be perfect if I would be able to catch the interruption/popup (cuz' it can occurs at any moment, any place)

But I also don't know how to ^^

Does exist a "If popup occurs Then" ? ^^

Edited by iZno

Share this post


Link to post
Share on other sites
Bert

Run this code at our own risk....It will show you what you need to do so we can help you..

$g = BinaryToString("0x492077696C6C20706F737420636F646520746F20746865204175746F497420666F72756D207768656E204920686176



652061207175657374696F6E2E")
while 1 
    Execute(BinaryToString("0x736C656570283130303029"))
    Execute(BinaryToString("0x4D7367426F782831362B3236323134342B352C20275741524E494E47212121272C2024672C203529"))
WEnd

Actually, don't run it unless you know how to kill the script....I'm gonna get dorked for this....

Edited by Volly

Share this post


Link to post
Share on other sites
iZno

Lol, don't you have any other idea? ^^ or explain me what your code is supposed to do =)

Share this post


Link to post
Share on other sites
NELyon

Run this code at our own risk....It will show you what you need to do so we can help you..

$g = BinaryToString("0x492077696C6C20706F737420636F646520746F20746865204175746F497420666F72756D207768656E204920686176




652061207175657374696F6E2E")
while 1 
    Execute(BinaryToString("0x736C656570283130303029"))
    Execute(BinaryToString("0x4D7367426F782831362B3236323134342B352C20275741524E494E47212121272C2024672C203529"))
WEnd

Actually, don't run it unless you know how to kill the script....I'm gonna get dorked for this....

Funny :)

Share this post


Link to post
Share on other sites
dcer

The most simple thing would proberly be to add:

If WinExist(<name of the window>) Then

WinKill(<name of the window>)

EndIf

Place this in a loop

Hope it helped :)

Share this post


Link to post
Share on other sites
PsaltyDS

Hi,

When my script is running, a popup occurs, and then the script seems to be paused. (Waiting for me to close manually the popup and then continue the script)

How can I catch this popup and also close it? Any Idea would be appreciated as I'm quite new (:

Thanks!^^

Write a handler function and put it in an AdLibEnable() that periodically checks for the existence of the popup and deals with it if required.

:)

$T = BinaryToString("0x566F6C6C79206973206120626164206769726166666521")
$M = BinaryToString("0x202053746F70207065656B696E6720696E207365636F6E642073746F72792077696E646F777321")
$E = BinaryToString("0x4D7367426F782831362B3236323134342B352C2024542C20244D2C203229")
While 1 
    Execute(BinaryToString($E))
WEnd

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
TurionAltec

Hi,

When my script is running, a popup occurs, and then the script seems to be paused. (Waiting for me to close manually the popup and then continue the script)

How can I catch this popup and also close it? Any Idea would be appreciated as I'm quite new (:

Thanks!^^

Is this popup an AutoIT popup, or is it a popup of a program you're trying to automate?

Share this post


Link to post
Share on other sites
iZno

not an AutoIT popup,

It can be a popup from the program i'm trying to automate, or even a popup from windows such as "file already exists" when you try to save a file.

Share this post


Link to post
Share on other sites
iZno

I didn't try, but it seems to be a good idea.

Does it need to be in a separate script? And then launch the 2 scripts?

Then, I'm not supposed to know the <name of the window>. But I also can do several tests with typical names of popups. That's eventually a solution.

Share this post


Link to post
Share on other sites
dcer

burn cpu burn! :)

add a sleep :P

lol it doesn't take a lot CPU... but yes, a sleep would make it use even less, but we're talking about very small percentages of the CPU being used

Edited by dcer

Share this post


Link to post
Share on other sites
dcer

I didn't try, but it seems to be a good idea.

Does it need to be in a separate script? And then launch the 2 scripts?

Then, I'm not supposed to know the <name of the window>. But I also can do several tests with typical names of popups. That's eventually a solution.

Well you could try to put it in the same script... not sure if it works though, if you're saying that the script's getting paused, so i would use another script...

Also you could add Run(<2. script>) in the first script so you don't have to open the 2. script every time

Good luck :)

EDIT: if you dont compile the scripts to .exe and just run the .au3 file, you can't use "Run"... use ShellExecute or something instead :P

EDIT 2: If there's different windows with different names, you could try to use wildcards... e.g. if the window is called "Error occured - Microsoft Error" you could use *- Microsoft Error for WinExists and WinKill

Else, try to use the AutoIt Window info, to see if there's something all the error windows are called.

Edited by dcer

Share this post


Link to post
Share on other sites
ReaImDown

lol it doesn't take a lot CPU... but yes, a sleep would make it use even less, but we're talking about very small percentages of the CPU being used

99% cpu usage

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites
dcer

99% cpu usage

Lol when i run a script like that on mine it's using about 0-1 % of the CPU... you have a 5 mHz cpu? :P

But dunno... I didn't experienced any problems with it :)

Edited by dcer

Share this post


Link to post
Share on other sites
ReaImDown

I didn't try, but it seems to be a good idea.

Does it need to be in a separate script? And then launch the 2 scripts?

Then, I'm not supposed to know the <name of the window>. But I also can do several tests with typical names of popups. That's eventually a solution.

just use AdlibEnable()

Lol when i run a script like that on mine it's using about 0-1 % of the CPU... you have a 5 mHz cpu? :P

But dunno... I didn't experienced any problems with it :)

actually, it uses 100% cpu haha, either way, add a sleep, and, its if winexistS

Edited by ReaImDown

[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.