Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Specific Lines of Code
#1
Hello,

I was wondering how a user would go about putting in something like a breaker. Something that would allow the user to run from Point A (Start) to Point B (Middle) and stop the code after it hits Point B. Allowing the user to review to see if anything went wrong, and if something did go wrong allow the user to edit their code. After Point A to Point B is working perfectly move on to Point B to Point C and so on.

I thought I found something like what I wanted here

Macro length

I used the outs in my code to see if it would stop after Point B, but it just ran to the end. The example in there may just be setup to stop if something goes wrong. My current code sometimes works correctly and sometimes doesn't.

Any help would be grateful, Thank you
#2
1. Can disable code.

Example
Macro Macro1750
Code:
Copy      Help
out

out "A"
out "AA"
out "AAA"

out "B"
out "BB"
out "BBB"

now select the out B lines and right click the selection bar:
Macro Macro1750
Code:
Copy      Help
out

out "A"
out "AA"
out "AAA"

;out "B"
;out "BB"
;out "BBB"

2. ret or #ret

Example
Macro Macro1750
Code:
Copy      Help
out

;point A

out "A"
out "AA"
out "AAA"

ret ;;point B

out "B"
out "BB"
out "BBB"

;point C
#3
Thank you once more for your help Gintaras it helped me out very much. I am now able to test sections of my code at a time to help train my debugging skills.
#4
also I sometimes use goto
Macro Macro1751
Code:
Copy      Help
out

;point A
goto point B

out "A"
out "AA"
out "AAA"

;point B

out "B"
out "BB"
out "BBB"

;point C
#5
sometimes I build in firebreaks using "wait for key"

Macro Macro2
Code:
Copy      Help
out

wait 0 KF V

out "A"
out "AA"
out "AAA"

wait 0 KF V

out "B"
out "BB"
out "BBB"
An old blog on QM coding and automation.

The Macro Hook
#6
wait 0 KF V

Nice trick, thanks for sharing.


Forum Jump:


Users browsing this thread: 4 Guest(s)