Jump to content

Make Script Run Indefinitely?


LePucco
 Share

Recommended Posts

<snip>

Hello Bro, 

i am self learning and gave myself a project and I am getting there.

I am looking for a way to run a script that handles a especific window  and automates tasks on it based on PixelSearch. Now, what happens is that it works fine, clicks and does what it is supposed to, but then if I minimize it or even if I dont actually minimize it but just put a window on top of that, it will 'pause' the script until I actually bring the window back up.

So is there a way to have the window set as 'always active' even if its minimized or in the background?, or a workaround to make it work when its minimized?

Best regards.

Edited by Melba23
Huge quote removed
Link to comment
Share on other sites

  • Moderators

LePucco,

In future, rather than necro-post in a 9 year old thread and include a completely unnecessary massive quote, please just open a new thread and link to the old thread - as I have now done for you.

M23

 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

9 hours ago, LePucco said:

but then if I minimize it or even if I dont actually minimize it but just put a window on top of that, it will 'pause' the script until I actually bring the window back up

That's normal behaviour, or can you see which picture is shown on your tv, when someone has put a big thing before it?

Windows in background aren't updated.

Edited by AutoBert
Link to comment
Share on other sites

lol.  I'm guessing it was a necro quote of my post that got edited.  Since I got an alert I've been quoted but don't directly see it.   I'm not here on a regular basis.  Just lucky this time.  :)

Funny.  I still use a modified version of what Melba23 linked to many years later.  (well for the non gui scripts anyhow)  But not really related to your question since it looks like you have that part figured out.

As mentioned above.  Yes, thats normal for PixelSearch since its looking at your screen output and not the program output you want to monitor.   You can try to use controls to monitor the part of the program in question and see the changing data directly.  Those are always active.  It does not matter if the program is in the background or minimized.

Controls can be hard to use when first learning,   I still have to try a few things to figure them completely out when I need to access one.  But there is usually more then one way to accomplish what you want. 

If controls do not work for you in this case then look at the registry or for changes in a file.  It depends on what your trying to do and how the monitored app is interacting with your system.  Does the program in question have an api?  For example, autoit has some great excel functions built in but excel also has a bunch of functions you can call directly to do a lot more then what is in the autoit excel functions.  Many programs are built with scripting in mind.  If it has functions built in for other languages then its likely autoit can also access them.

And welcome to Autoit.  I had no idea how deep the rabbit hole was that I fell into when I first started using it many years ago.    its an Amazing language and there are lots of very talented and helpful users here in the forums.

Post some test code and I'm sure someone will be able to point you in the right direction of what you should be looking at.

right then.....  Off to do some research on why I dropped by today.  :bye:

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...