Tamamlanmış

.VBS Replace text + add Hyperlink(repost)

I already have a good working VBS Script, but i want to make some small changes. I need to replace some text and i want to add a hyperlink on every row.

## Deliverables

This is the VBS script. This script creates a HTML which is shown below this script.

I need to make only 2 small changes, I want to rename the symbols ( you can find them in the HTML output file in bold+orange) so AEX becomes AEX25 for example.

and i want to add a hyperlink on the end of every row. so in the end of AEX , after the % row, i want to create a hyperlink. You can fill in any example there, i will changes it to the correct location.

LoadLocation = "C:\Documents and Settings\All Users\Documenten\Amibroker\[url removed, login to view]"

SaveLocation = "C:\Documents and Settings\Gerard\Bureaublad\"

'DEFINE REPORT NUMBERS: Example: GetReports = "1,2,10"

GetReports = "0"

UseFont = "Tahoma,Arial,Helvetica,Sans Serif"

UseFontSize = "10px"

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

Set oAA = [url removed, login to view]

'test '("c:\\Program Files\\Amibroker\\MyNewData4")

[url removed, login to view]("C:\\Program Files\\Amibroker2\\Metastock")

arrReports = SPLIT(GetReports,",")

for intReport = LBOUND(arrReports) to UBOUND(arrReports)

[url removed, login to view]()

[url removed, login to view](0, "watchlist" ) = arrReports(intReport)

[url removed, login to view] (LoadLocation)

[url removed, login to view] = "1"

[url removed, login to view]()

[url removed, login to view] (SaveLocation & "Futurescomplete" & intReport & ".html")

next

Set oAA = Nothing

Set oAB = Nothing

'LETS CLEAN THE FILES

for intReport = LBOUND(arrReports) to UBOUND(arrReports)

Call CleanReports(SaveLocation & "Futurescomplete" & intReport & ".html")

next

function CleanReports(reportname)

NewContent = ""

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

if [url removed, login to view](reportname) then

Set objTextFile = [url removed, login to view](reportname, 1, True)

StrContent = [url removed, login to view]

arrText = SPLIT(StrContent, vbcrlf)

For az = LBOUND(arrText) to UBOUND(arrText)

if Left(arrText(az),2)="TD" then

NewContent = NewContent & "TD { text-align: right; font-family: " & UseFont & ";font-size: " & UseFontSize & "; }" & vbcrlf

NewContent = NewContent & "TH { text-align: right; font-family: " & UseFont & ";font-size: " & UseFontSize & "; }" & vbcrlf

elseif Left(arrText(az),4)="BODY" then

NewContent = NewContent & "BODY { text-align: right; font-family: " & UseFont & ";font-size: " & UseFontSize & "; }" & vbcrlf

elseif Left(Ucase(arrText(az)),17)="<TR><TD>~~~EQUITY" then

else

NewContent = NewContent & Replace(arrText(az),"^","")& vbcrlf

end if

Next

[url removed, login to view]

Set objTextFile = Nothing

Set objFile = [url removed, login to view](reportname, true)

[url removed, login to view] NewContent

[url removed, login to view]

Set objFile = Nothing

end if

Set objFSO = Nothing

end function

This is the output HTML file:

<HTML>

<STYLE>

<!--

BODY { text-align: right; font-family: Tahoma,Arial,Helvetica,Sans Serif;font-size: 10px; }

TD { text-align: right; font-family: Tahoma,Arial,Helvetica,Sans Serif;font-size: 10px; }

TH { text-align: right; font-family: Tahoma,Arial,Helvetica,Sans Serif;font-size: 10px; }

-->

</STYLE>

<!-- ABEXC: Type=3, ReportPath= --><BODY>

<TABLE border=0>

<TR><TH id=0>Ticker</TH><TH id=2>Date/Time</TH><TH id=1>Close</TH><TH id=0> Position </TH><TH id=0>Last Signal</TH><TH id=1>Entry Price</TH><TH id=1>Stop/Reverse</TH><TH id=1>Profit Target</TH><TH id=1>P/L 2008 (%)</TH></TR>

<TR><TD>**AEX**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>260.14</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Neutral</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Target Hit!</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>247.34</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>236.31</FONT></TD></TR>

<TR><TD>**BFX**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>2,064.60</FONT></TD><TD bgcolor='#ff0000'><FONT color='#000000'>Short</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>14/05/09</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>2,020.80</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>2,126.06</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>1,859.14</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>177.53</FONT></TD></TR>

<TR><TD>**FCHI**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>3,228.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Neutral</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Target Hit!</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>3,100.31</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>392.28</FONT></TD></TR>

<TR><TD>**GDAXI**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>4,918.80</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Neutral</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Target Hit!</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>4,676.19</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>363.69</FONT></TD></TR>

<TR><TD>**GSPC**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>887.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Neutral</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Target Hit!</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>863.85</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>412.20</FONT></TD></TR>

<TR><TD>**N225**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>9,225.80</FONT></TD><TD bgcolor='#00ff00'><FONT color='#000000'>Long</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>06/04/09</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>8,856.80</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>8,845.05</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>9,565.34</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>396.05</FONT></TD></TR>

<TR><TD>**NDX**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>1,363.20</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Neutral</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Target Hit!</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>1,332.56</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>347.78</FONT></TD></TR>

<TR><TD>**RUT**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>477.62</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Neutral</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Target Hit!</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>462.89</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>461.05</FONT></TD></TR>

<TR><TD>**STOXX50E**</TD><TD>5/22/2009</TD><TD bgcolor='#ffffff'><FONT color='#000000'>2,433.50</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Neutral</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>Target Hit!</FONT></TD><TD bgcolor='#ffffff'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffff00'><FONT color='#000000'>2,280.24</FONT></TD><TD bgcolor='#7d9ec0'><FONT color='#000000'>0.00</FONT></TD><TD bgcolor='#ffffff'><FONT color='#009300'>308.10</FONT></TD></TR>

</TABLE>

</BODY>

</HTML>

Beceriler: Mühendislik, MySQL, PHP, Proje Yönetimi, Yazılım Mimarisi, Yazılım Test Etme

Daha fazlasını gör: vbs hyperlink, time in az, p&l analysis, html 5 hyperlink, html 5 font color, html 5 align, find script font, ff0000, family id, vbs rename file, define project management, th write, replace, metastock, hyperlink, gerard, Equity analysis, az, amibroker afl, afl

İşveren Hakkında:
( 14 değerlendirme ) Breukelen, Netherlands

Proje NO: #3903107

Seçilen:

demalex

See private message.

%selectedBids___i_period_sub_7% gün içinde 21.25%project_currencyDetails_sign_sub_9% %project_currencyDetails_code_sub_10%
(78 Değerlendirme)
5.4