Hey tek-tipper's
I'm rather unskilled when it comes to writing vbs scripts, however a few months back I decided I would look into automating a few web forms and with some help from the community I was able to successfully automate a few of my daily tasks.
I now have another idea that would significantly decrease my current work load.
Due to an influx of unforseen data, I now have an overload of webpforms that need to be completed.
What's required:
VBS script that opens IE and navigates to a variable URL
If a pop up appears,(only appears on some of the url's) script clicks ok.
Waits for webpage to load - Note the URL loads quickly however the JavaScript webpage is a lot slower.
make a selection from a drop box
make another selection from a drop box
click submit.
Rather simple, but here is where I'm lost.
Once the form is completed it needs to go the 'next URL' and perform the same task.
Now as I mentioned at the start of this post the URL varies for each form. However its only that last part of the URL that varies. See the below example the URL remains the same only the id changes
I have a list with hundreds of id's that all need to be updated.
As mentioned earlier I have pre populated forms in the past but nothing that needs to reference to a list.
here's all I know..
Dim URL
Dim IE
Dim ID
Set objIE = CreateObject("InternetExplorer.Application")
Call objIE.Navigate(" '<-- Don't know how insert id referenced from a list
objIE.Visible = True
Do Until objIE.ReadyState = PAGE_LOADED : Call WScript.Sleep(100) : Loop '<-- load url
WScript.Sleep(2500) '<-- Wait for webpage JavaScript (can take 20 seconds)
IE.Document.getElementByName("oper_select10").value = "1" 'select first drop down box (not working)
IE.Document.getElementByName("oper_select6").value = "1" 'select second drop down box (not working)
IE.Document.getElementByName("I2").Click 'Submit form (not working)
WScript.Sleep(2500)
Then the script needs to loop but with a different id..
I'm also curious why even the basic's of selecting my drop down box don't work any help or idea's is greatly appreciated.
Thank you in advance!
I'm rather unskilled when it comes to writing vbs scripts, however a few months back I decided I would look into automating a few web forms and with some help from the community I was able to successfully automate a few of my daily tasks.
I now have another idea that would significantly decrease my current work load.
Due to an influx of unforseen data, I now have an overload of webpforms that need to be completed.
What's required:
VBS script that opens IE and navigates to a variable URL
If a pop up appears,(only appears on some of the url's) script clicks ok.
Waits for webpage to load - Note the URL loads quickly however the JavaScript webpage is a lot slower.
make a selection from a drop box
make another selection from a drop box
click submit.
Rather simple, but here is where I'm lost.
Once the form is completed it needs to go the 'next URL' and perform the same task.
Now as I mentioned at the start of this post the URL varies for each form. However its only that last part of the URL that varies. See the below example the URL remains the same only the id changes
I have a list with hundreds of id's that all need to be updated.
As mentioned earlier I have pre populated forms in the past but nothing that needs to reference to a list.
here's all I know..
Dim URL
Dim IE
Dim ID
Set objIE = CreateObject("InternetExplorer.Application")
Call objIE.Navigate(" '<-- Don't know how insert id referenced from a list
objIE.Visible = True
Do Until objIE.ReadyState = PAGE_LOADED : Call WScript.Sleep(100) : Loop '<-- load url
WScript.Sleep(2500) '<-- Wait for webpage JavaScript (can take 20 seconds)
IE.Document.getElementByName("oper_select10").value = "1" 'select first drop down box (not working)
IE.Document.getElementByName("oper_select6").value = "1" 'select second drop down box (not working)
IE.Document.getElementByName("I2").Click 'Submit form (not working)
WScript.Sleep(2500)
Then the script needs to loop but with a different id..
I'm also curious why even the basic's of selecting my drop down box don't work any help or idea's is greatly appreciated.
Thank you in advance!