Keystroke or keystroke through script both not reliable

Hi,
I have been trying to copy some data from one excel file to another(just a part of my big process), so for moving from one excel to another i use Alt+Tab.
It works fine once while the next time Alt+Tab doesnt work. Not at all reliable.
Why is it like this?
Is it because my process is big?

Thanks,
Abhaya

The behavior of Alt + Tab depends on a lot of details. Perhaps, the order of the windows is different in the Task Switcher when you play the recording, so it fails.
Why don’t you use the Switch to Window action to switch between two files?

Hi,
The alt+tab is not at all working it is not switching at all , it stays in the same sheet.
I have given switch window .
The problem is the file is not getting selected.
When i try to open an application or any file , sometimes its getting selected , sometimes its not getting selected , so the alt+tab or switch window doesn’t work

so i give 2 alt+tabs, its working fine when the file is not selected , when its selected , the alt+tab occurs 2 times

Which option do you use in the Window action? Is it “Select an open window”? Then you need to open this window and press Refresh before selecting it.

Also, try adding a timeout of a couple of seconds to the Alt + Tab action.