Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBS Personal Communication | Automation |

Status
Not open for further replies.

Adorusz

IS-IT--Management
Nov 21, 2018
1
GB
Hello everybody,

I have been trying to put together a VBS script to help ease my workload day-to-day, but I have run into problems or I should say, I have no idea how to get the script to do what I want it to do.

So the basic concept is the following:
-The script does a display
-Then it searches for a certain keyword
-IF it finds that keyword it'll alert the person
-IF not then continue through with other display commands

Now I was able to code the command part of it, but I got stuck with the if part, and of course with the part of alerting the user, maybe flashing the screen or putting it to the main window or even just maximizing it... Sadly I don't know, and this would be amazingly useful.

I will appreciate every bit of help!
Have a nice day!

The script:
UNFINISHED
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
HSM_check

sub HSM_check
while true
with autECLSession
autECLSession.autECLOIA.WaitForAppAvailable

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "/f dfhsm,q ac w"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"

autECLSession.autECLPS.WaitForAttrib 40,20,"08","3c",3,10000

autECLSession.autECLPS.Wait 25

autECLSession.autECLOIA.WaitForAppAvailable

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"

autECLSession.autECLPS.WaitForAttrib 4,20,"08","3c",3,10000

autECLSession.autECLPS.WaitForCursor 4,21,10000

autECLSession.autECLOIA.WaitForAppAvailable

autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "f '=held'"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"

autECLSession.autECLPS.SearchText("LINE *BOTTOM OF DATA REACHED*",1,3,52)

autECLSession.autECLPS.WaitForAttrib 4,80,"20","3c",3,10000

autECLSession.autECLPS.Wait 6000
end with
wend
end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top