                           |           |  
  __| |   | __ `__ \   __| __ \   _ \  __|
 |    |   | |   |   |\__ \ | | | (   | |  
_|   \__, |_|  _|  _|____/_| |_|\___/ \__|
     ____/                                

rymshot.dll screenshot module for litestep
http://litestep.waglo.com/modules/rymshot/
for  updates,  source  code and more  info

2002-03-31, v0.17: initial release
2002-03-31, v0.18: finished docs, little cleanups
2002-04-01, v0.19: ftp upload, disable unneeded bangs, enabled bmp support
2002-04-01, v0.21: a few bugfixes (resolution, ftp folder, etc.)
2002-04-02, v0.25: new bang: rymshotactive and associated setup options
2002-04-02, v0.26: now compiles with g++
2002-04-03, v0.27: text overlay options
2002-04-03, v0.32: fixed transparency issues on nt/w2k/xp (thanks, Vulpes!)
                    "implemented" file locks
                    (Vulpes saw a problem when running ACDSee 4.0)
2002-04-03, v0.33: new options: rymshotftpnocaption and rymshotftpnothumbnail
2002-04-03, v0.36: new image file format: png
2002-04-07, v0.39: fixed included headers to make building more cross-platform
		    removed couple extra functions
		    fixed recycling problems with old configs corrupting new
		    using strnxxx instead of strxxx
		    new ftp bang to set password, can't have empty password




Setup
=====
If this is the first time you install rymshot, move these two files to a
directory on your path, your windows directory if you have nowhere better:
cygwin1.dll
cygjpeg6b.dll

Note that if you are using cygwin already, you probably don't have to do this
but make sure both files are in your path anyway. Don't worry if you are not
sure what cygwin is: it's a needed component of rymshot for now, but I hope to
let go of it soon.

Next, install rymshot.dll like you would any other module, moving it to your
litestep modules folder and inserting a line like the following in your
step.rc:

loadmodule "c:\litestep\modules\rymshot.dll"
or
loadmodule "c:\litestep\modules\rymshot.dll" threaded

I recommend the threaded option, since some rymshot bangs might take a little
while to finish.

Of course, you want to adapt the path to wherever you installed the module.
I've been running it threaded with no problems, but I don't know what the
repercussions might be. If you experience any problems running it threaded,
please let me know.

That's the minimum you need to be able to use this module. All other settings
are optional. Recycle, and you can start using rymshot right away with default
values, which are quite sane in my opinion. Don't just stand there, read on,
some options are very interresting :)


Options
=======
general options:
----------------        [default]
rymshotquality          50              0 (worst) to 100 (best) jpeg quality
rymshotformat           jpg             bmp, jpg, png and eventually pnm
rymshotfilename         rymshot         whole path and file name, no extension

thumbnail options:
------------------
rymshotthumbnail        false           use thumbnail?
rymshottnquality        rymshotquality  0 (worst) to 100 (best) jpeg quality
rymshottnwidth          200             1 .. desktop width
rymshottnheight         150             1 .. desktop height
rymshottnformat         rymshotformat   bmp, jpg, png and eventually pnm
rymshottnfilename       rymshotfilename + "-tn"

ftp options:
------------
rymshotftp              false           use ftp to upload screenshots?
rymshotftpuser          [empty]         ftp username
rymshotftppassword      [empty]         ftp password
rymshotftpserver        [empty]         ftp server
rymshotftpfolder        [empty]         ftp folder
rymshotftpfile          [empty]         ftp filename
rymshotftperrortreshold      20         number of errors before we disable ftp
rymshotftpnothumbnail     false         don't use thumbnail for ftp
rymshotftpnocaption       false         don't use caption for ftp

active options:
---------------
rymshotactivequality    rymshotquality  0 (worst) to 100 (best) jpeg quality
rymshotactiveformat     rymshotformat   bmp, jpg, png and eventually pnm
rymshotactivefilename   rymshotfilename + "-active"

caption options:
---------------
rymshotcaption          false   enables the caption
rymshotcaptiondateformat varies text and a date format string, like strftime
rymshotcaptionx         varies  x coord of caption (top-left = 0, 0)
rymshotcaptiony         varies  y coord of caption (top-left = 0, 0)
rymshotcaptioncolor     RGB     color of caption, RGB in general




Note: currently, the only supported formats are
jpeg and bmp. When no path is given, the files
are saved in your litestep folder.

future release thumbnail options:
---------------------------------
rymshottnscale          0.25
rymshottnscalewidth     0.25
rymshottnscaleheight    0.25



Note: I'm not exactly sure how to handle processing
of the widht/height or scale values. mritche suggested
scaling factors too. If you have any suggestions,
now's a good time :)


Bangs
=====
!rymshot		save screenshot to file and optionaly a thumbnail
!rymshotactive		save active window to file [and optionaly a thumbnail]
!rymshottn		save only a thumbnail if enabled
!rymshotnotn		save whole screenshot only, no thumbnail
!rymshotftp		upload screenshot thru ftp
!rymshotftppassword	sets ftp password until next !recycle

Eventually, you will be able to pick what you want to capture. Here's a sample
of the bangs to come:
!rymshotactive  save screenshot of active window [done in v0.25]
!rymshotid id   save screenshot of area #id


Advanced
========
This stuff is so advanced, seriously, you shouldn't consider trying it unless
you have 6 years of yoga under your belt. You'd need extreme patience to get
this feature to work like you indend. Trust me, it's really not worth it.
It's not only advance, it's also from the future! That's right!
It's another thing on my todo list, but I thought I'd give it a special
treatment, since it's a feature that could use a lot of input. That's if I
haven't scared everyone away yet...
"So what's this great feature I keep hearing about", you ask? It's about
time you ask!

You might have noticed in the bangs above:
!rymshotid id
The mysterious 'id' is defined following either of these formats:
*rymshot id,window class/name,filename,thumbnail
*rymshot id,x,y,width,height,filename,thumbnail

This is all beautiful, but like I said, it's NOT implemented yet.
I just thought I'd let you know what was coming, and hoped to get
some feedback as well.



Todo
====
implement ftp facility (wininet or better?) [done with v0.19]
make file format configurable [done with v0.19]
bells and whistles
select window/area to capture [done partly with v0.25]
what about multimonitors?
explain the cygwin/mingw build procedure
port to mingw instead of cygwin {*1}
find other ways to save jpeg/png/pnm files {*1}
progress bar for ftp upload (repugnant)
sequential filenames (Vulpes)
save to clipboard
printscreen key {*2}
capture lsboxes (verbalshadow)
file locking [done with v0.32]
make pureLS compatible (TucknDar)
ftp password encryption or prompt {*3}
setup strftime man page for caption date/time format
skinnable area to show state (on or off...)
fix png implementation
ftp thread (repugnant)

note *1: see http://sourceforge.net/projects/mingwrep/
	 and http://www.colomsat.net.co/freehost/ngiraldo/cppcygwin.html

note *2: see http://www.mvps.org/vbnet/code/subclass/registerhotkey.htm

note *3: see http://php.net/crypt for DES 56

extra ideas: http://www.americansys.com/psd.htm



Remarks / Bugs
==============
I can't take a screenshot when the active window is ACDSee32 Classic 2.43,
anyone else had that problem with this or another application?
Also, see this picture of the Taskman for win95... why would it do that?
http://litestep.waglo.com/modules/rymshot/bug-00-active.jpg
I appears running ACDSee32 while taking a screenshot is not very good.
This is probably because litestep is opening the file for writing
and ACDSee32 maybe locks it while reading it... I'm not sure that I can
fix this for win95, any clues would be appreciated!


Conclusion
==========
I have one last question: should I keep on using "tn" as an abbreviation
for "thumbnail" in the bangs and settings, or should I use the whole word?
To contact me:
Robin Y. Millette, aka Lord D. Nattor, aka rym
millette@waglo.com
home page:      http://rym.waglo.com
rymshot page:   http://litestep.waglo.com/modules/rymshot/
rymmarks (my 27,000 bookmarks): http://rymmarks.waglo.com
If you are so inclined, you will find the source code in plain c to this
module at the rymshot homepage.
P.S.: things might not work if you don't stick to lowercase letters. I'll take
care of that eventually. If you notice anything else out of the ordinary, let
me know!
