lhm-scripts/RPG.js
2023-05-25 22:30:40 +00:00

76 lines
No EOL
1.8 KiB
JavaScript

//
// RPG - Ford Parts by Basic for CDK Drive
//
var core;
bzhao = new ActiveXObject("BZWhll.WhllObj");
bzhao.Connect( "" );
core = bzhao.InputBox ("Enter core number", "0");
if (core == 0)
{
bzhao.MsgBox("Aborted");
}
else if (core != "0") {
if (core != "") {
if (core != 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: ABG672-I", 1, 1, 0.1))
{
bzhao.MsgBox("Please return to home screen");
}
bzhao.WaitForText("Account: ABG672-I", 1, 1, 100000);
bzhao.SendKey( "RPG" );
bzhao.SendKey( "<Enter>" );
bzhao.SendKey( "<CursorRight>" );
bzhao.SendKey( "<CursorRight>" );
bzhao.SendKey( "<CursorRight>" );
bzhao.SendKey( "<CursorDown>" );
bzhao.SendKey( "<CursorDown>" );
bzhao.SendKey( "<CursorDown>" );
bzhao.SendKey( "<CursorDown>" );
bzhao.SendKey( "<CursorDown>" );
bzhao.SendKey( "<CursorDown>" );
bzhao.SendKey( "<CursorDown>" );
bzhao.SendKey( "<CursorDown>" );
bzhao.SendKey( "<Enter>" );
bzhao.WaitForText("cols 31");
bzhao.SendKey( "R" );
bzhao.SendKey( "<Enter>" );
bzhao.SendKey( "<Enter>" );
bzhao.WaitForText("Ford Parts by Basic PROMPT # 1", 1, 1, 100000);
bzhao.SendKey( "[" );
bzhao.SendKey( core );
bzhao.SendKey( "]" );
bzhao.SendKey( "<Enter>" );
bzhao.WaitForText("cols 31", 1, 1, 100000);
bzhao.SendKey( "E" );
bzhao.SendKey( "<Enter>" );
bzhao.SendKey( "<Enter>" );
bzhao.Disconnect();
}
}
}