Re: [NTLK] BitGrabber

From: Paul Guyot (pguyot_at_kallisys.net)
Date: Wed Jun 08 2005 - 18:18:49 PDT


Le 9 juin 05 =E0 09:59, Alex Le=E3o a =E9crit :

>
> Em 08/06/2005, =3DE0s 19:04, Grant Hutchinson escreveu:
>
>
>>>
>>>
>>>
>>
>> I think you mean Screen Shooter by Daniel Padilla. It's available =3D
>>
>>
> here:
>
>
>>
>> http://dev.newtontalk.net/~dpadilla/progs.htm
>>
>>
>
> Hi Grant,
>
> I know ScreenShooter too, but I=3DB4m looking for a way to create =20
> GIFs =3D20
> "ONLY" with Newton! Without the help of an email or a Desktop. Just =20=

> =3D20
> draw something, convert to GIF, save somewhere in the Newton and =20
> serve =3D20=3D
>
> with NPDS. Look:
>

It's a good occasion to learn NewtonScript and how to use NTK.

The magic lines are the following:

// We'll save to the binary server soup.
DefConst( 'kBinaryServerSoupName, "Binaries_at_Binary Server:Kallisys" );

// screenshot function starts here ...
func()
begin
     // Create the screen shot with GIF Server.
     local theShot :=3D GetRoot().|pGIF Server:Kallisys|:ScreenShot();

     // Save it to the binary server soup so it can be served later =20
with Binary Server.
     local theSoup :=3D GetUnionSoup( kBinaryServerSoupName );
     theSoup:AddToDefaultStoreXmit( {
             class: 'binary,
             path: "shots/" & TimeInSeconds() & ".gif",
             binary: theShot.data,
             mimetype: theShot.type
      });
end;

I let you add this into a nice package with an interface to create =20
and save the screen shot whenever you want.
You might also want to look at BinInstaller package for this would =20
only work if the binary server soup already exists. BinInstaller =20
creates the soup if required.
This would require GIF Server to be installed and active on the =20
Newton (just like Screen Shooter).

Paul
--=20
Ministre ultrapl=E9nipotentiaire en disponibilit=E9.
Mobile. Sans baignoire fixe.
http://www.kallisys.com/
http://www-poleia.lip6.fr/~guyot/

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Wed Jun 08 2005 - 19:00:01 PDT