Kjstan Posted July 9, 2012 Share Posted July 9, 2012 I wasn't sure what to search for, so if it has been brought up before I apologize. I have control clicks set up and everything works well except one thing. I want the script to click the coords I have set up while the window is minimized. As of now if I minimize the window and run the script it will automatically activate the window and open it back up before making the clicks. What do I have to add to make it work in the background? If I am working on something on my other monitor it will switch the focus to the other window and it isn't working well. Link to comment Share on other sites More sharing options...
JohnOne Posted July 9, 2012 Share Posted July 9, 2012 I I asked you a question about your issue, would you even respond? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Kjstan Posted July 9, 2012 Author Share Posted July 9, 2012 Yea, last time you asked what happened when it ran. When I originally posted I was pretty lost, and then came up with the second part after reading a bit more, I guess I was wanting to know if that script looked correct to you as I didn't need it to shut off for about 5 hours.. After the 5 hours it seemed to work right so I just left it at that. Now I am trying to convert the same code to work in the background so that I can do other things while it runs, I know the pixel search wont work in background mode so I plan to have 2 different files. One to run while I am wanting to use my pc for other things, and another to run while I am away so that it will shut itself off. This is basically what I have so far: expandcollapse popupHotKeySet("{DELETE}","terminate") Func terminate() MsgBox(0,"Done","Done") Exit EndFunc sleep (1000) While 1 Sleep ( 3000 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1220, 585) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1220, 585) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 852, 702) Sleep(Random(3000, 4000)) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1158, 589) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1158, 589) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 852, 702) Sleep(Random(3000, 4000)) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1171, 620) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1171, 620) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 852, 702) Sleep(Random(3000, 4000)) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1070, 589) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1070, 589) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 852, 702) Sleep(Random(3000, 4000)) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1018, 659) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 1018, 659) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 852, 702) Sleep(Random(3000, 4000)) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 945, 645) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 945, 645) Sleep ( 700 ) ControlClick ( "Google Chrome", "", "Chrome_RenderWidgetHostHWND1", "left", 1, 852, 702) Sleep(Random(300000,350000)) Wend Link to comment Share on other sites More sharing options...
JohnOne Posted July 9, 2012 Share Posted July 9, 2012 (edited) As far as I know google chrome needs to be active to accept control* functions. This is not a bug, it's stated in the help file that some GUIs will need activeness. Firefox 4+ will be no good either, nor will opera, for the sake of my old scripts, I have FireFox 3.8x installed as that is the only browser I know works with such things. EDIT: Apart from Internet Explorer of course, which is by far the best choice when working with web content. Edited July 9, 2012 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Kjstan Posted July 9, 2012 Author Share Posted July 9, 2012 Ah that would make sense, guess it is time to browse around for an old version of firefox. Thanks, hopefully it will work. Link to comment Share on other sites More sharing options...
JohnOne Posted July 9, 2012 Share Posted July 9, 2012 Good luck, but do not dismiss IE, it will probably do what you want without any need for ControlClicks. There is an extensive standard UDF for it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Kjstan Posted July 9, 2012 Author Share Posted July 9, 2012 I downloaded Firefox version 3.6.28 from Oldverison.com and it seems to be working at the moment. Thanks again. Link to comment Share on other sites More sharing options...
JohnOne Posted July 9, 2012 Share Posted July 9, 2012 Excellent. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. 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