Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

marbo

macrumors newbie
Original poster
Mar 30, 2009
8
0
Hello,

Can any one tell me how i print all information on this loop?

Its take sheculed program on eyetv.

Here is my code.

Code:
tell application "EyeTV"
	set proglist to every program whose start time is greater than (current date)
	set n to count of proglist
	if n is 0 then
		return "Ei ajastettuja ohjelmia."
	else
		repeat with po in proglist
			return "Ajastettu: " & name of po & " " & start time of po
		end repeat
	end if
end tell

I hope some one can help me. And im sorry if my english is bad.
 

dydx

macrumors newbie
Mar 30, 2009
2
0
Marbo,

You can store the result of each iteration of the repeat-loop in a set, call it ListOfResults. Then return ListOfResults at the end of the program.

Consider the following implementation:
Code:
(* The list of television programs whose start time is greater than the current date and time (default: {} - the empty set). *)
set the ListOfResults to {} 
tell application "EyeTV"
	set proglist to every program whose start time is greater than (current date)
	set n to count of proglist
	if n is 0 then
		return "Ei ajastettuja ohjelmia."
	else
		repeat with po in proglist
			set entry to "Ajastettu: " & name of po & " " & start time of po
			set the ListOfResults to the ListOfResults & entry as list
		end repeat
	end if
end tell
return the ListOfResults
 

marbo

macrumors newbie
Original poster
Mar 30, 2009
8
0
Thanks, but now it i cant print with that info on my web page. :/

Oh, sorry its working :) Thank you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.