54 lines
No EOL
1.1 KiB
JavaScript
54 lines
No EOL
1.1 KiB
JavaScript
//
|
|
// DL SCRIPT FOR CDK DRIVE
|
|
//
|
|
|
|
var partnum;
|
|
|
|
bzhao = new ActiveXObject("BZWhll.WhllObj");
|
|
bzhao.Connect( "" );
|
|
|
|
partnum = bzhao.InputBox ("Enter part number (without - or *)", "0");
|
|
if (partnum == 0)
|
|
{
|
|
bzhao.MsgBox("Aborted");
|
|
}
|
|
else if (partnum != "0") {
|
|
if (partnum != "") {
|
|
if (partnum != null) {
|
|
var PDATM = bzhao.WaitForText("Use Arrow", 1, 1, 0.1);
|
|
var PDAT = bzhao.WaitForText("PART NUMBER", 1, 1, 0.1);
|
|
var PDA = bzhao.WaitForText("(PDA)", 1, 1, 0.1);
|
|
var DL = bzhao.WaitForText("O.H. PART-NO............ BIN...", 1, 1, 0.1);
|
|
if (PDATM == 0)
|
|
{
|
|
bzhao.SendKey( "<F3>" );
|
|
bzhao.SendKey( "<Enter>" );
|
|
bzhao.SendKey( "<Enter>" );
|
|
}
|
|
else if (PDAT == 0)
|
|
{
|
|
bzhao.SendKey( "<Enter>" );
|
|
bzhao.SendKey( "<Enter>" );
|
|
}
|
|
else if (PDA == 0)
|
|
{
|
|
bzhao.SendKey( "<Enter>" );
|
|
}
|
|
else if (DL == 0)
|
|
{
|
|
bzhao.SendKey( "<Enter>" );
|
|
}
|
|
else if (bzhao.WaitForText("Account: FTL-I", 1, 1, 0.1))
|
|
{
|
|
bzhao.MsgBox("Please return to home screen");
|
|
}
|
|
bzhao.WaitForText("Account: FTL-I", 1, 1, 100000);
|
|
bzhao.SendKey( "DL" );
|
|
bzhao.SendKey( "<Enter>" );
|
|
bzhao.WaitForText("O.H. PART-NO............ BIN...", 1, 1, 0.1);
|
|
bzhao.SendKey( partnum );
|
|
bzhao.SendKey( "<Enter>" );
|
|
bzhao.Disconnect();
|
|
}
|
|
}
|
|
} |