waitidle before send keys to change option

when I creating needles against new yast theme, I see sendkey $cmd{"noautologin"} sent but sometimes it doesn't applied that seems due to system busy, just give a idle timer before send keys.