// // 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( "" ); bzhao.SendKey( "" ); bzhao.SendKey( "" ); } else if (PDAT == 0) { bzhao.SendKey( "" ); bzhao.SendKey( "" ); } else if (PDA == 0) { bzhao.SendKey( "" ); } else if (DL == 0) { bzhao.SendKey( "" ); } else if (bzhao.WaitForText("Account: ABG672-I", 1, 1, 0.1)) { bzhao.MsgBox("Please return to home screen"); } bzhao.WaitForText("Account: ABG672-I", 1, 1, 100000); bzhao.SendKey( "PDA" ); bzhao.SendKey( "" ); bzhao.SendKey( "T" ); bzhao.SendKey( "" ); bzhao.WaitForText("PART NUMBER", 1, 1, 0.1); bzhao.SendKey( partnum.toUpperCase() ); bzhao.SendKey( "" ); bzhao.Disconnect(); } } }