Đang Thực Hiện

368736 Twitter API VBS Script

Currently my tweets look like this:

$859K: 120 LOYOLA AV, Menlo Park 3br, 2ba, 1,740SF Lot=8,851. Commission rebate $17K when you buy this [url removed, login to view]

10:01 AM Nov 17th from API

Here are some of the changes I would like to make:

1) I would like to utilize the maximum number of allowed characters in each tweet. Unfortunately the street name and number are extremely variable so we had to shorten up the length of ALL tweets to accommodate the longest possible street name and number. This prevents me from displaying more property information. This also prevents me from displaying a complete sentence for my commission rebate offer.

2) I would like my commission rebate sentence to change to: Get a commission rebate of $17k when you buy this

3) If the script needs to truncate the tweet due to a longer address I would like it to cut out: first = Lot=8,851 second = 1,740SF

4) The most important change I need to the script is the prevention of duplicates. Currently the script is running once per day. It gathers the most recent listings and posts them regardless if they were already posted or not. This causes google to see these repetitive tweets as spam so my tweets don't show up in google search results. Hopefully there is some way for the script to be smart enough to know that it already posted a specific property and will not re-post it as a duplicate

This is what I would like my tweets to look like:

120 LOYOLA AV, Menlo Park CA, 94025: $859K, 3br, 2ba, 1,740SF Lot=8,851. Get a commission rebate of $17K when you buy this [url removed, login to view]

10:01 AM Nov 17th from API

Below is my current script. I would like to keep this script and make the changes above.

dim aCity(25)

dim result(20)

dim result2(20)

dim result3(20)

aCity(1) = "A"

aCity(2) = "A"

aCity(3) = "A"

aCity(4) = "A"

aCity(5) = "A"

aCity(6) = "A"

aCity(7) = "A"

aCity(8) = "A"

aCity(9) = "A"

aCity(10) = "A"

aCity(11) = "A"

aCity(12) = "A"

aCity(13) = "A"

aCity(14) = "A"

aCity(15) = "A"

aCity(16) = "A"

aCity(17) = "A"

aCity(18) = "A"

aCity(19) = "A"

aCity(20) = "A"

aCity(21) = "A"

aCity(22) = "A"

aCity(23) = "A"

aCity(24) = "A"

acity(25) = "A"

dim alogin(25)

alogin(1) ="B"

alogin(2) ="B"

alogin(3) ="B"

alogin(4) ="B"

alogin(5) ="B"

alogin(6) ="B"

alogin(7) ="B"

alogin(8) ="B"

alogin(9) ="B"

alogin(10) ="B"

alogin(11) ="B"

alogin(12) ="B"

alogin(13) ="B"

alogin(14) ="B"

alogin(15) ="B"

alogin(16) ="B"

alogin(17) ="B"

alogin(18) ="B"

alogin(19) ="B"

alogin(20) ="B"

alogin(21) ="B"

alogin(22) ="B"

alogin(23) ="B"


alogin(25) ="B"

dim apass(25)

apass(1) ="C"

apass(2) ="C"

apass(3) ="C"

apass(4) ="C"

apass(5) ="C"

apass(6) ="C"

apass(7) ="C"

apass(8) ="C"

apass(9) ="C"

apass(10) ="C"

apass(11) ="C"

apass(12) ="C"

apass(13) ="C"

apass(14) ="C"

apass(15) ="C"

apass(16) ="C"

apass(17) ="C"

apass(18) ="C"

apass(19) ="C"

apass(20) ="C"

apass(21) ="C"

apass(22) ="C"

apass(23) ="C"

apass(24) ="C"

apass(25) = "C"

'create and open connection

Dim strConnection

Set oCon = CreateObject("[url removed, login to view]")

strConnection = "DRIVER={SQL Server}; Server=[url removed, login to view];" _

& " Database=MLSData; UID=xxx; PWD=xxxxxx;"

set rsa = CreateObject("[url removed, login to view]")

[url removed, login to view](strConnection)

set rsa = CreateObject("[url removed, login to view]")

testdate =dateadd("d", -10, now())


for i =0 to 5

for b=1 to 25

' sqllu = "select convert(datetime, ModificationTimestamp), listingID as id from rets_data_all where

convert(datetime, ModificationTimestamp) > '05-01-2009' Order by convert(datetime, ModificationTimestamp) limit 10"

sqllu = "select listingID, structuresize, convert(int,commissionrate) as commissionrate,

convert(datetime,ModificationTimestamp) as ModificationTimestampRF, filteredAddress, lotsizearea, CONVERT(INT, listprice) as

listpriceINT, city, beds, baths from rets_data_all where city='"& aCity(b) & "'and listingstatus_code='Active' and class='1'

and convert(INT, listprice) >'750000' and convert(datetime, ModificationTimestamp) >='"& testdate & "' "

[url removed, login to view] sqllu, oCon, 1, 1

'[url removed, login to view] acity(b)

if [url removed, login to view] = true then

[url removed, login to view]


[url removed, login to view] +i











if len(listprice) < 7 then


listpriceRF=Left(listprice, 3)




' listpriceRF=FormatCurrency(listpriceRF, 2)

listpriceRF=Left(listpriceRF, 3)



end if

if IsNumeric(lostsize) then


if len(lotsize)>3 then


sLeft4 =left(lotsize, len(lotsize)-3)

sRight4 = Right(lotsize, 3)


end if



end if

rebate=(.02 *listprice)



sLeft =left(structuresize, len(structuresize)-3)

sRight = Right(structuresize, 3)


rebate =left(rebate,2)


'[url removed, login to view]("<br/>("&i&") MOD DATE:"&moddate&" test


"&structuresize&" SF Lost="&lotsize&" Get a commission rebate of $"&rebate&"k when you buy this home

[url removed, login to view]"&listingID)

'[url removed, login to view]

Set xml = CreateObject("[url removed, login to view]")

twitter_username = alogin(b) 'change to your twitter username

twitter_password = apass(b) 'change to your twitter password

twitterstring= dollarsymbol&listpriceRF&moneysymbol&": "&address&", "&city&" "&beds&"br, "&baths&"ba,

"&structuresize&"SF Lot="&lotsize&". Commission rebate $"&rebate&"K when you buy this [url removed, login to view]"&listingID

new_status = twitterstring 'change to your new status

[url removed, login to view] "POST", "http://" & twitter_username & ":" & twitter_password &

"”AA”[url removed, login to view]" & new_status, False

[url removed, login to view] "Content-Type", "content=text/html; charset=iso-8859-1"

[url removed, login to view]

'[url removed, login to view]("<br/>"&[url removed, login to view])

Set xml = Nothing

[url removed, login to view]

end if



[url removed, login to view]

Kĩ năng: Bất kì công việc gì, Visual Basic

Xem nhiều hơn: twitter com search, tweet content, true results, the street com, sql get duplicates, sql get date, search twitter com, i need the number to twitter, html 5 charset, html 5 api, home smart, driver select, ba com, active k, aa com, twitter api c, k google, twitter search, twitter password, twitter m

Về Bên Thuê:
( 7 nhận xét )

ID dự án: #2114576