lhm-scripts/PDA.js

57 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2023-02-24 18:42:00 -07:00
//
// PDA/T 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>" );
}
2023-05-25 16:31:04 -06:00
else if (bzhao.WaitForText("Account: ABG672-I", 1, 1, 0.1))
2023-02-24 18:42:00 -07:00
{
bzhao.MsgBox("Please return to home screen");
}
2023-05-25 16:31:04 -06:00
bzhao.WaitForText("Account: ABG672-I", 1, 1, 100000);
2023-02-24 18:42:00 -07:00
bzhao.SendKey( "PDA" );
bzhao.SendKey( "<Enter>" );
bzhao.SendKey( "T" );
bzhao.SendKey( "<Enter>" );
bzhao.WaitForText("PART NUMBER", 1, 1, 0.1);
2023-07-14 16:48:36 -06:00
bzhao.SendKey( partnum.toUpperCase() );
2023-02-24 18:42:00 -07:00
bzhao.SendKey( "<Enter>" );
bzhao.Disconnect();
}
}
}