marscom Posted February 12, 2008 Share Posted February 12, 2008 (edited) Hey all, basically I need my script to at any point while running, perform a specifc action if the window I am working with closes. I cant actually post the code since the script contains some sensitive info, but I will provide a general structure of the functions It looks like this expandcollapse popupFunc Start $i = 0 While $i <> 1 If 'blah blah' ; Lots of if statments Elseif Function2() Endif Wend EndFunc Func Function2() FuncA() FuncB() FuncC() FuncD() EndFunc FuncA() ;Long complicated code EndFunc FuncB() ;Long complicated code EndFunc FuncC() ;Long complicated code EndFunc FuncD() ;Long complicated code EndFunc Anyways basically my problem is the window could disapear at any point, say for example while it is running FuncC() or while it is running Start() - I split my code up to make it easier to manage the long sections of code but this means if the window dissapears suddenly the script will not recognise it straight away unless I put an If WinExists($win_title,"")<>1 in front of every single section of code. I just want to stick in a piece of code that will always moniter if the window exists and will notice at any point if it no longer exists, break any function running and run a seperate function. How could I do this? Sorry If I couldnt explain best but thanks in advance for any help! Marscom Edited February 12, 2008 by marscom Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 12, 2008 Share Posted February 12, 2008 Read about AdlibEnable() .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
marscom Posted February 12, 2008 Author Share Posted February 12, 2008 Read about AdlibEnable()Omg... I had no idea that even existed. You saved me god knows how many hours work... Thankyou, seriously. Link to comment Share on other sites More sharing options...
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