tutui Posted February 20, 2006 Share Posted February 20, 2006 Hi,well, I have a application running on a server. Unfortunatly this application is not really stable (I didn't hacked it, I'm justing trying to give it a workaround, because the developer in question does not have any time to fix the problem). So this application has a window which is opened when it works. There is a "close" and a "cancel" button on that window. What I want to do now, is to use autoit to get the focus on the window and click on the "close" button once in a day. After that i want to restart the application. As i mentioned it in the topic title, I will define a scheduled task to recycle the application. Hope you can follow me... I know, there is a easy script solution to that problem using a little kille application, but I can use that because the application has to be closed properly. So I wanted to do that job with autoit...I converted the autoit script to an .exe file. If I now start the .exe file manually everything works fine. But when i lock the account on the server and close my remote session, the .exe file will not do the work. If I login once again on the server, the .exe file will automatically starte his execution...Has anyone an idea how to deal with this issue?Here is the little script:WinActivate("vitoMailCheck", "")WinWaitActive("vitoMailCheck")Sleep(1000)Send("{ENTER}")Sleep(1000)Run("vitoMailCheck.exe")Sleep(1000)Thanks.Regards,tutui. Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 20, 2006 Share Posted February 20, 2006 its because the window is locked autoit can't handle this as far as i know try: winclose ("vito mail check") run ("vitoMailCheck.exe") my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
tutui Posted February 20, 2006 Author Share Posted February 20, 2006 Thanks for your reply. Are you sure that there isn't any possibility to deal with a locked account? Well, I can't either use what you suggest, because when I close the application by simply closing the window the application recognize the close as kind of failure... so it will generate an error and will not be closed safely! I know this sounds a little strange... but as I wrote it above, this is really a little crap of an application... clicking on the "close" button will close the application safely, but clicking e.g. on the "x" at the top right of the window will causing the application to crash... Other suggestions? Thanks. Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 20, 2006 Share Posted February 20, 2006 have you tried controlsend() or controlclick() as well? maybe this works for you - but i'm not sure if this works while locked my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
tutui Posted February 20, 2006 Author Share Posted February 20, 2006 Thanks again for your reply. Well, how do I use the controlsend() or controlclick() functions? The window just habe a "cancel" button and a "close" button, but I can't control them with a shortcut (e.g."Alt+...") or something like that... the only way to control the two buttons is to use the "tab" to get to the button I want to click and hit "enter"... any suggestions? Thanks. Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 20, 2006 Share Posted February 20, 2006 use autoitwindowinfo to get the control of the button than controlclick ("vitoMailCheck", "", "ID", "left", 1) its worth trying my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
tutui Posted February 20, 2006 Author Share Posted February 20, 2006 Ok, I got it... let me try it! Acting like a newbie... sorry. Link to comment Share on other sites More sharing options...
tutui Posted February 20, 2006 Author Share Posted February 20, 2006 I'm back... Well I tried your suggestion with the ControlClick command, but it didn't work! Is there really no possibility to manage some windows when the account is locked? I still can't believe it... Thanks. use autoitwindowinfo to get the control of the button than controlclick ("vitoMailCheck", "", "ID", "left", 1) its worth trying 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