/// <summary> /// send keystrokes intended to signoff the display session to the Settings.SessId /// identified display session window. /// </summary> /// <param name="InSess"></param> public void Play_Signoff(DisplaySession InSess) { while (true) { PresentationSpace ps = InSess.GetPresentationSpace(); CommonScreens.SignonScreen sos = new CommonScreens.SignonScreen(ps); if (sos.IsScreen( )) { throw new EhllapiExcp("At signon screen. cant signoff from this screen."); } InSess.SendKeys(Ehllapier.Key.SystemRequest + Ehllapier.Key.Enter); InSess.Wait(); ps = InSess.GetPresentationSpace(); var sysrqs = new CommonScreens.SystemRequestMenuScreen(ps); if (sysrqs.IsScreen( )) { break; } } InSess.SendKeys("90" + Ehllapier.Key.Enter); InSess.Wait(); // signoff prompt InSess.SendKeys(Ehllapier.Key.Enter); InSess.Wait(); return; InSess.SendKeys(Ehllapier.Key.SystemRequest + "90" + Ehllapier.Key.Enter); Play_Signoff_WaitUntilSignedOff(InSess); }
public void Play_Signon(EhllapiSettings Settings) { try { using (DisplaySession sess = new DisplaySession()) { sess.Connect(Settings.SessId); sess.SendKeys(Settings.UserName); if (Settings.UserName.Length < 10) { sess.SendKeys(Ehllapier.Key.FieldExit); } sess.SendKeys(Settings.Password); if (Settings.Password.Length < 10) { sess.SendKeys(Ehllapier.Key.FieldExit); } sess.SendKeys(Ehllapier.Key.Enter); sess.Wait(); // display messages screen breaks on screen. Press enter. if (DisplayMessagesScreen.IsScreen(sess)) { sess.SendKeys(Ehllapier.Key.Enter); sess.Wait(); } // display program messages screen is displayed. Screen displays on // signon to say "message queue allocated to another job". // Press enter. if (DisplayProgramMessagesScreen.IsScreen(sess)) { sess.SendKeys(Ehllapier.Key.Enter); sess.Wait(); } // handle the "attempt to recover interactive job" display by running the signoff // option and signing on again. if (RecoverInteractiveJobScreen.IsScreen(sess)) { sess.SendKeys("90" + Ehllapier.Key.Enter); sess.Wait(); Play_Signon(Settings); } } } catch (ApplicationException excp) { throw new EhllapiExcp("Play_Signon script failed", excp); } }
public static void Play_ItemLocatorInquiry(EhllapiSettings InSettings) { try { PresentationSpace ps = null; SessionScript script = new SessionScript(); script.AssureSignoff(InSettings); // signon the display script.Play_Signon(InSettings); using (DisplaySession sess = new DisplaySession()) { sess.Connect(InSettings.SessId); // tab to the menu option input field sess.SendKeys(Ehllapier.Key.TabRight); // option i sess.SendKeys("i"); sess.Wait(); // 6174054 sess.SendKeys("6174054" + Ehllapier.Key.Enter); sess.Wait(); // option 10 sess.SendKeys(Ehllapier.Key.TabRight + Ehllapier.Key.NewLine + "10" + Ehllapier.Key.Enter); sess.Wait(); } } catch (ApplicationException excp) { throw new EhllapiExcp("Play_ItemLocatorInquiry script failed", excp); } }