Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
98 user(s) are online (90 user(s) are browsing Forums)

Members: 2
Guests: 96

davec555, joerg, more...

Support us!

Headlines

 
  Register To Post  

Open an URL from Yam with OWB or getVideo
Just popping in
Just popping in


See User information
I need a script that opens an URL with OWB or getVideo from Yam by clicking on a link.
Like:

Set Question `requestchoice Yam "OWB or getVideo?" OWB getVideo TYPE=QUESTION`
if $Question EQ 1
internet:owb/owb %p
else
c:getVideo %p
endif

Is it possible to transfer the clicked link from Yam to that ascii-file so that OWB or getVideo can open it?
The reason is that I get some video-links from youtube and I don't wanna use IBrowse for it.

Go to top
Re: Open an URL from Yam with OWB or getVideo
Home away from home
Home away from home


See User information
@gurus2000

Why don?t you use OpenURL? (at least for YAM it works)

GetVideo i don?t know

Go to top
Re: Open an URL from Yam with OWB or getVideo
Just popping in
Just popping in


See User information
@Raziel

GetVideo works with OpenURL too but and can't change between OWB and getVideo. OpenURL takes the first entry and ignores the second one.

Go to top
Re: Open an URL from Yam with OWB or getVideo
Home away from home
Home away from home


See User information
@gurus2000

I don't understand this sentence

The things you can change in OpenURL prefs are the programs that are used when a third party program tries to connect (i.e. OWB as Browser, YAM as Mailer, AmiFTP as FTP client)

If GetVideo uses OpenURL you only need to tell OpenURL which browser it should use (the browser YOU are actually using) and off you go

Go to top
Re: Open an URL from Yam with OWB or getVideo
Just popping in
Just popping in


See User information
@Raziel

Don't know what you mean excactly. When I define OWB in OpenURL as MY Browser than every link I click in Yam will be open with OWB. When I define getVideo as my first choice, than every link I click in Yam will be open with getVideo. But I wanna have the choice on every cklick on a link which of both programs I wanna use. If it is a normal link (website) than I wanna use OWB and if it is a link to an video (e.g. youtube) I wanna use getVideo to download it and play it with MPlayer (without any Browser).

Go to top
Re: Open an URL from Yam with OWB or getVideo
Just can't stay away
Just can't stay away


See User information
@gurus2000

Without actually having tested it, your first idea with the script looks like it should work. You just need to make your %p placeholders into script arguments, using the .key keyword (if in doubt, see Documentation/Kickstart/Shell.doc, the entry for EXECUTE). Then save the script under some filename and make it executable (E and S bits set - as well as at least R, of course). In YAM's settings you should then be able to set it to execute the script with the URL as your %p parameter, it should then be seen inside the script as the .key variable.

You might need some double-quotes around the %p in YAM and/or the bracketed variable in your script.

Hope this is clear, otherwise get back and I'll try putting an example together.

Best regards,

Niels

Go to top
Re: Open an URL from Yam with OWB or getVideo
Just popping in
Just popping in


See User information
@nbache

Thank you very much!!! You're GREAT! I wrote the following little script, named "owb_getvideo":

---
.KEY %p

Set Question `requestchoice Yam "Use OWB or play a Video?" "OWB" "Play Video" TYPE=QUESTION`
if $Question EQ 1
internet:owb/owb <%p>
else
c:getVideo "<%p>" saveplay ram:
endif
---

In Yam I open this script with "yam:Rexx/owb_getvideo %p" by double clicking on a link. Thats it!
It works absolutely perfect!

Go to top
Re: Open an URL from Yam with OWB or getVideo
Just can't stay away
Just can't stay away


See User information
@gurus2000

Hey, great to hear

And interesting to see that a variable name of "%p" is valid in a shell script, I didn't know that. I wasn't quite clear in my description if this, I know, but I had just imagined some arbitrary variable name like "myurl" or whatever in the shell script. I.e.
.KEY myurl

in the first line, and later on e.g.
internet:owb/owb <myurl>

to refer to it. But if it works with %p ... hey, why not

BTW, another little thing that most people like to do in shell scripts with parameters is use the .BRA and .KET directives at the start, like so:
.KEY myurl
.BRA {
.
KET }
...
internet:owb/owb {myurl}

This redefines the variable delimiters from <> to {}, which will avoid risking getting them confused with the redirection operators.


Best regards,

Niels

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project