Check if ScriptCase Project on PC or mobile device

Is the Application running on a mobile device?

Download and use the class mobiledetect (http://mobiledetect.net) as an external library in your Scriptcase Application.

Usually you would have to add something like to add the library:

But it seems that Scriptcase already has included the library :/
Didn’t find any documentation about this at Scriptcase help …

Therefore you can build a new app of type blank and ad into onExecute Event:

We’ll build an application to check if a mobile device is used and call menu01 instead of menu02 (for PC displays).

To make it clear we’ll first use a code to show, which kind of device is used:

Executing the app will show you if your app is running on a mobile or desktop PC.

If you want to call your apps menu01 or menu02, you can use some code like:

Using a mobile device will call menu01

Posted in Scriptcase Sniplets Tagged with: , ,