From: | Bill Eaves |
Date: | 14 Aug 2001 at 11:01:17 |
Subject: | Re: IBrowse script wanted |
Hello Steve
On 13-Aug-01, Steve Hargreaves wrote:
> I'm after a script to save a picture displayed in IBrowse to a specified
> file, with no other output. I've had a go myself, but I'm not too good
> with Arexx.
> The end result (which will only require one extra line that I can manage
> myself) is to add a "Set as backdrop" option to ibrowse image menu for use
> with DOpus.
I did a script a while ago that works but only after a fashion. It does have
some problems but the documentation on IBrowse Arexx commands is not very
good.
There must be a better way and I am sure some Arexx wizards like Neil would
be able to do a better job.
Add an item to the FAB menus for Image and also Image Link if you need that
too. Set to Rexx and enter the script path and use the argument i%.
The problem is getting the image from IB, I used IB's GOTOURL command to
save the image file which can be problematic. The first problem is the time
taken to download the image, even from a local file. If Dopus picks up a
half written file it will not set the backdrop. As I doubt you will be in a
hurry to set the backdrop the WAIT command can be increased before Dopus
tries to set the backdrop.
If the file already exists IB shows its Newname, Overwrite, or Cancel
requester, it does not seem as the IB GOTOURL SAVE has a FORCE option :-(
Also the only way to use GOTOURL to set a background image is to use the IB
pop up menu to View the Image seperately and then apply the script to it.
A much better way would be to find where the image or background is stored
in the IB cache and then copy it, but IB's cache is one huge mystery even I
suspect to the author ;-)
Regards,
Bill.
================================================================
/* desktop.ibrx */
/* Sets image displayed in IB as DOpus Desktop */
OPTIONS RESULTS
IMPATH="Data:Images/" /* Path where IB stores saved images */
PARSE ARG URL
/* GET filename from URL */
N=LASTPOS("/",URL)
IF N ~= 0 THEN DO
GOTOURL SAVE URL
Filename = SUBSTR(URL, N+1)
ImageName = '"'||IMPATH||Filename||'"'
ADDRESS COMMAND WAIT 10 /* Make sure image is downloaded fully */
IF SHOW('P',DOPUS.1) THEN DO
ADDRESS "DOPUS.1"
DOPUS SET BACKGROUND ImageName DESKTOP TILE
DOPUS REFRESH BACKGROUND
END
END
Quote carefully and read all ADMIN:README mails
To unsubscribe mailto:amigactive-unsubscribe@yahoogroups.com
Anyone sending unsubscribe messages to the list will be SHOT!
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/