URL Scheme Handled by a Rev Application

Andres Martinez andres at bakno.com
Sat Jan 26 14:00:25 EST 2008


Thanks Trevor

It took me a while but I was able to make it work.

And as you said, the space was necessary to create an empty key.

Regards,
Andres Martinez
www.baKno.com

On Jan 26, 2008, at 12:02 PM, Trevor DeVore wrote:

> On Jan 25, 2008, at 3:18 PM, Andres Martinez wrote:
>
>> Thanks to your help I am already getting a URL to open a Rev App  
>> and pass some parameters. But only on Mac OS X.
>>
>> Now I want to do the same on Windows. Trevor told me how to receive  
>> parameters (thanks again) but first I need to change the registry  
>> in order for Windows to launch the application when the URL is  
>> called.
>>
>> I found that Rev already has a function called setRegistry(). But  
>> it seems to be a very delicate procedure and I want to know if any  
>> of you have done this same surgery before.
>>
>> As far as I know I need to do the following:
>>
>> - Add a new key to HKEY_CLASSES_ROOT called 'myprog'
>> - Add an empty string to this key called 'URL Protocol'
>> - Add the sub-keys:  \shell\open\command
>> - Set the value of the default string inside the command key to: "  
>> c:\my prog\prog.exe %1"
>
> Andres,
>
> This is a pretty standard modification to the registry so don't be  
> scared :-)
>
> Here is an example that registers an app to process a url protocol.  
> Note that I am setting ssurl\URL Protocol to a space. This is  
> because Rev deletes registry keys if you set the key to an empty  
> value. I'm not sure if that is the wisest way to go about it but  
> that is what Rev does. In any case the protocol still works with the  
> value set to space.
>
>
> on mouseUp pMouseBtnNo
>    put "HKEY_CLASSES_ROOT\" into thePrefix
>    put setregistry(thePrefix & "myurl\", "URL:Alert Protocol") into  
> wasSuccessful
>    put setregistry(thePrefix & "myurl\URL Protocol", " ") into  
> wasSuccessful
>    put setregistry(thePrefix & "myurl\shell\open\command\", \
>            quote & "C:\Program Files\ScreenSteps\ScreenSteps.exe" &  
> quote && quote & "%1" & quote) into wasSuccessful
> end mouseUp
>
> Regards,
>
> -- 
> Trevor DeVore
> Blue Mango Learning Systems
> www.bluemangolearning.com    -    www.screensteps.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list