Post by Steve on Aug 14, 2021 10:38:35 GMT
Whats been added to the update?
New Condition:
1. IF/THEN/ELSE blocks.
This update adds formed IF/THEN/ELSE logic to macro's.
When building the condition via the 'Add Condition' tool adding THEN action will also add a closing END IF statement.
If the condition evaluates to true then all the subsequent conditions within the IF THEN block will run.
More information on IF/THEN/ELSE blocks can be found at www.turnssoft.com/conditions.html#thenelse.
Here is an example of a formed IF THEN block:
1 | IF | FILE | C:\Macro\File\output.txt | EXIST | THEN
2 | RUN ACTION | DEFINE INTEGER VARIABLE | COUNT::+1
3 | RUN ACTION | DEFINE STRING VARIABLE | %strFileOutput%::%count%: %date%-%TIME%
4 | RUN ACTION | OUTPUT TO FILE | C:\Macro\File\output.txt::APPEND_NEWLINE::%strFileOutput%
5 | IF | END IF
Here is an example of a formed IF THEN ELSE block:
1 | IF | DETECT IMAGE | image path C:\File\pics\capture.bmp::match quick::move mouse yes | IMAGE FOUND | THEN
2 | RUN ACTION | MOUSE CLICK | Left click at %mouse_x% %mouse_y% 10 times with 10 ms delay and lock the mouse
3 | RUN ACTION | DEFINE BOOLEAN VARIABLE | %boolImageFound%::TRUE
4 | IF | ELSE
5 | RUN ACTION | DEFINE PIXEL RANGE VARIABLE | %PIXEL_RANGE%::At location [X:89 Y:124 W:100 H:100]::Save image to C:\File\pics\capture.bmp
6 | RUN ACTION | DEFINE BOOLEAN VARIABLE | %boolImageFound%::FALSE
7 | RUN ACTION | WAIT SECONDS | 5
8 | IF | END IF
9 | IF | BOOLEAN VARIABLE | %boolImageFound% | IS FALSE | GOTO MACRO LINE | 1
Improvements:
Fix:
1. MOUSE CLICK action failing to launch from an IF condition (BZ21 www.turnssoft.com/bugtrack.html#bugs)
2. Detect Image dialog X, Y, W, H empty text exception (BZ22 www.turnssoft.com/bugtrack.html#bugs)
3. Quick Launch '0' loop playback dialog notification (BZ23 www.turnssoft.com/bugtrack.html#bugs)
4. Detect Image condition and Mouse to Image action failure to declare Mouse X and Y var (BZ24 www.turnssoft.com/bugtrack.html#bugs)
New Condition:
1. IF/THEN/ELSE blocks.
This update adds formed IF/THEN/ELSE logic to macro's.
When building the condition via the 'Add Condition' tool adding THEN action will also add a closing END IF statement.
If the condition evaluates to true then all the subsequent conditions within the IF THEN block will run.
More information on IF/THEN/ELSE blocks can be found at www.turnssoft.com/conditions.html#thenelse.
Here is an example of a formed IF THEN block:
1 | IF | FILE | C:\Macro\File\output.txt | EXIST | THEN
2 | RUN ACTION | DEFINE INTEGER VARIABLE | COUNT::+1
3 | RUN ACTION | DEFINE STRING VARIABLE | %strFileOutput%::%count%: %date%-%TIME%
4 | RUN ACTION | OUTPUT TO FILE | C:\Macro\File\output.txt::APPEND_NEWLINE::%strFileOutput%
5 | IF | END IF
Here is an example of a formed IF THEN ELSE block:
1 | IF | DETECT IMAGE | image path C:\File\pics\capture.bmp::match quick::move mouse yes | IMAGE FOUND | THEN
2 | RUN ACTION | MOUSE CLICK | Left click at %mouse_x% %mouse_y% 10 times with 10 ms delay and lock the mouse
3 | RUN ACTION | DEFINE BOOLEAN VARIABLE | %boolImageFound%::TRUE
4 | IF | ELSE
5 | RUN ACTION | DEFINE PIXEL RANGE VARIABLE | %PIXEL_RANGE%::At location [X:89 Y:124 W:100 H:100]::Save image to C:\File\pics\capture.bmp
6 | RUN ACTION | DEFINE BOOLEAN VARIABLE | %boolImageFound%::FALSE
7 | RUN ACTION | WAIT SECONDS | 5
8 | IF | END IF
9 | IF | BOOLEAN VARIABLE | %boolImageFound% | IS FALSE | GOTO MACRO LINE | 1
Improvements:
1. Clearer error messages for syntax related macro errors.
2. Limiting of internal string, boolean, and decimal variables to VAR1 through to VAR9 in favor for custom names.
Fix:
1. MOUSE CLICK action failing to launch from an IF condition (BZ21 www.turnssoft.com/bugtrack.html#bugs)
2. Detect Image dialog X, Y, W, H empty text exception (BZ22 www.turnssoft.com/bugtrack.html#bugs)
3. Quick Launch '0' loop playback dialog notification (BZ23 www.turnssoft.com/bugtrack.html#bugs)
4. Detect Image condition and Mouse to Image action failure to declare Mouse X and Y var (BZ24 www.turnssoft.com/bugtrack.html#bugs)
5. The 'Time and date' condition will not allow manual edit of time and date from the 'Add Condition' tool (BZ25 www.turnssoft.com/bugtrack.html#bugs)
6. Minor fix to patch keypress ENTER failing to output a return.