sunhux
asked on
VB Visual Basic script to auto click repeated buttons in an IE based Helpdesk screen
Hi,
I need a VB visual basic or any method that will click on the "Search"
button every 2 minutes to refresh the screen to see if there's any
new incoming incident records.
Step1:
After clicking "Search", this VB script will search for the last record
(ie first record if searched from the bottom upwards) with the status
"Assigned", double-left-click on the link "Assigned" in the Status column
as shown in 1st attachment :
Step2:
This will bring up the 2nd screen (as shown in 2nd attachment) :
In this 2nd screen, the script will click on the drop-down Status field &
select the value "Pending", then click on the drop-down Impact field &
select the value "3-Moderate/Limited" & finally click the Save button
on the bottom left corner (not visible in this 2nd attachment as hidden).
After clicking Save, script will click on the X of this IE screen to close it.
Then script will return to Step 1 to repeat the whole process all over
Note that the VB script need not login nor navigate, I'll leave this screen
on all the time on this PC.
This helpdesk system is rather slow & needs constant monitoring so I'll
need some sort of "automation" so that things don't get out of hand
Mainpg0b.jpg
Incidpg1b.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Someone in EE, Psy053 has written a VB script for me which could do something
similar as per the thread below (& I think that requirement is more difficult) :
https://www.experts-exchange.com/questions/25119740/MS-Visual-Basic-script-VB-or-Perl-script-to-send-SMS-to-a-telco-provider-web-page.html
Perhaps can tell me if there's any way I can get in touch with Psy053 ?
ASKER
It's practically impossible to get the Helpdesk tool support team to do this or even
customize the Helpdesk software for me
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi jostrander,
Attached, the source html for the 1st & 2nd screens (with sensitive info sanitized:
Thanks very much in advance, appreciate it
Mainpg0.txt
popupsrc.txt
ASKER
Hi jostrander,
Is there any update from you?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, it refreshes every 1.5-2 mins but I the following line creates another
new IE screen (sort of Ctrl-N) on top of the current existing IE screen (which is
probably not needed as I've logged in & the IE screen is there already) :
Set web = CreateObject("InternetExpl
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
We're only half way there: after refreshing, if there's any new incoming incidents with
Status "Assigned", I'll need the script to
1) click on the last "Assigned" link which will pop up another IE window (see Attachment 2)
& in this 2nd popup IE,
2) click on the Status field's dropdown list to select the value "Pending" & then
3) click on the Priority field's dropdown list to select the value "3-Medium" & then
4) click "Save" button on this 2nd IE window
5) exit this 2nd IE window
Then the script will resume refreshing the 1st IE screen
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Someone ever gave me a VBS script that could handle a pop up script
for one SMS centre website to auto-send an SMS.
Codes appended below, not sure if this will give you an idea :
a 2nd IE window pops up after the following codes:
(I'm VB illiiterate)
objIE.Document.LoginForm.I
objIE.Document.LoginForm.I
objIE.Document.LoginForm.s
==========================
strMobile = "98888888"
strMessage = "This is a test message"
Set objIE = CreateObject("InternetExpl
objIE.Navigate "http://sms.singtel.com/internetsms/"
objIE.Visible = True
Do While objIE.Busy
WScript.Sleep 2000
Loop
objIE.Document.LoginForm.I
objIE.Document.LoginForm.I
objIE.Document.LoginForm.s
Do While objIE.Busy
WScript.Sleep 2000
Loop
objIE.Document.startChatFo
objIE.Document.getElementB
WScript.Sleep 10000
strURL = "http://sms.singtel.com/internetsms/sendMsg.do?id=1&recipient="
intCounter = 0
Set objShell = CreateObject("Shell.Applic
Set objShellWindows = objShell.Windows
Do While intCount <= 10
For each objWindow in objShellWindows
If Instr(objWindow.LocationUR
StrPopupURL = objWindow.LocationURL
Exit Do
End If
Next
intCount = intCount + 1
If intCount = 10 Then
objIE.Navigate "http://sms.singtel.com/internetsms/logoutAction.do"
WScript.Echo "The script was not able to find the popup window. Script Quitting"
WScript.Quit
End If
Sleep 2000
Loop
Set objIE_Pop = CreateObject("InternetExpl
objIE_Pop.Navigate strPopupURL
objIE_Pop.Visible = True
Do While objIE_Pop.Busy
WScript.Sleep 2000
Loop
objIE_Pop.Document.getElem
objIE_Pop.Document.getElem
Do While objIE_Pop.Busy
WScript.Sleep 2000
Loop
WScript.Sleep 10000
For each objWindow in objShellWindows
If Instr(objWindow.LocationUR
objWindow.Quit
End If
Next
objIE.Navigate "http://sms.singtel.com/internetsms/logoutAction.do"
Do While objIE.Busy
WScript.Sleep 2000
Loop
objIE.Quit
set objIE = nothing
set objIE_Pop = nothing
set objShellWindows = nothing
set objShell = nothing
Sorry, I've been very busy lately. I'll try to work on the next steps later today.
Joe
Joe
ASKER
Hi Jostrander,
Any update ?
Any update ?
Sorry, I forgot about this. I will look into it some more now.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Jostrander,
In the IE screen where this applications' Mainpg0 is open, I click "File ==> Save As"
& attached is the saved file (but there's a message that "this page may not save properly".
Use MSWOrd / Wordpad to view this saved html page : doesn't look like it would tell you
where to find the elements.
Short of passing you the login id / password, I'm not sure whether there's a better way
to provide inputs to you but do let me know if you would like further inputs
InciMgthtm.txt
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Attached Chrome's Inspect Element, does it help?
I don't think the attachment went through, can you retry please?
ASKER
ASKER
I could not copy the entire Inspect Element's text window & paste it into Word / Notepad;
it only allows me to take screen shots
Instead of the search button, can you get the same thing from a record that appears in the "Assigned Work" area? This is the area that I'm not finding any data in.
ASKER
Hi
Do you have a private email? I thought of sending a readonly account access to you
but I need to seek clearance first.
I've captured Javascript codes using Chrome's Developer inspect element : see the attachments
titled Javascript codes (ie last few attachments) - not sure if this would help but I felt they
have more details than View->Source & Inspect Elements.
Further Inspect Elements screen shots attached (using SnagIt, I capture part by
part as I can't do copy & paste ) :
Incidpg1a.jpg
Incidpg1b.jpg
Incidpg1c.jpg
Incidpg1d.jpg
Incidpg1e.jpg
Incidpg1f.jpg
pg2a.jpg
pg2b.jpg
pg2c.jpg
pg2d.jpg
pg2e.jpg
SrcPg1.doc
Pg1img.jpg
SrcPg2.doc
ASKER
No working solution
ASKER
Slight addition to Step1 :
if there's no new "Assigned" records coming in, the script will not
proceed to Step2 but rather wait 2 minutes & repeat Step1 till there's
new records coming in with the Status "Assigned"