`I’m using the Wacom SDK Signature and would like to incorporate both the signature and name into the image I’m saving. Even though I’m using a bat file to create the image, I’m having difficulty capturing the name next to the signature. The signature is saved in the image but the name is not.
The image currently only contains the signature, but I would like both the signature and name to be saved.
<code>`@set @junk=1 /* harmless set command starts commenting batch file commands when the file is used as javascript source
@echo off
setlocal
REM Run the 64-bit version of cscript
set APP=cscript
call %APP% //nologo //E:jscript %0 %*
pause
goto :eof
*/
/*
Javascript
Captures a signature and creates encoded image file sig.png
Optionally a different filename can be supplied as an argument
e.g. sign myfile.png
*/
function print( txt ) {
WScript.Echo(txt);
}
main();
function main() {
var name1 = WScript.StdIn.ReadLine();
var number1 = WScript.StdIn.ReadLine();
filename = "sig.png";
args = WScript.Arguments;
if(args.Count() > 0 )
filename=args(0);
sigCtl = new ActiveXObject("Florentis.SigCtl");
sigCtl.Licence = "AgBBALDf2MgEBVdhY29tI1NESyBFdmFsdWF0aW9uICsgZXhwaXJlcyAyMDE4LzAzLzMxAwKBAgJkAAAIAwEDZQAGgQAEtqgAAA";
dynCapt = new ActiveXObject("Florentis.DynamicCapture");
rc = dynCapt.Capture(sigCtl,name1,number1);
flags = 0x1000 | 0x80000 | 0x400000; //SigObj.outputFilename | SigObj.color32BPP | SigObj.encodeData
rc = sigCtl.Signature.RenderBitmap(filename, 300, 150, "image/png", 0.5, 0xff0000, 0xffffff, 0.0, 0.0, flags );
print("Created Signature image file: " + filename);
}
</code>
<code>`@set @junk=1 /* harmless set command starts commenting batch file commands when the file is used as javascript source
@echo off
setlocal
REM Run the 64-bit version of cscript
set APP=cscript
call %APP% //nologo //E:jscript %0 %*
pause
goto :eof
*/
/*
Javascript
Captures a signature and creates encoded image file sig.png
Optionally a different filename can be supplied as an argument
e.g. sign myfile.png
*/
function print( txt ) {
WScript.Echo(txt);
}
main();
function main() {
var name1 = WScript.StdIn.ReadLine();
var number1 = WScript.StdIn.ReadLine();
filename = "sig.png";
args = WScript.Arguments;
if(args.Count() > 0 )
filename=args(0);
sigCtl = new ActiveXObject("Florentis.SigCtl");
sigCtl.Licence = "AgBBALDf2MgEBVdhY29tI1NESyBFdmFsdWF0aW9uICsgZXhwaXJlcyAyMDE4LzAzLzMxAwKBAgJkAAAIAwEDZQAGgQAEtqgAAA";
dynCapt = new ActiveXObject("Florentis.DynamicCapture");
rc = dynCapt.Capture(sigCtl,name1,number1);
flags = 0x1000 | 0x80000 | 0x400000; //SigObj.outputFilename | SigObj.color32BPP | SigObj.encodeData
rc = sigCtl.Signature.RenderBitmap(filename, 300, 150, "image/png", 0.5, 0xff0000, 0xffffff, 0.0, 0.0, flags );
print("Created Signature image file: " + filename);
}
</code>
`@set @junk=1 /* harmless set command starts commenting batch file commands when the file is used as javascript source
@echo off
setlocal
REM Run the 64-bit version of cscript
set APP=cscript
call %APP% //nologo //E:jscript %0 %*
pause
goto :eof
*/
/*
Javascript
Captures a signature and creates encoded image file sig.png
Optionally a different filename can be supplied as an argument
e.g. sign myfile.png
*/
function print( txt ) {
WScript.Echo(txt);
}
main();
function main() {
var name1 = WScript.StdIn.ReadLine();
var number1 = WScript.StdIn.ReadLine();
filename = "sig.png";
args = WScript.Arguments;
if(args.Count() > 0 )
filename=args(0);
sigCtl = new ActiveXObject("Florentis.SigCtl");
sigCtl.Licence = "AgBBALDf2MgEBVdhY29tI1NESyBFdmFsdWF0aW9uICsgZXhwaXJlcyAyMDE4LzAzLzMxAwKBAgJkAAAIAwEDZQAGgQAEtqgAAA";
dynCapt = new ActiveXObject("Florentis.DynamicCapture");
rc = dynCapt.Capture(sigCtl,name1,number1);
flags = 0x1000 | 0x80000 | 0x400000; //SigObj.outputFilename | SigObj.color32BPP | SigObj.encodeData
rc = sigCtl.Signature.RenderBitmap(filename, 300, 150, "image/png", 0.5, 0xff0000, 0xffffff, 0.0, 0.0, flags );
print("Created Signature image file: " + filename);
}
New contributor
carid is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.