|
Post by cyberchipz on Feb 14, 2020 1:09:34 GMT
I'm not sure what's going on here... things were running great, short of shutting down the computer and restarting, which I will do and add anything new. %INTEGER2% gets assigned a value from the INPUT BOX; and we can see it has that value, yet later, the value becomes zero, as seen by this EVENT LOG, there is nothing that I can see that is changing this value, and yet it changes back to 0 (zero). Any ideas? ... previous lines left out 02/13/2020 06:27:26.11 PM : Macro condition: 9 | RUN ACTION | INPUT BOX | Number of Trips::Trip Count::INTEGER2 02/13/2020 06:27:26.13 PM : Macro condition - Condition TRUE 02/13/2020 06:27:26.14 PM : Macro action - Running ACTION: INPUT BOX 02/13/2020 06:27:29.76 PM : Macro action - Variable 'INTEGER2' auto corrected to '%INTEGER2%' I've tried using this naming convention; but it doesn't like it.02/13/2020 06:27:29.77 PM : Macro action - InputBox (%INTEGER2%=2) HERE we see it assigned properly02/13/2020 06:27:29.79 PM : Macro condition: 10 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER3%::*2000 02/13/2020 06:27:29.80 PM : Macro condition - Condition TRUE 02/13/2020 06:27:29.82 PM : Macro action - Variable (%INTEGER3% = *2000) 02/13/2020 06:27:29.83 PM : Macro condition: 11 | IF | STRING VARIABLE | %STRING2% | IS | NO | STOP 02/13/2020 06:27:29.85 PM : Macro condition - Condition FALSE 02/13/2020 06:27:29.86 PM : Macro condition: 12 | IF | INTEGER VARIABLE | %INTEGER% | GREATER THAN EQUAL TO | %INTEGER2% | GOTO MACRO LINE | MoreAction 02/13/2020 06:27:29.88 PM : Macro condition - 0>=2 <== Here we see that it is still 2, but below it has lost the value below this when there's been no action upon it?02/13/2020 06:27:29.89 PM : Macro condition - Condition FALSE 02/13/2020 06:27:29.91 PM : Macro condition: 13 | IF | INTEGER VARIABLE | %INTEGER% | IS | 0 | GOTO MACRO LINE | SendTraveler 02/13/2020 06:27:29.93 PM : Macro condition - 0=0 02/13/2020 06:27:29.94 PM : Macro condition - Condition TRUE 02/13/2020 06:27:29.96 PM : Macro action - Running ACTION: GOTO MACRO LINE - Macro line(SendTraveler) 02/13/2020 06:27:29.97 PM : Macro condition: 17 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER1%::%RANDOM_600-1000% 02/13/2020 06:27:29.99 PM : Macro condition - Condition TRUE 02/13/2020 06:27:30.01 PM : Macro action - Variable (%INTEGER1% = %RANDOM_600-1000%) 02/13/2020 06:27:30.02 PM : Macro condition: 18 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::%RANDOM_15-30% 02/13/2020 06:27:30.04 PM : Macro condition - Condition TRUE 02/13/2020 06:27:30.05 PM : Macro action - Variable (%INTEGER4% = %RANDOM_15-30%) 02/13/2020 06:27:30.06 PM : Macro condition: 19 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::+%INTEGER3% 02/13/2020 06:27:30.08 PM : Macro condition - Condition TRUE 02/13/2020 06:27:30.10 PM : Macro action - Variable (%INTEGER4% = +%INTEGER3%) 02/13/2020 06:27:30.11 PM : Macro event: 20 | 837 | 846 | 782 | Left Click 02/13/2020 06:27:30.72 PM : Macro condition: 21 | IF | INTEGER VARIABLE | %INTEGER% | GREATER THAN | 0 | GOTO MACRO LINE | SkipClick 02/13/2020 06:27:30.73 PM : Macro condition - 0>0 02/13/2020 06:27:30.74 PM : Macro condition - Condition FALSE 02/13/2020 06:27:30.75 PM : Macro event: 22 | 837 | 846 | 782 | Left Click 02/13/2020 06:27:31.52 PM : Macro condition: 23 | IF | INTEGER VARIABLE | %INTEGER% | LESS THAN | %INTEGER2% | DEFINE INTEGER VARIABLE | %INTEGER%::+1 02/13/2020 06:27:31.55 PM : Macro condition - 0<0 <==HERE %INTEGER2% has lost it's value?02/13/2020 06:27:31.56 PM : Macro condition - Condition FALSE 02/13/2020 06:27:31.58 PM : Macro condition: 24 | IF | INTEGER VARIABLE | %INTEGER% | LESS THAN | %INTEGER2% | GOTO MACRO LINE | LoopTraveler 02/13/2020 06:27:31.59 PM : Macro condition - 0<0 <== AGAIN The value is gone for %INTEGER2%?02/13/2020 06:27:31.60 PM : Macro condition - Condition FALSE .... lines following this left out ***Restarting the Computer did not change anything, the error still shows... I attached the original code, perhaps you can see something that I did not notice... Perhaps I'm overburdening the LABELS as comments somehow... but I don't know how that would affect a variable's content.
|
|
|
Post by cyberchipz on Feb 14, 2020 5:25:43 GMT
So, since I don't know debug, I used an old technique to watch the variables. It doesn't make much sense, but the drop out, or internal reassignment of %INTEGER2% seems to occur after line 17 and/or before line 25 in the file I attached in this reply. It seems to point to a Label causing an issue... I renamed the label in case I was using a keyword for MMM and creating a conflict... but the name change didn't affect the bug. This is reminding me of an old pointer error I ran into once. The pointer, an index into a variable storage memory location (a table of pointer variables), had accidentally pointed into the wrong starting position for each pointer variable. Because the counter was off by 1 it wasn't noticed (the same pointer references retrieved the data) except it had affected the boundary of the adjoining variable space, which happened to be first byte of that space, the index into a 2nd table of pointers. It created a null index pointer that was easy to find; but almost impossible to find the cause. The null pointer got flagged by the run time, but where it came from wasn't indicated. Probably not related, but well... one never knows. I did run into an error before this all started during a Relist Rows command. An error popped up indicating a malformed line reference; but, I couldn't tell what line it was referencing. I looked for one, and never found it; but, Relisting did not return any more errors. A bad comment that wasn't a label? I'm not sure. And I'm also not completely sure if the %INTEGER2% error started up immediately after that. Unless there's an invisible, non-printing, space of some kind that's still there... I have both opened the code in Notepad and Notepad++ and saved and loaded it into MMM and that had no effect. So, if there's an invalid character neither of those two apps made any fuss. This is the story of my life, if there's a bug to be made or had, I can make it, or find it. I hope this can be resolved... as it is, this code is useless to me now. (sigh) As I remember it though, when it happened. It was running right... then it hit an error. Since I had input only the number 2 for the number of trips %integer2%, I thought I had miscalculated the start or the end of the run. IOW an error of 1 on either the start, or the end of the run, and decided the code was cloggy and reorganized the logic determination of the counter to happen at the end of the run instead of the beginning. But, it turned out the issue was the variable value, an not an error in my logic, I presume. I hope it's not just some typo I'm missing. I took a break, and looked at it after my eyes rested, and can't find anything wrong with the coding. Help?! lol
|
|
|
Post by Steve on Feb 14, 2020 6:12:41 GMT
So, since I don't know debug, I used an old technique to watch the variables. It doesn't make much sense, but the drop out, or internal reassignment of %INTEGER2% seems to occur after line 17 and/or before line 25 in the file I attached in this reply. Ok - I ran this macro file 'Test A Distance Traveled Shaman.mmmacro' and this is what I got:
Event Time Text 02/14/2020 05:08:47.25 PM Starting macro playback 02/14/2020 05:08:47.26 PM Macro condition: 1 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::0 02/14/2020 05:08:47.28 PM Macro condition - Condition TRUE 02/14/2020 05:08:47.30 PM Macro action - Variable (%INTEGER% = 0) 02/14/2020 05:08:47.32 PM Macro condition: 2 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER1%::%RANDOM_600-1000% 02/14/2020 05:08:47.33 PM Macro condition - Condition TRUE 02/14/2020 05:08:47.34 PM Macro action - Variable (%INTEGER1% = %RANDOM_600-1000%) 02/14/2020 05:08:47.36 PM Macro condition: 3 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER2%::0 02/14/2020 05:08:47.37 PM Macro condition - Condition TRUE 02/14/2020 05:08:47.39 PM Macro action - Variable (%INTEGER2% = 0) 02/14/2020 05:08:47.41 PM Macro condition: 4 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER3%::0 02/14/2020 05:08:47.42 PM Macro condition - Condition TRUE 02/14/2020 05:08:47.44 PM Macro action - Variable (%INTEGER3% = 0) 02/14/2020 05:08:47.46 PM Macro condition: 5 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::0 02/14/2020 05:08:47.47 PM Macro condition - Condition TRUE 02/14/2020 05:08:47.49 PM Macro action - Variable (%INTEGER4% = 0) 02/14/2020 05:08:47.52 PM Macro condition: 6 | RUN ACTION | INPUT BOX | Enter Distance in Seconds::Seconds::INTEGER3 02/14/2020 05:08:47.54 PM Macro condition - Condition TRUE 02/14/2020 05:08:47.57 PM Macro action - Running ACTION: INPUT BOX 02/14/2020 05:08:49.41 PM Macro action - Variable 'INTEGER3' auto corrected to '%INTEGER3%' 02/14/2020 05:08:49.44 PM Macro action - InputBox (%INTEGER3%=2) 02/14/2020 05:08:49.47 PM Macro condition: 7 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER5%::%INTEGER3% 02/14/2020 05:08:49.51 PM Macro condition - Condition TRUE 02/14/2020 05:08:49.55 PM Macro action - Variable (%INTEGER5% = %INTEGER3%) 02/14/2020 05:08:49.57 PM Macro condition: 8 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER5%::+3 02/14/2020 05:08:49.59 PM Macro condition - Condition TRUE 02/14/2020 05:08:49.61 PM Macro action - Variable (%INTEGER5% = +3) 02/14/2020 05:08:49.63 PM Macro condition: 9 | RUN ACTION | INPUT BOX | Number of Trips::Trip Count::INTEGER2 02/14/2020 05:08:49.66 PM Macro condition - Condition TRUE 02/14/2020 05:08:49.67 PM Macro action - Running ACTION: INPUT BOX 02/14/2020 05:08:51.00 PM Macro action - Variable 'INTEGER2' auto corrected to '%INTEGER2%' 02/14/2020 05:08:51.03 PM Macro action - InputBox (%INTEGER2%=2) 02/14/2020 05:08:51.06 PM Macro condition: 10 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER9%::%INTEGER2% 02/14/2020 05:08:51.09 PM Macro condition - Condition TRUE 02/14/2020 05:08:51.11 PM Macro action - Variable (%INTEGER9% = %INTEGER2%) 02/14/2020 05:08:51.13 PM Macro condition: 11 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 11::0 02/14/2020 05:08:51.15 PM Macro condition - Condition TRUE 02/14/2020 05:08:51.17 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 11::0) 02/14/2020 05:08:53.43 PM Macro condition: 12 | IF | INTEGER VARIABLE | %INTEGER9% | IS | %INTEGER2% | DEFINE INTEGER VARIABLE | %INTEGER2%::%INTEGER9% 02/14/2020 05:08:53.47 PM Macro condition - 2=2 02/14/2020 05:08:53.49 PM Macro condition - Condition TRUE 02/14/2020 05:08:53.52 PM Macro action - Variable (%INTEGER2% = %INTEGER9%) 02/14/2020 05:08:53.54 PM Macro condition: 13 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 13::0 02/14/2020 05:08:53.56 PM Macro condition - Condition TRUE 02/14/2020 05:08:53.58 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 13::0) 02/14/2020 05:08:56.03 PM Macro condition: 14 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER3%::*2000 02/14/2020 05:08:56.06 PM Macro condition - Condition TRUE 02/14/2020 05:08:56.10 PM Macro action - Variable (%INTEGER3% = *2000) 02/14/2020 05:08:56.12 PM Macro condition: 15 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 15::0 02/14/2020 05:08:56.14 PM Macro condition - Condition TRUE 02/14/2020 05:08:56.16 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 15::0) 02/14/2020 05:08:58.03 PM Macro condition: 16 | IF | INTEGER VARIABLE | %INTEGER% | GREATER THAN EQUAL TO | %INTEGER2% | GOTO MACRO LINE | MoreAction 02/14/2020 05:08:58.07 PM Macro condition - 0>=2 02/14/2020 05:08:58.09 PM Macro condition - Condition FALSE 02/14/2020 05:08:58.11 PM Macro condition: 17 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 17::0 02/14/2020 05:08:58.13 PM Macro condition - Condition TRUE 02/14/2020 05:08:58.15 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 17::0) 02/14/2020 05:08:59.39 PM Macro condition: 18 | IF | INTEGER VARIABLE | %INTEGER% | IS | 0 | GOTO MACRO LINE | ATraveler 02/14/2020 05:08:59.42 PM Macro condition - 0=0 02/14/2020 05:08:59.44 PM Macro condition - Condition TRUE 02/14/2020 05:08:59.46 PM Macro action - Running ACTION: GOTO MACRO LINE - Macro line(ATraveler) 02/14/2020 05:08:59.52 PM Macro condition: 25 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 25::0 02/14/2020 05:08:59.56 PM Macro condition - Condition TRUE 02/14/2020 05:08:59.58 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 25::0) 02/14/2020 05:09:01.08 PM Macro condition: 26 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER1%::%RANDOM_600-1000% 02/14/2020 05:09:01.11 PM Macro condition - Condition TRUE 02/14/2020 05:09:01.14 PM Macro action - Variable (%INTEGER1% = %RANDOM_600-1000%) 02/14/2020 05:09:01.16 PM Macro condition: 27 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::%RANDOM_15-30% 02/14/2020 05:09:01.19 PM Macro condition - Condition TRUE 02/14/2020 05:09:01.20 PM Macro action - Variable (%INTEGER4% = %RANDOM_15-30%) 02/14/2020 05:09:01.22 PM Macro condition: 28 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::+%INTEGER3% 02/14/2020 05:09:01.24 PM Macro condition - Condition TRUE 02/14/2020 05:09:01.26 PM Macro action - Variable (%INTEGER4% = +%INTEGER3%) 02/14/2020 05:09:01.27 PM Macro condition: 29 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 29::0 02/14/2020 05:09:01.30 PM Macro condition - Condition TRUE 02/14/2020 05:09:01.32 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 29::0) 02/14/2020 05:09:02.99 PM Macro event: 30 | 837 | 846 | 814 | Left Click 02/14/2020 05:09:03.86 PM Macro condition: 31 | IF | INTEGER VARIABLE | %INTEGER% | GREATER THAN | 0 | GOTO MACRO LINE | SkipClick 02/14/2020 05:09:03.89 PM Macro condition - 0>0 02/14/2020 05:09:03.91 PM Macro condition - Condition FALSE 02/14/2020 05:09:03.93 PM Macro event: 32 | 837 | 846 | 814 | Left Click 02/14/2020 05:09:04.69 PM Macro condition: 33 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 33::0 02/14/2020 05:09:04.72 PM Macro condition - Condition TRUE 02/14/2020 05:09:04.74 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 33::0) 02/14/2020 05:09:06.39 PM Macro condition: 34 | IF | INTEGER VARIABLE | %INTEGER% | LESS THAN | %INTEGER2% | DEFINE INTEGER VARIABLE | %INTEGER%::+1 02/14/2020 05:09:06.42 PM Macro condition - 0<2 02/14/2020 05:09:06.44 PM Macro condition - Condition TRUE 02/14/2020 05:09:06.46 PM Macro action - Variable (%INTEGER% = +1) 02/14/2020 05:09:06.47 PM Macro condition: 35 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 35::0 02/14/2020 05:09:06.49 PM Macro condition - Condition TRUE 02/14/2020 05:09:06.50 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 35::0) 02/14/2020 05:09:07.64 PM Macro condition: 36 | IF | INTEGER VARIABLE | %INTEGER% | LESS THAN | %INTEGER2% | GOTO MACRO LINE | TravelAgain 02/14/2020 05:09:07.66 PM Macro condition - 1<2 02/14/2020 05:09:07.68 PM Macro condition - Condition TRUE 02/14/2020 05:09:07.70 PM Macro action - Running ACTION: GOTO MACRO LINE - Macro line(TravelAgain) 02/14/2020 05:09:07.75 PM Macro condition: 15 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 15::0 02/14/2020 05:09:07.78 PM Macro condition - Condition TRUE 02/14/2020 05:09:07.80 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 15::0) 02/14/2020 05:09:08.76 PM Macro condition: 16 | IF | INTEGER VARIABLE | %INTEGER% | GREATER THAN EQUAL TO | %INTEGER2% | GOTO MACRO LINE | MoreAction 02/14/2020 05:09:08.80 PM Macro condition - 1>=2 02/14/2020 05:09:08.82 PM Macro condition - Condition FALSE 02/14/2020 05:09:08.84 PM Macro condition: 17 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 17::0 02/14/2020 05:09:08.85 PM Macro condition - Condition TRUE 02/14/2020 05:09:08.87 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 17::0) 02/14/2020 05:09:09.80 PM Macro condition: 18 | IF | INTEGER VARIABLE | %INTEGER% | IS | 0 | GOTO MACRO LINE | ATraveler 02/14/2020 05:09:09.84 PM Macro condition - 1=0 02/14/2020 05:09:09.86 PM Macro condition - Condition FALSE 02/14/2020 05:09:09.88 PM Macro condition: 19 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 19::0 02/14/2020 05:09:09.90 PM Macro condition - Condition TRUE 02/14/2020 05:09:09.92 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 19::0) 02/14/2020 05:09:10.80 PM Macro condition: 20 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER2%::%INTEGER9% 02/14/2020 05:09:10.84 PM Macro condition - Condition TRUE 02/14/2020 05:09:10.86 PM Macro action - Variable (%INTEGER2% = %INTEGER9%) 02/14/2020 05:09:10.88 PM Macro condition: 21 | RUN ACTION | MESSAGE PROMPT | Traveler heading toward ENEMY! %INTEGER% of %INTEGER2% Times::TRAVELER::%INTEGER5% 02/14/2020 05:09:10.90 PM Macro condition - Condition TRUE 02/14/2020 05:09:10.92 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(Traveler heading toward ENEMY! 1 of 2 Times::TRAVELER::5) 02/14/2020 05:09:14.48 PM Macro condition: 22 | RUN ACTION | WAIT MILLISECONDS | 1500 02/14/2020 05:09:14.51 PM Macro condition - Condition TRUE 02/14/2020 05:09:14.53 PM Macro action - Thread sleeping for 1500 milliseconds 02/14/2020 05:09:15.99 PM Macro condition: 23 | RUN ACTION | MESSAGE PROMPT | Traveler heading back HOME!::TRAVELER::%INTEGER5% 02/14/2020 05:09:16.03 PM Macro condition - Condition TRUE 02/14/2020 05:09:16.05 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(Traveler heading back HOME!::TRAVELER::5) 02/14/2020 05:09:18.80 PM Macro condition: 24 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 24::0 02/14/2020 05:09:18.85 PM Macro condition - Condition TRUE 02/14/2020 05:09:18.87 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 24::0) 02/14/2020 05:09:19.84 PM Macro condition: 25 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 25::0 02/14/2020 05:09:19.88 PM Macro condition - Condition TRUE 02/14/2020 05:09:19.90 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 25::0) 02/14/2020 05:09:20.73 PM Macro condition: 26 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER1%::%RANDOM_600-1000% 02/14/2020 05:09:20.78 PM Macro condition - Condition TRUE 02/14/2020 05:09:20.81 PM Macro action - Variable (%INTEGER1% = %RANDOM_600-1000%) 02/14/2020 05:09:20.82 PM Macro condition: 27 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::%RANDOM_15-30% 02/14/2020 05:09:20.85 PM Macro condition - Condition TRUE 02/14/2020 05:09:20.87 PM Macro action - Variable (%INTEGER4% = %RANDOM_15-30%) 02/14/2020 05:09:20.89 PM Macro condition: 28 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER4%::+%INTEGER3% 02/14/2020 05:09:20.92 PM Macro condition - Condition TRUE 02/14/2020 05:09:20.94 PM Macro action - Variable (%INTEGER4% = +%INTEGER3%) 02/14/2020 05:09:20.96 PM Macro condition: 29 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 29::0 02/14/2020 05:09:20.99 PM Macro condition - Condition TRUE 02/14/2020 05:09:21.01 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 29::0) 02/14/2020 05:09:21.65 PM Macro event: 30 | 837 | 846 | 726 | Left Click 02/14/2020 05:09:22.42 PM Macro condition: 31 | IF | INTEGER VARIABLE | %INTEGER% | GREATER THAN | 0 | GOTO MACRO LINE | SkipClick 02/14/2020 05:09:22.44 PM Macro condition - 1>0 02/14/2020 05:09:22.46 PM Macro condition - Condition TRUE 02/14/2020 05:09:22.48 PM Macro action - Running ACTION: GOTO MACRO LINE - Macro line(SkipClick) 02/14/2020 05:09:22.55 PM Macro condition: 33 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 33::0 02/14/2020 05:09:22.58 PM Macro condition - Condition TRUE 02/14/2020 05:09:22.61 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 33::0) 02/14/2020 05:09:24.74 PM Macro condition: 34 | IF | INTEGER VARIABLE | %INTEGER% | LESS THAN | %INTEGER2% | DEFINE INTEGER VARIABLE | %INTEGER%::+1 02/14/2020 05:09:24.76 PM Macro condition - 1<2 02/14/2020 05:09:24.80 PM Macro condition - Condition TRUE 02/14/2020 05:09:24.83 PM Macro action - Variable (%INTEGER% = +1) 02/14/2020 05:09:24.85 PM Macro condition: 35 | RUN ACTION | MESSAGE PROMPT | INT2 %INTEGER2% INT9 %INTEGER9%::Troubleshoot 35::0 02/14/2020 05:09:24.88 PM Macro condition - Condition TRUE 02/14/2020 05:09:24.90 PM Macro action - Running ACTION: MESSAGE PROMPT - Message(INT2 2 INT9 2::Troubleshoot 35::0) 02/14/2020 05:09:25.50 PM Macro condition: 36 | IF | INTEGER VARIABLE | %INTEGER% | LESS THAN | %INTEGER2% | GOTO MACRO LINE | TravelAgain 02/14/2020 05:09:25.53 PM Macro condition - 2<2 02/14/2020 05:09:25.56 PM Macro condition - Condition FALSE 02/14/2020 05:09:25.59 PM Macro condition: 37 | RUN ACTION | INPUT BOX | More Actions this traveler?::Continue with Current traveler?::PROMPT_YES_NO::STRING2 02/14/2020 05:09:25.61 PM Macro condition - Condition TRUE 02/14/2020 05:09:25.63 PM Macro action - Running ACTION: INPUT BOX 02/14/2020 05:09:28.78 PM Macro action - Variable 'STRING2' auto corrected to '%STRING2%' 02/14/2020 05:09:28.81 PM Macro action - InputBox (%STRING2%=NO) 02/14/2020 05:09:28.85 PM Macro condition: 38 | IF | STRING VARIABLE | %STRING2% | IS | YES | GOTO MACRO LINE | GetTrips 02/14/2020 05:09:28.88 PM Macro condition - Condition FALSE 02/14/2020 05:09:28.90 PM Macro condition: 39 | RUN ACTION | INPUT BOX | Do another Traveler?::Repeat Attacks?::PROMPT_YES_NO::STRING2 02/14/2020 05:09:28.92 PM Macro condition - Condition TRUE 02/14/2020 05:09:28.95 PM Macro action - Running ACTION: INPUT BOX 02/14/2020 05:09:32.30 PM Macro action - Variable 'STRING2' auto corrected to '%STRING2%' 02/14/2020 05:09:32.33 PM Macro action - InputBox (%STRING2%=NO) 02/14/2020 05:09:32.35 PM Macro condition: 40 | IF | STRING VARIABLE | %STRING2% | IS | YES | GOTO MACRO LINE | StartHere 02/14/2020 05:09:32.36 PM Macro condition - Condition FALSE 02/14/2020 05:09:32.39 PM Macro condition: 41 | RUN ACTION | STOP 02/14/2020 05:09:32.40 PM Macro condition - Condition TRUE 02/14/2020 05:09:32.42 PM Macro action - Running ACTION: STOP 02/14/2020 05:09:32.44 PM Macro playback finished
|
|
|
Post by Steve on Feb 14, 2020 6:13:57 GMT
Is this not expected?
|
|
|
Post by cyberchipz on Feb 14, 2020 6:51:33 GMT
Yes, this is the expected behavior; but it's not running like that on mine... It was running like that before it got the error! (All you have to do is look at the log to see what it was doing wrong, losing %integer2%!) I think I'll have to remove the old one and reinstall the .exe, perhaps somehow MMMPro.exe copy I have got has gotten corrupted somehow. Dang. We are both running 7.3.0.0 right? :-)
If this don't beat all... I wonder how that happened? Oh well, I'll get back after I do that! Tomorrow - it's bed time for me in the USA! Thanks Steve
|
|
|
Post by cyberchipz on Feb 14, 2020 16:33:55 GMT
Sent you an email; but, since we're in, I think, different time zones :-) I couldn't upload a new copy... I hadn't made a backup of it, and so was unable to reinstall the .exe; however....
I got it working... I had Clear Variables on Playback ON and Enable Variable Saves ON. Once I turned them off, it started working for me. But, I must be misunderstanding their purpose. I thought Clear Variables on Playback would clear the variables when I play the macros, and Enable Variable Saves would allow me to save the variables in their current state when I save the program. Either way, since I was assigning the variable using INPUT BOX and assigning it a value directly to initialize the variable at the start of the macro, my thoughts are that this wouldn't matter. But it did. So something still might be going on; but, since I have a habit of explicit declaration to initialize variables, and you can see that in the macro itself, I don't know what was going wrong. It still looks like a bug?! But, at least I'm up and running again! :-)
|
|
|
Post by Steve on Feb 14, 2020 22:13:29 GMT
'Clear variables on playback' When enabled all the current values of the variables will be flushed before each macro playback. This requires every macro to redefine variables. When disabled all variable values are kept as they are defined for each macro. This is useful for carrying over values for consecutive macro's during playback. 'Enable variable saves' Enabling variable saves will save the values of all variables. With this enabled once variables are declared and saved the values will be loaded at the program startup. When not enabled, values will be empty on startup. This might help:
|
|
|
Post by cyberchipz on Feb 15, 2020 7:05:52 GMT
OK, I see. But...? Did I find a bug, when it wouldn't keep the assigned value for %INTEGER2%?
|
|
|
Post by Steve on Feb 17, 2020 9:05:53 GMT
OK, I see. But...? Did I find a bug, when it wouldn't keep the assigned value for %INTEGER2%? Hi Chip, I think I might have figured out what happened in your dropping on INTEGER2. In one of your conditions where you GOTO a label that is closer to the start of the macro what actually happens with the macro machine is that it proceeds down the macro queue looking for your line label. When it can't find it, it goes back to the top (to line 1) and continues moving down until it finds a match with your label. Remember how i said in another post that MMM reads top to bottom, left to right. This is an example of that. So, what has happened is that you have 'clear variables on playback' enabled and MMM has cleared the variables at the start of line 1. I haven't tested this yet, im really short on time at the moment, but i'm fairly sure this is it.
|
|
|
Post by cyberchipz on Feb 17, 2020 19:27:43 GMT
OK, I see. But...? Did I find a bug, when it wouldn't keep the assigned value for %INTEGER2%? Hi Chip, I think I might have figured out what happened in your dropping on INTEGER2. In one of your conditions where you GOTO a label that is closer to the start of the macro what actually happens with the macro machine is that it proceeds down the macro queue looking for your line label. When it can't find it, it goes back to the top (to line 1) and continues moving down until it finds a match with your label. Remember how i said in another post that MMM reads top to bottom, left to right. This is an example of that. So, what has happened is that you have 'clear variables on playback' enabled and MMM has cleared the variables at the start of line 1. I haven't tested this yet, im really short on time at the moment, but i'm fairly sure this is it. Oh, I'm not sure I followed you on this... When you said, "continues on down" you didn't mean executing along the way did you? So, everytime there's a GOTO early on/anywhere, it will execute lines until it finds them? That sounds scary. Or, maybe I misunderstood... after reading multiple times... Perhaps what you're saying is that it is erroneously, when looking for a label, automatically clearing the variable when it starts over... IOW, a bad REstarting point for the macro search in the code for labels... need to pick the point where it skips over the #DEFAULT when checked, clear variables on the label search start over? I've noticed that I can't initialize a variable with a negative value though... lol (not related :-) Well, yes.. two steps. That could be it, if it's restarting the search from the wrong coding place... that makes sense. I did notice that the only intervening lines, between having a value and it being disappearing, were "GOTO Label", and "Label". That was a tough find! What are the chances of creating a GOSUB in addition to the GOTO that when it hits, perhaps an SuB END command will return to the line after the GOSUB? Since it appears that real line values are used that should also be fairly quick. Just need to store the next REAL line number on GOSUB and internally GOTO that real line number on a SUB END or ENDSUB. Otherwise, I'll need a label for every line after a "gosub" and dedicated strings for passing. In gaming, I obfuscate my mouse clicks by subtle x, y and timing values... that's what got me thinking about the gosubs.. otherwise, I have to 1 %RANDOM_ val1-val2% 2 LeftClick a lot. BTW, I've noticed that sometimes LeftClick does not gain focus of the game app and I have to click twice... it seems to be related to the POP-UP MESSAGE BOX having displayed. ALSO, INPUT BOX at times also remains behind the scenes.. also not getting focus.. I have to ALT-TAB to go find it. Did I mention that one of my principle skill sets was Troubleshooting. I will promise, especially as I get proficient at MMM, that I will always try to give you enough information to find the problem... even if it's my imagination! Which is harder than you'd think! 8-o Cheers! But, I understand about the time constraints... I'm not even working... and I'm playing with MMM so much... I've no time for virtual reality. lol (Yes, spoken like a retiree!) :-)
|
|
|
Post by Steve on Feb 21, 2020 22:29:01 GMT
Oh, I'm not sure I followed you on this... When you said, "continues on down" you didn't mean executing along the way did you? So, everytime there's a GOTO early on/anywhere, it will execute lines until it finds them? That sounds scary. Or, maybe I misunderstood... after reading multiple times... Perhaps what you're saying is that it is erroneously, when looking for a label, automatically clearing the variable when it starts over... IOW, a bad REstarting point for the macro search in the code for labels... need to pick the point where it skips over the #DEFAULT when checked, clear variables on the label search start over? Yep literally top to bottom - left to right. ( Edit: When a goto remark is called, the macro proceeds down (not up) initializing each line (remember MMM takes the macro string and breaks it down using the delimiters into fields the macro machine knows how to process) looking for a remark that matches the GOTO. If the line does not start with a remark it is discarded at that point. It continues going down until it hits the bottom (the last macro line). It then starts again from the top and goes down line by line. If it gets to the bottom again without finding the remark to goto, the macro stops. GOTO MACRO LINE | Remark_must_exist_or_I_assume_GOTO_END_OF_MACRO). Run this example below and check out the MMM event log...it will load in the example i uploaded to pastebin.com/raw/nYADUwVK (or just copy and paste the code from there): 1 | RUN ACTION | LOAD MACRO FROM URL | https://pastebin.com/raw/nYADUwVK I've noticed that I can't initialize a variable with a negative value though... lol (not related :-) Well, yes.. two steps. Integer variables can be initialized with negative values during run time with: 1 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::-1 Or prior to run time through the Options - Variables page. However...(there is usually a however), variable options and values that are saved or set prior to run time take precedence over those set during run time.
Meaning, if I declare to 'Enable variable saves' and for example my %integer% variable is set to a value of 50 within the variable options page prior to pressing play then 1 | RUN ACTION | DEFINE INTEGER VARIABLE | %INTEGER%::-1 will define %integer% to a value of 49, not -1. Does that clarify? What are the chances of creating a GOSUB in addition to the GOTO that when it hits, perhaps an SuB END command will return to the line after the GOSUB? Since it appears that real line values are used that should also be fairly quick. Just need to store the next REAL line number on GOSUB and internally GOTO that real line number on a SUB END or ENDSUB. Otherwise, I'll need a label for every line after a "gosub" and dedicated strings for passing. In gaming, I obfuscate my mouse clicks by subtle x, y and timing values... that's what got me thinking about the gosubs.. otherwise, I have to 1 %RANDOM_ val1-val2% 2 LeftClick a lot. Yes there are better ways to skin this cat. Take a look at your macro lines within MMM prior to pressing play. You can click them, drag over them, double click them, right click them, etc. They are objects...each line. They have properties outside of the string text that makes the macro syntax. Fundamentally, this is the problem. I treat them individually like objects. This makes manipulating them difficult. You mentioned you accidentally edited a macro line whilst the macro was running and it threw an error to the event log. This is a side effect of that. I have tinkered with moving away from this many times (load up a a macro then open Options - Macro and in the 'Find' box type DEV::output logic and hit enter), however at this point it would mean almost completely redesigning how code is fed into the macro machine. I just don't have the time. BTW, I've noticed that sometimes LeftClick does not gain focus of the game app and I have to click twice... it seems to be related to the POP-UP MESSAGE BOX having displayed. ALSO, INPUT BOX at times also remains behind the scenes.. also not getting focus.. I have to ALT-TAB to go find it. Yep this is a thing. If you initialize a pop up dialog from Mini Mouse Macro then you have to respond to the dialog. Them's the breaks. Can't get around that. Well...you can, and I think (maybe or might have been an email to me) there is a thread on this forum that discusses how to fire up a dialog from MMM (say a msgbox or input box) and have MMM handle the disposal of the box. Did I mention that one of my principle skill sets was Troubleshooting. I will promise, especially as I get proficient at MMM, that I will always try to give you enough information to find the problem... even if it's my imagination! Which is harder than you'd think! 8-o A good skill to have, and I have noticed what seems to be your past (or current) professional life bleeding into your posts. Nice One Mate. I hope this explains it a little better.
|
|
|
Post by cyberchipz on Feb 22, 2020 7:32:29 GMT
First, let me apologize for not being able to do the fancy quotes you do with [ICON] ON such and such date time Steve said: (I can do one of the whole thing, but can't break it up like you do... Steve: Got it! I was thinking it should be fairly easy to find the right place to start searching from the top without initializing the variable options during a label search. Since I turned the variable options off, I'm not having that issue anymore. Q: I was wondering though, what language and interface do you use to develop MMM. I was wondering what my background would be relative to that level. Steve: This did exactly what I expected it to do... But, I did learn about pulling in code from pastebin in MMM! That's awesome. Steve: Perfectly! Steve: I've decided, for gosub, I can just design a line of code that incorporates everything in two lines... One assigning the return label to a string AND two GOTO the routine I want to run. 16 | RUN ACTION | DEFINE STRING VARIABLE | %STRING%::StartHere | AND | 1 | RUN ACTION | GOTO MACRO LINE | InitializeVariables
* | StartHere
the two lines above basically calls (GOTO) the subroutine (InitializeVariables), and the subroutine returns (GOTO ReturnLabel) in this case StartHere. For future readers who may be interested, an entire example what and how I did it is here: 1 | RUN ACTION | LOAD MACRO FROM URL | pastebin.com/cAcjDEaQSteve: It did, very much so... thanks again. Quick Q: Did the issue with Modulo (Modulus) get fixed... I couldn't get it to work. If you say yes... I'll post my code in the Q&A section for some help! I'm up way too late: So.. we'll see ya L8r)
|
|
|
Post by Steve on Feb 23, 2020 2:04:38 GMT
I think a while ago, maybe about two years we had an issue with some math functions but from memory it was fixed and released the following update. What issue are you having with mod? and yes...probably better on a new thread.
|
|