BigDod Posted January 22, 2006 Posted January 22, 2006 (edited) it opens everything twice still cept yahoo messenger and it only closes 1 of everything else when there is two of them open and it still isnt touching yahoo messenger its as if yahoo isnt even thereUse the code in ChrisL or my reply instead of yours and it will work. Compare yours to it and you will see your error.Edit - too slow again Edited January 22, 2006 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
ChrisL Posted January 22, 2006 Posted January 22, 2006 Just to point out.. the "I am An Arse = 1" was directed at me for leaving the loop out [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
bojak71730 Posted January 22, 2006 Author Posted January 22, 2006 well these codes arent working for me and i have the beta version of autoit
Moderators SmOke_N Posted January 22, 2006 Moderators Posted January 22, 2006 (edited) Create a test script by itself without trying to put it in your own code. The codes work, it's probably just your implementation. After creating a 'Blank' Test.au3 script insert this code: HotKeySet("!{F9}", "Close");alt + F9 to close Dim $Explorer = Run(@ProgramFilesDir & '\Internet Explorer\IEXPLORE.EXE') Dim $Calc = Run('calc.exe') Dim $NotePad = Run('Notepad.exe') Dim $Yahoo = Run(@ProgramFilesDir & '\Yahoo!\Messenger\YPager.exe') $IamAnArse = 1 While $IAmAnArse Sleep (1000) Wend Func Close() If ProcessExists($Explorer) Then ProcessClose ($Explorer) If ProcessExists($Calc) Then ProcessClose ($Calc) If ProcessExists($NotePad) Then ProcessClose ($NotePad) If ProcessExists($Yahoo) Then ProcessClose ($Yahoo) $IamAnArse = 0 EndFunc Notice this code does not require 'Beta', but just to keep things simple: Run the code using Alt+F5 (holding both the Alt down while you press F5) Then as the windows are all open, use the Alt+F9 (again holding down Alt while you press F9). Also, make sure the paths are correct for you for your yahoo and internet explorer. If it still doesn't work, Close SciTe, Close AutoIt, and enjoy your family/friends for the rest of the day. P.S. What OS are you using, just for curiousity sakes? Edit: I noticed that there was an un-needed set of quotes in the Run() yahoo. Edited January 22, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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