Jitbit Macro Recorder - IF Image statement, why it is not waiting until the image appears? - testing

I am using Jitbit MacroRecorder and it is a really helpful tool. The problem is this: By using the IF image found feature, I want the program to execute 2 sequential commands as soon as the image I selected on my screen appears. However, the program is putting too much load on the CPU by running thousands of times until the IF statement is true. What I want is for the program to WAIT until the image in the IF image found statement appears on the screen, that is, not to run thousands of times.
My simple code

The only way for the program to know when the image appears is to continuously "scan" the screen until it sees it. You may be able to use the image NOT found feature inside a loop with a delay. You would look for the image, and if not found, delay a second, and then look for it again. The tradeoff is you will have that delay in there which will keep your program from running the following commands immediately.

Related

Pyautogui automation - Identify waiting time issue

I am trying to automate a task with pyautogui. After a click program starts loading for few second and this time varies every time. Th script has to wait for that time to perform next operation/click. I was thinking to take the screenshot but in screenshot mouse cursor is not showing and loading is shown on the cursor itself. what could be the best possible way to identify this loading time and stop the script for that seconds before performing next instructions.
You provided vague details, but I'll try to provide a way given what I understood.
So basically when you click, a program starts loading, and you want to find out when the program finished loading so you can execute the next part of the script?
If the program was gui based, I'm pretty sure, there are pixel changes before loading and after loading, you could for example use pyautogui.pixelMatchesColor(x, y, (R, G, B)) on a loop, to check whether a pixel in the program has changed, this could mean that the program finished loading.

Google Colab: What does a spinning play button with broken line mean?

Recently, I have seen the play button (the one to execute the cell) will have a spinning state with broken line as border and staying like this for a long time. But eventually, the line will turn solid and the thing will execute relatively fast after that. I would like to understand what the "broken" boundary mean? It seems to me it just hangs there waiting for something before actually running any code.
See image attach on that play button.
The spinning dashed line means the execution of the cell is queued behind an earlier execution.
(If you haven't yet executed a cell, it's likely that the backend is blocked by attempting to generate a completion or objection inspection. These should finish within a few seconds.)

How to make Photoshop jsx run faster by stop updating rendering when script is running

I have a Photoshop jsx action to do a bunch of time-consuming jobs. I assume that it could be much faster if Photoshop stops rendering to screen on every action. So that Photoshop will show nothing until the script done.
Is there any way I can do that?
I don't believe you can halt redrawing entirely, however, for big batch processes I always make sure to do togglePalettes(); before and after the main code execution. This will hide all the tool palettes which should speed things up a bit by avoiding updating them while your script runs.

Stop execution in smalltalk

I´d like to know how can I stop execution in smalltalk. I entered an infinite loop and don´t want to loose the code that´s written. I tried using pause button but doesn´t seem to be right.
Normally, even if you are unable to stop execution, you should be able to get the code changes you made back from the .changes file. If you can restart the image, there is a 'recover lost changes' menu entry. Always first make a backup copy of the changes and image files before trying this. (In Pharo/Squeak. Other smalltalk have similar possibilities)
it depends on the dialect and possibly keyboard settings.
try CMD-. or CTRL-., which works in most dialects.

Event-case management in while-loop

If I put the blocks showed in the picture in a while-loop everything fail, fo example the stop button does not working!
Someone could explain to me how use events correctly?
thanks
Also try to avoid coercion dots (small red dots near some blocks like add) the data type is changed dynamically (I32 to double) but it is not efficient and the convention in LabVIEW is to change the data type mostly manually.
You have not connected the timeout terminal.
How it always waits for an event and will not allow you to stop the loop. As it does not iterate, it waits.
To stop the loop you should specify Stop button Event, so your loop will iterate upon clicking on stop and you will be able to stop it. OR you can just specify timeout let say 100 ms and Loop will iterate on timeout case once every 100ms, even there is no event.
The other answers tell you how to patch your code so that your current architecture continues working. But that architecture is fundamentally flawed if your application gets larger -- you're going to waste lots of CPU redrawing needlessly and you're going to end up with lags in your UI. A proper LV separation of business logic from graphics logic would look like the image shown below. This image is a LV clip from LV 2015, meaning if you save the image to disk and then drop it directly onto LV 2015 or later, the code will just drop directly. Sorry, I don't have an earlier version of LV with me at the moment so I can't give you a clip for a previous version, but the code below should work all the way back to LV 6.1 (circa 2001a.d.) if you recode it.