Log in

View Full Version : help - string not working ;(


Fuzzgtp
September 29th, 2009, 10:51 AM
Nevermind - figured it out, doesnt like my commas
output = ""
import string
for i in range(0, 20):
download = results[i]
downloaddata = []
downloaddata = download.split('\n')

upload= uploadresults[i]
uploaddata =[]
uploaddata = upload.split('\n')

output = downloaddata[1] + " @ " + downloaddata[2] + " - Download: " + downloaddata[0] + " - Upload: " + uploaddata[0] + "\n" + output

xbmc.executebuiltin('Control.SetLabel(104,' + str(output) + ')')
print output

ok the print shows up like this, so i know the variables is loaded, but it never shows up in the label:
10:38:51 T:4344 M:1694158848 NOTICE: Saint Louis, MO @ 5:55 AM - Download: 8.37 Mb/s - Upload: 0.99 Mb/s
Saint Louis, MO @ 5:57 AM - Download: 8.29 Mb/s - Upload: 0.81 Mb/s
Saint Louis, MO @ 6:01 AM - Download: 7.59 Mb/s - Upload: 1.00 Mb/s
Saint Louis, MO @ 6:02 AM - Download: 6.92 Mb/s - Upload: 1.05 Mb/s
Saint Louis, MO @ 6:08 AM - Download: 8.38 Mb/s - Upload: 0.89 Mb/s
Saint Louis, MO @ 6:16 AM - Download: 8.18 Mb/s - Upload: 1.03 Mb/s
Saint Louis, MO @ 6:23 AM - Download: 8.24 Mb/s - Upload: 1.05 Mb/s
Saint Louis, MO @ 6:31 AM - Download: 7.49 Mb/s - Upload: 1.02 Mb/s
Saint Louis, MO @ 6:33 AM - Download: 7.37 Mb/s - Upload: 0.72 Mb/s
Saint Louis, MO @ 6:46 AM - Download: 8.65 Mb/s - Upload: 1.05 Mb/s
Saint Louis, MO @ 6:47 AM - Download: 7.93 Mb/s - Upload: 0.99 Mb/s
Saint Louis, MO @ 6:51 AM - Download: 8.60 Mb/s - Upload: 1.05 Mb/s
Saint Louis, MO @ 7:05 AM - Download: 8.79 Mb/s - Upload: 1.04 Mb/s
Saint Louis, MO @ 5:49 AM - Download: 6.56 Mb/s - Upload: 1.15 Mb/s
Seattle, WA @ 5:55 AM - Download: 10.59 Mb/s - Upload: 1.57 Mb/s
Springfield, MO @ 5:56 AM - Download: 10.71 Mb/s - Upload: 1.68 Mb/s
Saint Louis, MO @ 8:20 AM - Download: 8.33 Mb/s - Upload: 1.46 Mb/s
Saint Louis, MO @ 1:31 PM - Download: 9.76 Mb/s - Upload: 1.76 Mb/s
Saint Louis, MO @ 2:35 PM - Download: 7.75 Mb/s - Upload: 1.85 Mb/s
Saint Louis, MO @ 2:10 PM - Download: 9.53 Mb/s - Upload: 1.61 Mb/s

if i do this output = ""
import string
for i in range(0, 20):
download = results[i]
downloaddata = []
downloaddata = download.split('\n')

upload= uploadresults[i]
uploaddata =[]
uploaddata = upload.split('\n')

output = downloaddata[1] + " @ " + downloaddata[2] + " - Download: " + downloaddata[0] + " - Upload: " + uploaddata[0] + "\n" + output

output = "test1 \n test3? \n this test3 \n oh ok \n how low can we go ? \n a \n \n \n \n \n \n \n \n \n \n \n \n \n \n TEST"
xbmc.executebuiltin('Control.SetLabel(104,' + str(output) + ')')
print output
the test message shows up in my label. What is wrong with my string that would keep it from showing? :(

StevenR
September 29th, 2009, 03:04 PM
I think that:
xbmc.executebuiltin('Control.SetLabel(104,' + str(output) + ')')
is old XBMC code.
I think the equivalent to that with Boxee code would be to use this (assuming the window id is 14000):
mc.GetWindow(14000).GetLabel(104).SetLabel( str( output ) )

I think that would be less fussy about commas.

Fuzzgtp
September 29th, 2009, 03:07 PM
I think that:
xbmc.executebuiltin('Control.SetLabel(104,' + str(output) + ')')
is old XBMC code.
I think the equivalent to that with Boxee code would be to use this (assuming the window id is 14000):
mc.GetWindow(14000).GetLabel(104).SetLabel( str( output ) )

I think that would be less fussy about commas.

well I removed the commas because I didnt need them, but I'll keep it in mind next time.