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
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