Running NKRemote from other programs
|Top Previous Next|
NKRemote includes an interface library called NKRemoteLib.dll which can be used by other applications to control NKRemote. Also included is a simple command line application called NKRemoteLibTest.exe which can be used to control NKRemote from a command prompt or a batch file. For example a batch file could be written to take a series of photos using different apertures and shutter speeds to bracket the exposure.
NKRemoteLib.dll is a library that can be used by other programs to control NKRemote. It can be found in the main folder where NKRemote is installed (usually C:\Program Files\BreezeSys\NKRemote). Please see the NKRemoteLibTest\ReadMe.txt and NKRemoteLib.h files for details.
NKRemoteLibTest.exe - compiled console application
NKRemoteLib.dll - DLL used by NKRemoteLibTest.exe to interface with NKRemote
NKRemoteLib.lib - lib for apps to link to the DLL
NKRemoteLib.h - header file for C applications using the DLL
NKRemoteLibTest - directory containing a VC++ 2005 project and source code for NKRemoteLibTest.exe
NKRemoteLibTest.exe is a simple command line application that communicates with NKRemote and allows the shutter to be released and some of the camera settings to be changed. NKRemoteLibTest.exe and complete source code to build it using Visual C++ .Net can be found in the NKRemoteLibTest folder where NKRemote is installed (usually C:\Program Files\BreezeSys\NKRemote).
Please note: NKRemoteLibTest.exe only shows some of the commands available using NKRemoteLib.dll. Please see the NKRemoteLib.h header file for a complete list of available commands.
To run NKRemoteLibTest.exe first run NKRemote and then open a command prompt window and change directory to the NKRemote installation folder. The run NKRemoteLibTest.exe -h to get a list of the available commands.
Here is the output from a simple session where the output directory is set and the shutter is released (commands typed in by the user are shown in bold):
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Chris>cd C:\Program Files\BreezeSys\NKRemote\NKRemoteLib
C:\Program Files\BreezeSys\NKRemote\NKRemoteLib>NKRemoteLibTest.exe -h
Usage: NKRemoteTest <options>
-h print this usage information
? display camera info
-w <shots> run camera as a webcam for <shots> shots
images are saved as webcam.jpg in the current directory
-t <interval> specify the number of seconds between shots when
used as a webcam
-C <connect> connect or disconnect from the camera
-a <aperture> set the aperture, 0 = widest aperture
-b <WB> set the white balance or kelvin color temp
-e <mode> set the exposure mode
-s <shutter> set the shutter speed, 0 = longest shutter speed
-x <comp> set the exposure compensation
-i <size> set the image size
-Q <quality> set the image quality
-I <ISO> set the ISO
-L <enable> display/hide live view window
-f <step> focus lens: step range -32767 (close) to 32767 (far)
-c <comment> set comment to be added to images (max 255 chars)
-o <directory> set the output directory
-p <prefix> set the filename prefix (max 255 chars)
-P <action> Photobooth action: 0=start, 1=stop, 2=release, 3=BW release,
4=color release, 5=BW mode, 6=color mode, 7=1 print, 8=2 prints, 9=3 prints,
10=4 prints, 11=5 prints, 12=increase copies, 13=decrease copies,
14=profile 1, 15=profile 2, 16=profile 3, 17=profile 4,
18=profile 5, 19=profile 6
-q query output directory
-n don't release shutter
-X exit NKRemote
C:\Program Files\BreezeSys\NKRemote\NKRemoteLib>NKRemoteLibTest.exe -n -q
Output directory: C:\NKRemote
Success, image saved as: C:\NKRemote\2009-10-14\0001.JPG