I'm afraid that is not a feature of wpml yet, and such a script would need custom coding which is beyond the scope of our support. This being the case please consider contacting one of our certified partners from this link: hidden link. org/documentation/support/wpml-contractors/
You will get the custom assistance you need to get on with your project.
Before doing so please have a look also here: http://wpml.org/documentation/support/wpml-contractors/guidelines-for- people-looking-for-consulting-help/
Please see in the attached screenshot the possibilities of language redirection included in WPML:
1. Disable browser language redirect (Obvious: WPML will not redirect users)
2. Redirect visitors based on browser language only if translations exist (Only redirects to translation if they exist, otherwise default language is loaded)
3. Always redirect visitors based on browser language (Redirect to home page if translations are missing)