Opening an app from a web page link

I have an app which opens when a user clicks on a link.

The link is like so

myapplication://12345

This works ok, i managed to register the protocol (myapplication://) within the dmg info.plist file.

The issue is this, i need to pass the value (12345) to the app as an argument. And i simply dont know how…

Does anyone know how i can achieve this? I am not sure that i can do this in applescript, any help would be greatly appreciated.

Thanks

p.s. this also needs to work in Firefox as well as Safari