You want to use the Get ( ApplicationVersion ) funtion in your script and search for the term "Web". When someone uses IWP the value is "FileMaker Web Publishing 9.0v3"
So your script will be something like
If [ Get ( ApplicationVersion ) = "Web"
Go to layout [IWP Layout]
Go to layout [FM Client Layout]
I hope this helps.
Get(ApplicationVersion) returns "Web (version)" for a FileMaker Web Client. e.g "Web 9.0v3"
This means that the expression needed in the script If step is:
If [ LeftWords ( Get (ApplicationVersion) ; 1 ) = "web" ]
Then it will work.
David is quite right, I had actually forgot to include the PatternCount in my calculation, so it should of read:
If [ PatternCount ( Get ( ApplicationVersion ) ; "Web" ) ]
But davids works just as well for using in version 9.
This is exactly what I needed! Thanks guys.