PuloversMacroCreator icon indicating copy to clipboard operation
PuloversMacroCreator copied to clipboard

Problem when creating a new line

Open TirOFlanc opened this issue 4 years ago • 4 comments

Hi,

I have encountered several problems that I think are related.

When I create a new line, for example MsgBox or AssignVariable, when I validate by clicking on the OK button, this new line doesn't appear, as if I had cancelled, so I have to repeat it until it works (sometimes it does it several times in a row) [now I spam the 'Apply' button].

When there is a function, the new line created in the main macro may end up at the end of the function, so I cut and paste it into the main macro, but it's strange. (see screen)

image image

Here, my selection was on 'EndIf' of the 'Main' macro to add a line just above it.

I clicked on the 'Variables / Arrays' button, entered 'ORDER' in the 'Output Variable' field, then '%A_LoopField%' in the 'Value' field and finally, I clicked on the 'Ok' button (I had unchecked the 'Expression / Array' box).

As this new line didn't appear, I went to the 'CloseBoards()' function tab and found it there.

Well, I don't know what to add to make it easier for you.

If you have any questions, don't hesitate.

Have a nice day !

TirOFlanc avatar Jan 08 '21 12:01 TirOFlanc

I could not reproduce this problem. If you can give me a step-by-step of how to reproduce it can take a look.

Pulover avatar Mar 16 '21 14:03 Pulover

I have experienced the same issue myself. It has usually happened when I tried to insert a new command into existing code, such as a new If statement or simply a new MSG. After I click OK, the line doesn't appear, but when I happened to look at my last tab of code, the added IF statement or the MSG was tagged onto the end of this other code. After the return. I cannot reproduce it on a regular basis, but whenever I notice my new line doesn't show up, the first thing I do is click through my other tabs and make sure it didn't get added to the bottom of another one. Using Apply does seem to be safer than clicking OK after creating a new line.

higrm avatar Jun 15 '22 11:06 higrm

Ok, that's good to know. I will use this method, thanks.

TirOFlanc avatar Aug 26 '22 16:08 TirOFlanc

What I will try the next time I need to make an edit to any of my existing macros is create a new right-most tab that just contains a single line of code, perhaps just a pause. Then when I make my edit, even if the code mysteriously shows up on the right-most tab, it won't effect a needed part of my macro and will be easier to find. Originally, I said the newly added code would be at the end of the right-most macro. In fact, the code tries to show up on the matching line number where it should have been added on the desired tab. E.g. if I want to add a msg on line 14 and it doesn't appear, looking at the right-most tab would have the new msg instruction on line 14. But again, this isn't easy to reproduce, but does happen 20% of the time, maybe a bit less, but I think more than 10% of the time. I'll do some testing to get better frequency data.

higrm avatar Aug 27 '22 09:08 higrm