Pakku Posted December 25, 2005 Share Posted December 25, 2005 (edited) hi, i have made a kind of rss reader, but the news file is not in xml but in a language i made myself. here is the news reader script: expandcollapse popup#include<GUIConstants.au3> GUICreate("News reader",800,470) $url = GUICtrlCreateCombo("",10,10,340,20) $update = GUICtrlCreateButton("Update",360,10,40,20) $list = GUICtrlCreateList("",10,40,400,400) $read = GUICtrlCreateButton("Read",10,440,400,20) GUICtrlCreateLabel("Title:",440,10) GUICtrlCreateLabel("Description:",440,50) GUICtrlCreateLabel("Text:",440,150) GUICtrlCreateLabel("Link:",440,420) $title = GUICtrlCreateLabel("",520,10,270,40) $description = GUICtrlCreateLabel("",520,50,270,100) $text = GUICtrlCreateLabel("",520,150,270,270) $link = GUICtrlCreateLabel("",520,420,270,40) GUISetState() Call("updateurl") While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then FileDelete("list.ini") Exit EndIf If $msg = $update Then Call("updatelist") EndIf If $msg = $read Then Call("read") EndIf WEnd Func updateurl() $updaterurlnumber = 1 $urlinput = "" While 1 $urlread = IniRead("urls.ini","Url",$updaterurlnumber,"") If $urlread = "" Then ExitLoop Else $urlinput = $urlinput & "|" & $urlread $updaterurlnumber = $updaterurlnumber + 1 EndIf WEnd GUICtrlSetData($url,$urlinput) EndFunc Func updatelist() FileDelete("list.ini") InetGet(GUICtrlRead($url),"list.ini",0,0) $updaterlistnumber = 1 $listinput = "" While 1 $listread = IniRead("list.ini","Rank",$updaterlistnumber,"") If $listread = "" Then ExitLoop Else $listinput = $listinput & "|" & $listread $updaterlistnumber = $updaterlistnumber + 1 EndIf WEnd GUICtrlSetData($list,$listinput) EndFunc Func read() $readselected = GUICtrlRead($list) $descriptionread = IniRead("list.ini",$readselected,"Description","") $textread = IniRead("list.ini",$readselected,"Text","") $linkread = IniRead("list.ini",$readselected,"Link","") GUICtrlSetData($title,$readselected) GUICtrlSetData($description,$descriptionread) GUICtrlSetData($text,$textread) GUICtrlSetData($link,$linkread) EndFunc the urls.ini file is easy to make it is like: [Url] 1=here is url 1 2=here is url 2 3=here is url 3 the news file which is host on a webserver or a ftpserver is also easy to create it goes like this: [Rank] 1=News 1 2=News 2 3=News 3 4=News 4 5=News 5 [News 1] Description=Description1 Text=Text1 Link=Link1 [News 2] Description=Description2 Text=Text2 Link=Link2 [News 3] Description=Description3 Text=Text3 Link=Link3 [News 4] Description=Description4 Text=Text4 Link=Link4 [News 5] Description=Description5 Text=Text5 Link=Link5 The news file can have any name you want but the urls file have to be "urls.ini"!!!!!!!! bug reports are welcome! Edited January 11, 2011 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
gseller Posted April 6, 2007 Share Posted April 6, 2007 (edited) This is very nice! I like the layout. Is the any way to make it automatically show the next news article when you click on it on the left instead of having to click the read button at bottom? That would be cool... Thanks Edited April 6, 2007 by gesller Link to comment Share on other sites More sharing options...
jvanegmond Posted April 6, 2007 Share Posted April 6, 2007 Arjan, parsing XML is so simple.. Probably even easier then using an ini.. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Pakku Posted April 6, 2007 Author Share Posted April 6, 2007 (edited) Arjan, parsing XML is so simple.. Probably even easier then using an ini.. i know but look at the date: Dec 25 2005i hadn't have a glue what xml was (yes, the past: at Dec 25 2005, i didn't know much about xml), so the next version will be a full rss reader Edited November 16, 2010 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
jvanegmond Posted April 6, 2007 Share Posted April 6, 2007 i now but look at the date: Dec 25 2005i hadn't have a glue what xml was, so the next version will be a full rss readerArjanDidn't notice the date at all, because gessler posted today. I know you can do a lot better now.. Are you actually going to work on that RSS, or are you just planning? github.com/jvanegmond Link to comment Share on other sites More sharing options...
gseller Posted April 6, 2007 Share Posted April 6, 2007 Didn't notice the date at all, because gessler posted today. I know you can do a lot better now.. Are you actually going to work on that RSS, or are you just planning?Yeah, sorry, I didn't notice the date either because I was looking thru new post and seen where Arjan posted. Sorry for any confusion. Link to comment Share on other sites More sharing options...
Pakku Posted April 7, 2007 Author Share Posted April 7, 2007 (edited) Didn't notice the date at all, because gessler posted today. I know you can do a lot better now.. Are you actually going to work on that RSS, or are you just planning?Well you know how i am with planning... i will think about it and maybe do some stuff with xml/rss. i'm now bussy with an youtube downloader/manager (kind of Limewire) so xml/rss has to wait.and i take this as a compliment: I know you can do a lot better nowbut feel free to make a rss reader, i might use it when i build my own one.Yeah, sorry, I didn't notice the date either because I was looking thru new post and seen where Arjan posted. Sorry for any confusion.No problem! Edited November 16, 2010 by Pakku How can someone use Windows without using AutoIt?That one would properly don't know how to handle a computer!My scripts:Send files over internetKind of RSS reader3Draw ProUDF: convert a character string to a binary one and backCalculate PiCommand line downloader (Youtube/Google video)Set the transparency of a window just by hitting a key!Secure your pcOther things:My filemanMy profilePM me Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now