Cid Posted September 30, 2013 Share Posted September 30, 2013 Is there an option to have a program running in the background, with mouse movement and clicks and not effect your current project? Maybe something with AutoItSetOption(), with Pixel & Mouse Coord Mode. Example: Playing Minesweeper minimized, while playing Heaths Maximized. Link to comment Share on other sites More sharing options...
water Posted September 30, 2013 Share Posted September 30, 2013 Welcome to AutoIt and the forum! Make sure to read the forum rules. A link can be found at the bottom right of each page. Game automation of any kind isn't permitted here. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Cid Posted September 30, 2013 Author Share Posted September 30, 2013 Thanks for having me. I wan't really meaning minesweeper and hearts, It was an example of the the process I am looking to write my script to do. I have a program I have to watch that has a green light pop up, and I have to write that code that follows it into a e-mail and send it. I got that script working, but I want to have the window minimized so I can do other things beside just having that window open and controlling my mouse. Link to comment Share on other sites More sharing options...
Astormooke Posted October 1, 2013 Share Posted October 1, 2013 Is your email online? such as gmail or yahoo? If so you can control the window while its minimized using _IE commands. Link to comment Share on other sites More sharing options...
water Posted October 1, 2013 Share Posted October 1, 2013 Can you please be a bit mor specific? What does "watch a program that has a green light pop up" mean? If we know which program you try to automate we can propose a secure and reliable solution. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
Cid Posted October 1, 2013 Author Share Posted October 1, 2013 I want to run this in the background, so I can work on other projects and this script not take control of my mouse and have the Monitor window minimized. expandcollapse popup#Region #AutoIt3Wrapper_UseX64=n #EndRegion #include <ImageSearch.au3> HotKeySet("{s}", "StartScript") HotKeySet("{z}", "PauseScript") HotKeySet("{q}", "QuitScript") Global $Start = 0 Global $Light = 0 Global $LightX = 0 Global $LightY = 0 WinActivate("Monitor") Func StartScript() $Start = 1 EndFunc Func Light() Local $Light = _ImageSearcharea("LightOn.bmp", 1, 960, 0, 1440, 270, $LightX, $LightY, 100) If $Light = 1 Then MouseClickDrag("Left", $LightX, $LightY, $LightX+72, $LightY, 1) Send("^c") Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("^v") EndIf EndFunc Func PauseScript() $Start = 0 EndFunc Func QuitScript() Exit EndFunc While 1 If $Start = 1 Then Light() EndIf Sleep(1000) WEnd As for the program, it's just called Monitor. It's a basic GUI that monitor one of the controllers in the plant. Link to comment Share on other sites More sharing options...
Astormooke Posted October 2, 2013 Share Posted October 2, 2013 When the mouse clicks and drags, what is it dragging on? Specifics only make it easier for us to help you guinness 1 Link to comment Share on other sites More sharing options...
Kidney Posted October 2, 2013 Share Posted October 2, 2013 it looks like you r doing a copy and a paste. i would recommend looking at FileOpen and FileWriteLine. this will eliminate the need to have the notepad open and will speed up your script. Link to comment Share on other sites More sharing options...
Cid Posted October 2, 2013 Author Share Posted October 2, 2013 But Can this Script be minimized the way I have it? Link to comment Share on other sites More sharing options...
Kidney Posted October 2, 2013 Share Posted October 2, 2013 no it will not run. the key component to your entire script is imagesearch. if imagesearch fails every time, your script is useless. imagesearch can only search for an image that is present on the screen. you might want to use the AU3Info tool in scite and see if you can get a handle on the light in the monitor program. Astormooke 1 Link to comment Share on other sites More sharing options...
Cid Posted October 3, 2013 Author Share Posted October 3, 2013 Ok thx, and I will look into the fileopen and filewriteline. 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