argh this is late but we have to try that now :)

On May 15, 2010, at 11:48 PM, Igor Stasenko wrote:

> [
> 
>       [[
>               | rx str url form |
>               str := (HTTPSocket httpGet:
> 'http://www.socwall.com/browse/index.php?wpSortby=8') contents.
>               rx := '.*(http\://.+tb_.+\.jpg).*' asRegex.
>               url := (rx matches: str)
>                       ifTrue: [
>                               str := (rx subexpression: 2)
>                               copyWithRegex: 'tb_' matchesReplacedWith: '' ]
>                       ifFalse: [ nil ].
>               form := nil.
>               url ifNotNil: [
>                       form := ImageReadWriter formFromStream: (HTTPSocket 
> httpGet: url).
>                       World backgroundImage: form layout: #scaled
>               ].
> 
>       1 minute asDelay wait.
>       ] on: Error do: [:ex| ] ] repeat.
> 
> ] newProcess name: 'Random background changer'; priority: Processor
> userBackgroundPriority; resume


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to