Wednesday, December 26, 2007

FileNet Capture 'Unable to save tiff rotaion for Faxes'

Problem: User is unable to save rotaion of Fax Images but has no problem with scanned one.

Reason: The possible reason for getting this error is because Fax image is not being in Group 4 format. So when user tries to chage and save rotation of Fax Images get this error.

Solution 1 : Check the configuration settings on Fax Gateway server.We solved this problem by changing the Incoming 'Fax Image format' from 'CCITT Group 3' to 'Group4'

Group 4 = Standard Tiff supported by FileNet Capture. User can change and save rotation for these images.

Solution 2 :If the first solution does not work then the problem is due to unavailability of 'Orientation' tag for the Tiff image. If this tag does not exists and user tries to save orientation we may get this error.

Tuesday, December 04, 2007

Send Keys Constants

VB: SendKeys Statement

Sends one or more keystrokes to the active window as if typed at the keyboard.
Syntax: SendKeys string[, wait]
The SendKeys statement syntax has these named arguments:

String expression (required) specifying the keystrokes to send
Wait (optional) Boolean value specifying the wait mode. If False (default), control is returned to the procedure immediately after the keys are sent. If True, keystrokes must be processed before control is returned to the procedure.
Remarks

To represent ABC abc 123 use "ABC abc 123" for string.

The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses ( ) are considered special characters. To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use {+}. Brackets ([ ]) have no special meaning to SendKeys, but you must enclose them in braces. In other applications, brackets do have a special meaning that may be significant when dynamic data exchange (DDE) occurs. To specify brace characters, use {{} and {}}.

To specify non printing keys such as ENTER or TAB, and function keys:

BACKSPACE {BACKSPACE}, {BS}, or {BKSP}
BREAK {BREAK}
CAPS LOCK {CAPSLOCK}
DEL or DELETE {DELETE} or {DEL}
DOWN ARROW {DOWN}
END {END}
ENTER {ENTER} or ~
ESC {ESC}
HELP {HELP}
HOME {HOME}
INS or INSERT {INSERT} or {INS}
LEFT ARROW {LEFT}
NUM LOCK {NUMLOCK}
PAGE DOWN {PGDN}
PAGE UP {PGUP}
PRINT SCREEN {PRTSC}
RIGHT ARROW {RIGHT}
SCROLL LOCK {SCROLLLOCK}
TAB {TAB}
UP ARROW {UP}
F1-F16 {F1}-{F16}
To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:

SHIFT = +
CTRL = ^
ALT = %

Combination Keys: To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to hold down SHIFT while E and C are pressed, use "+(ec)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+ec".

Repeating Keys: To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 25} means press the LEFT ARROW key 25 times; {h 15} means press the H key 15 times.
Note: You can't use SendKeys to send keystrokes to an application that is not designed to run in Microsoft Windows. SendKeys also can not send the PRINT SCREEN key {PRTSC} to any application.

List Commands with SendKeys using:

UtilityProvider.ContextValue(_ValueIndex)
ListVarx
ValueIndex is a zero based index for parameter retrieval, x is a one based index for parameter retrieval.
Examples for "Move <1to5>" command where contains UP, DOWN, RIGHT, LEFT and <1to5> contains 1,2,3,4,5

UtilityProvider.ContextValue(ValueIndex) example
SendKeys "{"+UtilityProvider.ContextValue(0)+" "+UtilityProvider.ContextValue(1)+"}"
ListVarx example
SendKeys "{"+ListVar1+" "+ListVar2+"}"

Parameter Conversion and Control Blocks

Convert Parameter to Number Value: block& = val(_arg1)
Convert Number Value to text (CStr(): SendKeys "{Enter}{Up "+CStr(block&)+"}"

If Statement:

if block& = 0 then
sline = "{Shift+End}"
else
sline = "{Shift+Down "+CStr(block&)+"}{Shift+End}"
end if

While Statement

block& = val(_arg1)
loop& = block&
while ( loop& )
Sendkeys "{End}{Enter}"
loop& = loop& - 1
wend

Substring Search Syntax
for list format "Written\Spoken"

Lc% = Instr(_arg1,"\") - 1
TextVal$=MID$(_arg1,0,Lc%)
SendKeys TextVal$

Diagnostic Example: Test List
SendKeys "1. Selected value:{Enter}"
SendKeys ListVar1
SendKeys "{Enter}2. Count to divisor:{Enter}"
Lc% = InStr(ListVar1,"\")
SendKeys CStr(Lc%)
SendKeys "{Enter}3. Count to cutoff:{Enter}"
Lc% = Lc% - 1
SendKeys CStr(Lc%)
SendKeys "{Enter}4. Resulting Value:{Enter}"
TextVal$=Mid$(ListVar1,1,Lc%)
SendKeys TextVal$
SendKeys "{Enter}Command Complete.{Enter}"