this solves the issue... it will prioritize the same workspace and then the last focused window... One way to be sure that you always send the code to the correct window would be using the always on top option. (and keeping in the the same workspace...). That way the code always get sent to this window. (of course, if it is the only stata window "always on top". )
--limit 99 might be an overkill but you never know what people are doing at their computer. in any case is fast enough. For my version of stata (16), it only matches stata's main window but I am not sure if this is also the case for other versions. That's why 99 might not be an overkill after all..
this solves the issue... it will prioritize the same workspace and then the last focused window... One way to be sure that you always send the code to the correct window would be using the always on top option. (and keeping in the the same workspace...). That way the code always get sent to this window. (of course, if it is the only stata window "always on top". )
--limit 99
might be an overkill but you never know what people are doing at their computer. in any case is fast enough. For my version of stata (16), it only matches stata's main window but I am not sure if this is also the case for other versions. That's why 99 might not be an overkill after all..