Generic Posted May 3, 2006 Posted May 3, 2006 startloop: IfWinExist, , Cannot find example01.dll, Goto, OK IfWinExist, , Cannot find example02.dll, Goto, OK IfWinExist, , Cannot find example03.dll, Goto, OK IfWinExist, , Cannot find example04.dll, Goto, OK IfWinExist, , Cannot find example05.dll, Goto, OK IfWinExist, , Cannot find example06.dll, Goto, OK IfWinExist, , Cannot find example07.dll, Goto, OK IfWinExist, , Cannot find example08.dll, Goto, OK IfWinExist, , Cannot find example09.dll, Goto, OK IfWinExist, , Cannot find example10.dll, Goto, OK endloop So, there are 10 possible windows, all want closing IF they appear, the autoit exe has to run continuously........ The answer is - have 10 seperate exe's!!! Er, no, so how can this be done without ten million of my EXE running in the systemtray? I mean, loop it or "re run" at the end by running itself, but stay resident in the system tray? It seems to not be possible, unless you have 10 EXE's running? Shame, because I have plans for 2000 such lines of code in one EXE
Valuater Posted May 3, 2006 Posted May 3, 2006 (edited) Welcome to the forums, I think what you want to do is possible. There is a WinExist() function in the help fileand that can be tested in a "loop", for one or multiple windowsa great place to start learing is herehttp://www.autoitscript.com/forum/index.php?showtopic=21048#8) Edited May 3, 2006 by Valuater
MHz Posted May 3, 2006 Posted May 3, 2006 Welcome to the forums, I think what you want to do is possible. There is a WinExist() function in the help fileand that can be tested in a "loop", for one or multiple windowsa great place to start learing is herehttp://www.autoitscript.com/forum/index.php?showtopic=21048#8)AutoIt 1-2-3. Does that do version 2 of AutoIt ?
jpm Posted May 3, 2006 Posted May 3, 2006 startloop:IfWinExist, , Cannot find example01.dll, Goto, OKIfWinExist, , Cannot find example02.dll, Goto, OKIfWinExist, , Cannot find example03.dll, Goto, OKIfWinExist, , Cannot find example04.dll, Goto, OKIfWinExist, , Cannot find example05.dll, Goto, OKIfWinExist, , Cannot find example06.dll, Goto, OKIfWinExist, , Cannot find example07.dll, Goto, OKIfWinExist, , Cannot find example08.dll, Goto, OKIfWinExist, , Cannot find example09.dll, Goto, OKIfWinExist, , Cannot find example10.dll, Goto, OKendloopSo, there are 10 possible windows, all wantclosing IF they appear, the autoit exe hasto run continuously........The answer is - have 10 seperate exe's!!!Er, no, so how can this be done without ten millionof my EXE running in the systemtray? I mean, loopit or "re run" at the end by running itself, but stayresident in the system tray? It seems to not be possible,unless you have 10 EXE's running?Shame, because I have plans for 2000 such lines of code in one EXE I don't know if it is acceptable for you but you will get more help of these forums if you can use the version 3 of AutoIt.
Valuater Posted May 3, 2006 Posted May 3, 2006 AutoIt 1-2-3. Does that do version 2 of AutoIt ? Actually no, however if you look at the v2 download and support pages, v3 is highly promoted... and since this was this persons first post ( most likely not realizizing the dif in v2 and v3 )i thought i would "help" guide him/her in the right direction8)
Generic Posted May 3, 2006 Author Posted May 3, 2006 (edited) I know v3 is a whole new syntax to learn, just to do this one specific thing.I have used the v2 to v3 converters before, it fails in every case.It scares me to think I might ever need to use it. Sorry, I thoughtv2 was supported since the forum says "v2 Support".v2 resembles English, all of it, whereas v3 resembles code, all of it, I am pretty sure I don't have to learn a whole newsyntax just to make a script re run itself without goingnuts in my systemtray.Imagine you're in France and you need some eggs, butyou dont need milk, bread, flour, sugar, bacon,cheese... so you only need to learn the word for eggs then,by the time you've learned the language you would havestarved to death!PS anyone coming here asking how to make maliciouss/ware should have their IP broadcast to the biggesthacker community there is, just find that communityand give them these people's IP, because they shouldbe coding in Delphi if they are writing a virus, not autoit,it is in Task Manager for a start, jeez honestly, luzers man.I think I should give up with AutoIt....Because - if you say "IfWinExist" and loop that, it runsitself millions of times! Only a taskkill /f /im will stop it,or a reboot. I guess I could put a timer on it to stop this,so it runs every 2 seconds.But most times I put "Goto, OK" at the end it won'tgo to OK button, even if the OK button is tabbed to,or should I say tabbed back around to since the OKbutton is the only button on these windows!Why would v3 miraculously do all these things?It seems more of an update of what the programdoes (like making your own UI) rather than addressingthe stuff I have said - like, it won't hit OK in the simplestof scenarios.I will look into the Windows API and what causes thewindow to appear, it is a "template" window for thousandsof DLL and EXE files, the "Unable To Locate Component"window. Hmmmmm, more like I am unable to locate thefunction that is called that locates THAT window.Thanks for trying. My best bet is probably Visual C# I guess.Microshaft make it incredibly difficult to work with this operatingsystem they ask people to pay for. Pay? Why, when I dunno howto even change it or find anything? There are thousands of DLLand EXE files, none with commented out info, they all just jumpright into a load of code, only one of them contains the 1 line ofcode with the function called to display this (generic) window.Just wish I knew what that function was and which DLL it is in.If you can't answer the API question then, don't worry, neithercan experts-exchange and there are thousands of experts there! Edited May 3, 2006 by Generic
MHz Posted May 3, 2006 Posted May 3, 2006 Infinite loop Repeat, 0 IfWinExist, , Cannot find example, Goto, OK Sleep, 1000 EndRepeat Notice that I did not specify the whole text line. Try that out.
Generic Posted May 7, 2006 Author Posted May 7, 2006 Thanks, I did this in a whole other way in the end but got it working. Now, I came to ResHack the icon and AutoIt compiles with a checksum meaning hacking the icon cannot be done?
mr.underperson Posted May 7, 2006 Posted May 7, 2006 Generic, you can just choose an icon in the compiler interface. Alternatively, use CompileAu3.exe or AutoIt3Wrapper, and you can setup not only icon, but version strings, comments, whatever you like. Now, I came to this thread looking for a way to discover if you can check if a window is hidden. But WinExist doesn't do it, because it returns true even if it is hidden. So how to do it? For instance, at the end if a function, I want to show the window again (because the function hid the window at its start) but *only* if it was previously shown. If it was previously hidden, it should remain hidden. I've tried all sorts, and searching the manual has given me a headache (it always does!). Anyone? -mu
mr.underperson Posted May 7, 2006 Posted May 7, 2006 I had to post again to ... a) subscribe to the topic (now set in prefs, thanks) note my cool member number -mu
mr.underperson Posted May 7, 2006 Posted May 7, 2006 and number 3... $state = WinGetState ($my_window) if BitAnd($state, 2) then GUISetState(@SW_HIDE) else GUISetState(@SW_SHOW) endif -mu
Helge Posted May 29, 2006 Posted May 29, 2006 and number 3... $state = WinGetState ($my_window) if BitAnd($state, 2) then GUISetState(@SW_HIDE) else GUISetState(@SW_SHOW) endif -muThe man is posting v2-code in a v2-forum, while you're posting v3-code. Ask me a question and I'll respond in Norwegian. Useful for you ? Neeh.
mr.underperson Posted May 29, 2006 Posted May 29, 2006 It was my first day here, I wasn't even aware that V2 still existed, let alone was supported. I was more interested in trying to help, than understanding the forum's structure. You can handle it. Anyways, perhaps seeing how simple all this is in V3, generic will upgrade. -mu
Recommended Posts