jaybe
November 10, 2023, 2:32pm
1
Not sure if this is intended behaviour or indeed a bug.
The following Macro intends to paste **
characters before and after the cursor.
To do that, it calls a subroutine which is responsible for the cursor placement.
When the subroutine pastes the text directly (Option 1), it works as intended.
However, when the subroutine calls another subroutine (Option 2) that contains exactly the same two actions as Option 1 (with the pasted text as input), the cursor is not placed in between but rather after the entire pasted text.
I hope that I could make the setting clear. Happy for anyone to explain why Option 1 works while Option 2 does not.
Great forum btw. Thanks!
tiffle
November 10, 2023, 2:41pm
2
I don’t think I can comment until I see the actual macro in option 2. Can you post that please?
1 Like
Hi Joel,
It seems like the issue is likely to be in the "Option 2" subroutine, so it would be helpful for us to see that.
And, for good measure, it's always best to post the actual macro(s) you're working with so that we can test ourselves.
2 Likes
jaybe
November 10, 2023, 2:46pm
4
Sure, here is a Screenshot of the Subroutine in Option 2:
Have to take a look in the wiki or the forum how to post the actual macros for download. Will come back to you later
tiffle
November 10, 2023, 2:59pm
5
OK - that’s because the option 2 subroutine is being passed this “****” which is what you see being pasted.
You can’t pass the cursor! BTW it’s not a bug.
2 Likes
jaybe
November 10, 2023, 3:03pm
6
Oh thanks, that is good to know!
Is this restriction for the cursor documented in the wiki or somewhere else? I was not able to find it.
tiffle
November 10, 2023, 3:10pm
7
I doubt it. Just had a thought though - try "Insert text by typing" in your macro, rather than pasting. It might make a difference.
tiffle
November 10, 2023, 3:27pm
8
If you haven't seen these they're worth a moment of your time:
Cheers!
1 Like
jaybe
November 10, 2023, 3:44pm
9
Good suggestion! It does not make a difference though, the output is the same as for insertion by pasting.
1 Like