Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
65 user(s) are online (53 user(s) are browsing Forums)

Members: 0
Guests: 65

more...

Support us!

Headlines

 
  Register To Post  

YAM help menu
Just can't stay away
Just can't stay away


See User information
I do have on YAM a "Help "menu with 2 submenu's
"Contents help"
"ARexx interface "


Contrary to what i first hought these must be standard YAM menu's

The links don't work properly though

Probably because i changed the way yam should react on doubleclicking an URL (as people often did send me URL's poinitng to Youtube video's)

Double clicking on aan URL from within a message being read still works properly & Snoopy tells me:

RunCommand(0x189F30C5 "RUN",,"DH0:Utilities/getVideo/PlayYTube "http://www.v....

The resullts of using the help/ARExx interfaces menus are:
Snoopy :
RunCommand(0x189F30C5 "RUN",,"DH0:Utilities/getVideo/PlayYTube "http://yam.ch/wiki/<EMPTY>en

& the URL copied from Odyssey's URL textin gadget is:
http://yam.ch/wiki/%3CEMPTY%3Een:Documentation/ARexxAPI

My script looks like this:
Quote:

.KEY url/A
;called from YAM "on clicking URL" dh0:Utilities/getVideo/PlayYTube %p

set metube `cut "<url>" char -28`
cd dh0:Utilities/getVideo
IF $metube EQ "http://www.youtube.com/watch"
OR $metube EQ "http://www.youtube.com/embed"
Requestchoice video "<url>" ok
Getvideo.rexx "<url>" play
ELSE
cd stock:internet/odyssey1.23 ; datas:muiODYSSEY/ODYSSEYlauncher does nothing
waitforport ODYSSEY.1 timeout 0; returns 0 if found ; 5 if not
IF WARN
RUN OdysseyLauncher
waitforport ODYSSEY.1 timeout 10
IF WARN
echo "waited not long enough or OdysseyLauncher problem"
ELSE
wait 3 ; the rexx command below will not work without it

RX "address ODYSSEY.1 'OPEN NAME ""<url>"" '"
ENDIF
ELSE
RX "address ODYSSEY.1 'OPEN NAME ""<url>"" '"
ENDIF
ENDIF
cd dh0:Utilities/getVideo


This looks like a YAM bug ?


Edited by JosDuchIt on 2015/3/24 9:06:23
Edited by JosDuchIt on 2015/3/24 9:07:35
Edited by JosDuchIt on 2015/3/24 9:09:32
Go to top
Re: YAM help menu
Home away from home
Home away from home


See User information
@JosDuchIt

Quote:

The links don't work properly though


Define don't work properly?

The links open in browser for me via urlopen, but are actually broken and extra "<EMPTY>" being inserted into the url.

Manually removing that "<EMPTY"> still results in a broekn link.




Go to top
Re: YAM help menu
Just can't stay away
Just can't stay away


See User information
@JosDuchIt

Try this:

.KEY url/A
;called from YAM "on clicking URL" dh0:Utilities/getVideo/PlayYTube %p

IF <urlEQ "http://yam.ch/wiki/%3CEMPTY%3Een:Documentation"
 
urlopen http "yam.ch/wiki/Documentation"
 
quit
ENDIF
IF <
urlEQ "http://yam.ch/wiki/%3CEMPTY%3Een:Documentation/ARexxAPI"
 
urlopen http "yam.ch/wiki/Documentation/ARexxAPI"
 
quit
ENDIF

set metube `cut "<url>" word 4 /`
;
changed cut to work with other youtube urls egwww.youtu.bem.youtu.be etc.
IF 
$metube EQ "watch" OR $metube EQ "embed"
 
cd sys:Utilities/getVideo
 Requestchoice video 
"<url>" ok
 Getvideo
.rexx "<url>" play
ELSE
 
urlopen http "`cut <url> char 8-`"
ENDIF



Edited by Severin on 2015/3/24 14:23:12
Edited by Severin on 2015/3/24 14:33:31
Edited by Severin on 2015/3/24 14:47:00
Edited by Severin on 2015/3/24 14:48:55
Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: YAM help menu
Just can't stay away
Just can't stay away


See User information
@Severin


I can't make the IFs work properly
simplified script
Quote:
KEY url/A
;called from YAM "on clicking URL" dh0:Utilities/getVideo/PlayYTube %p
setenv myurl "<url>"
Requestchoice test1 "<url>" ok
; <url> EQ "http://yam.ch/wiki/%3CEMPTY%3Een:Documentation/ARexxAPI"
;IF "<url>" EQ "http://yam.ch/wiki/%3CEMPTY%3Een:Documentation/ARexxAPI"
;IF <url> EQ "http://yam.ch/wiki/<EMPTY>en:Documentation/ARexxAPI"
;IF "<url>" EQ "http://yam.ch/wiki/<EMPTY>en:Documentation/ARexxAPI"
Requestchoice test2 "<url>" ok
ENDIF
Requestchoice final "<url>" ok



after running the script see




7.OS4.1FE:> getenv myurl
http://yam.ch/wiki/<EMPTY>en:Documentation/ARexxAPI

Go to top
Re: YAM help menu
Just can't stay away
Just can't stay away


See User information
yeah I think it's the % as it's a dos patternmatching character.

Would be easy to write the script in rexx or python though.

Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: YAM help menu
Just can't stay away
Just can't stay away


See User information
@JosDuchIt

Here it is in python (untested):

#!c:python

import osstringsys

if len(sys.argv) == 2:
 
url sys.argv[1]
else:
 exit()

url.find("%3CEMPTY%3Een:")
if 
== 19:
 
url url[:x] + url[x+14:]
elif url.find('embed') > or url.find('watch') > 0:
 
os.system('cd sys:Utilities/getVideo')
 
os.system('Requestchoice video "' url '" ok')
 
os.system('Getvideo.rexx "' url '" play')
 exit()
os.system('urlopen http ' url[7:])


Be careful, tabs and spaces will have been replaced with nonbreak spaces so you will need to replace char 0xa0 (160) with 0x20 (32) before python will accept it.


Edited by Severin on 2015/3/24 21:40:11
Edited by Severin on 2015/3/24 21:41:43
Edited by Severin on 2015/3/24 21:42:20
Edited by Severin on 2015/3/24 21:44:02
Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: YAM help menu
Just can't stay away
Just can't stay away


See User information
@Severin

this is not working either, i'll try to see why later

Right now i did change in YAM settings the call when double clicking an url to what it was before i changed to a DOS script
namely the DOS command
urlopen %p

this again works well when doubleclicking an URL in a message, but it has the behavior noted before , inserting an <EMPTY>en: string in the URL to be opened.

edit:
This seemed to be a bug in YAM 2.10 dev to me
reversing to OS4.1Upd6 though the problem is gone
even with my original script (which has the advanatage of not opening an other odyssey browser on my WB

edit:
YAM2.8p1 help menu works well on OS4.1Update6 & Final
(the arexx inerface URL does not exists anymor though, has changed in fact )

Thanks for help, i'll report this to YAM author's





Edited by JosDuchIt on 2015/3/25 9:23:38
Edited by JosDuchIt on 2015/3/25 9:33:02
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