Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

I DESPERATELY NEED HELP WITH A WS SCRIPT!

$
0
0

I have been working on my first script to automate a task for work.  Sometimes it works and sometimes it doesn't.  It has never worked completely.  I have been working on this for three weeks and am now down to the wire.  I don't know where to go for assistance.  I am putting a copy of the script in this poist.  If anyone can help me I would GREATLY appreciate it.


Set WshShell = WScript.CreateObject("WScript.Shell")
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.Navigate "http://rets.usabilitydynamics.com"
'WshShell.SendKeys "{enter}"
 Wscript.sleep 2000
for i=0 to 7
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
' 10
Wscript.echo "start login"
'Wscript.sleep 200
WshShell.SendKeys "http://rets17.sandicor.com/Login.asmx/Login"
WshShell.SendKeys"{TAB}"
WshShell.SendKeys "toddidx"
WshShell.SendKeys"{TAB}"
WshShell.SendKeys "copperhead"
WshShell.SendKeys"{TAB}"
WshShell.SendKeys"{TAB}"
Wscript.sleep 2000
WshShell.SendKeys"{ENTER}"
'  22
Wscript.sleep 2000
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=User&r_class=14"
IE.Visible = True
wscript.sleep 5000
WshShell.SendKeys"{ENTER}"
WshShell.SendKeys"{ENTER}"
wscript.sleep 2000
'for u=0 to 4
WshShell.SendKeys"{F6}"
wscript.sleep 2000
'next
WshShell.SendKeys"{ENTER}"
Wscript.echo "class 14 complete"
Wscript.sleep 200
'43
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=office&r_class=15"
wscript.sleep 5000
WshShell.SendKeys"{ENTER}"
wscript.sleep 2000
for u=0 to 3
WshShell.SendKeys"{F6}"
wscript.sleep 2000
next
WshShell.SendKeys "{ENTER}"
Wscript.echo "office class 15"
Wscript.sleep 200
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Property&r_class=1"
wscript.sleep 5000
WshShell.SendKeys"{enter}"
WshShell.SendKeys"{ENTER}"
wscript.sleep 2000
for u=0 to 3
WshShell.SendKeys"{F6}"
wscript.sleep 2000
next  
'for u=0 to 30
'40
'WshShell.SendKeys"{TAB}"
'Wscript.sleep 200
'next
WshShell.SendKeys"{enter}"
Wscript.echo "2-4 Units class 1"
wscript.echo "quit"
wscript.quit

IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Office&r_class=2"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
'50
WshShell.SendKeys"{enter}"
Wscript.echo "RES Income class 2"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Office&r_class=3"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "insdstrial and RETAIL class 3"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Property&r_class=4"      
'60
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Hotel class 4"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=propertye&r_class=7"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
' 70
next
WshShell.SendKeys"{enter}"
Wscript.echo "Business opt class 7"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=property&r_class=9"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "RESidential class 9"
' 80
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=property&r_class=10"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "LGR class 10"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Property&r_class=11"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
' 90
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Time shares class 11"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Property&r_class=12"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
'100
Wscript.echo "Land class 12"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Property&r_class=13"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "MHP class 13"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Property&r_class=16"      
for u=0 to 30
'110
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "XProp class 16"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Property&r_class=18"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
' 120
WshShell.SendKeys"{enter}"
Wscript.echo "Rental class 18"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Save Search&r_class=1047"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Saved Search class 1047"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=StatsLoginDetails&r_class=1003"     
'130
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Login Status class 1003"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Contact&r_class=1001"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
'140
next
WshShell.SendKeys"{enter}"
Wscript.echo "Contact class 1001"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Datatransaction&r_class=1031"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Data Transaction class 1031"
'150
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=DeletedListings&r_class=1021"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Deleted Listing class 1021"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Hotsheet&r_class=1025"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
'160
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Hot Sheet class 1025"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=MEDIA&r_class=1026"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
'170
Wscript.echo "Property Media class 1026"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Media&r_class=1027"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Agent Media class 1027"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Media&r_class=1028"      
for u=0 to 30
'180
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Office Media class 1028"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=officefirm&r_class=1020"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
' 190
WshShell.SendKeys"{enter}"
Wscript.echo "Office Firm class 1020"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=openhouse&r_class=17"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Open House class 17"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=PAR&r_class=19"      
'200===================================================
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "PAR class 19"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=ParentChildLookup&r_class=1029"
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
'210
next
WshShell.SendKeys"{enter}"
Wscript.echo "Parent Child Lookup class 1029"
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=ParHistoryField&r_class=1018"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys"{enter}"
Wscript.echo "Par History Field class 1018"
'220
IE.Navigate "http://rets.usabilitydynamics.com/index.php?action=export&r_resource=Identityshare&r_class=1022"      
for u=0 to 30
WshShell.SendKeys"{TAB}"
Wscript.sleep 200
next
WshShell.SendKeys "{enter}"
Wscript.echo "Identity Share class 1022"
WshShell.SendKeys"{TAB}"
WshShell.SendKeys"{enter}"
Wscript.echo "Finish successFully"
wscript.quit
'230


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>