iZno Posted June 12, 2008 Posted June 12, 2008 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!^^
Valuater Posted June 12, 2008 Posted June 12, 2008 no idea.. just a guess try... Send("{TAB}") Send("{ENTER}") 8)
iZno Posted June 12, 2008 Author Posted June 12, 2008 (edited) 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 June 12, 2008 by iZno
Bert Posted June 12, 2008 Posted June 12, 2008 (edited) 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 June 12, 2008 by Volly The Vollatran project My blog: http://www.vollysinterestingshit.com/
iZno Posted June 12, 2008 Author Posted June 12, 2008 Lol, don't you have any other idea? ^^ or explain me what your code is supposed to do =)
NELyon Posted June 12, 2008 Posted June 12, 2008 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
dcer Posted June 12, 2008 Posted June 12, 2008 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
PsaltyDS Posted June 12, 2008 Posted June 12, 2008 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
TurionAltec Posted June 13, 2008 Posted June 13, 2008 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?
iZno Posted June 13, 2008 Author Posted June 13, 2008 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.
dcer Posted June 13, 2008 Posted June 13, 2008 While 1 If WinExist(<name of the window>) Then WinKill(<name of the window>) EndIf WEnd This didn't work?
ReaImDown Posted June 13, 2008 Posted June 13, 2008 While 1 If WinExist(<name of the window>) Then WinKill(<name of the window>) EndIf WEnd This didn't work? burn cpu burn! add a sleep [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
iZno Posted June 13, 2008 Author Posted June 13, 2008 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.
dcer Posted June 13, 2008 Posted June 13, 2008 (edited) burn cpu burn! add a sleep 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 June 13, 2008 by dcer
dcer Posted June 13, 2008 Posted June 13, 2008 (edited) 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 timeGood 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 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 WinKillElse, try to use the AutoIt Window info, to see if there's something all the error windows are called. Edited June 13, 2008 by dcer
ReaImDown Posted June 13, 2008 Posted June 13, 2008 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 used99% cpu usage [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
dcer Posted June 13, 2008 Posted June 13, 2008 (edited) 99% cpu usageLol when i run a script like that on mine it's using about 0-1 % of the CPU... you have a 5 mHz cpu? But dunno... I didn't experienced any problems with it Edited June 13, 2008 by dcer
ReaImDown Posted June 13, 2008 Posted June 13, 2008 (edited) 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? 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 June 13, 2008 by ReaImDown [u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now