Hawkeye_CH Posted October 3, 2019 Posted October 3, 2019 (edited) Hi I'm using the following script (attached to this post) and similar ones to automate some actions in the menu of Elite dangerous. This one is to switch to the "Training" overview from the 3D world. The script is working perfectly, but the program (Elite Dangerous) is loosing focus always somewhere in the script and than the keys are not received anymore by the program. Because of this I added multiple "Winactivate", but sometimes the program gets inactive just after them and so it fails anyway.Is there a way to have the winactivate once at the beginning and keep it running until the last line of the script has finished? I do not know why it's loosing focus. If I do the same actions manually via mouse and keyboard it is not loosing it. I thought it is because i click on the second screen on the file to run the script (for the test), but even with a hotkey set to run the script with the keyboard, the program elite dangerous is loosing focus. When I run the script with a click on the shortcut and then alt+tab quickly to Elite dangerous it's working fine normally. But I have a similar, but far more complex script which is running automatically with a batch file after startup of Elite Dangerous (to do some settings and enter the 3d world) which is never loosing focus on the program. If I run the same with a hotkey or click on the shortcut, it is having problems with the focus as well. (But there is a winactivate at the beginning as well, which is working, but for some reason the program looses focus later, is visible when the mouse cursor turns to the standard windows one...) I tested and tried now for over a day and I think I'll not figure out why this strange behaviour is happening (I have nearly no knowledge with programming/autoit). So if you could help me to have Elite Dangerous active during the duration of the scripts (with winactivate?) and veryfiy at the end again that Elite Dangerous is active, it would be fantastic! (question in bold letters above) Or another solution, but I'm not able to do it alone. Would appreciate your help very much. 🙂 Kind regards Hawkeye Edited October 3, 2019 by Jos
Developers Jos Posted October 3, 2019 Developers Posted October 3, 2019 Welcome to the AutoIt forum. Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked. See you soon with a legitimate question I hope. The Moderation team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Recommended Posts