Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Newbie: some questions about VID

From: philb:upnaway at: 27-Sep-2003 22:28

Hi Arie, Q1 You need to move "show emails" down 1 line outside the if count = 0 block. Q2 Use the pwd/data with the hide attribute. A couple of suggestions : 1. You could use compose to compose the user:[password--server-name] something like .... mb: compose [scheme: 'pop host: (pop-server) user: (user) pass: (password)] 2. You can use import-email to parse the email for you. help import-email USAGE: IMPORT-EMAIL data DESCRIPTION: Constructs an email object from an email message. IMPORT-EMAIL is a function value. ARGUMENTS: data -- The email message (Type: string) The email object returned has all the fields you want To/From/Subject Cheers Phil === Original Message === Hello, in the following trial program I have a few difficulties using VID. Question 1: how can I fill out the text-list. The results never show up Question 2: I tried the "hide"attribute on the pwd field; if I print the pwd field, I don't see the actual value, but only the *******. How to get (and print) the real value ? Kind regards, Arie van Wingerden ================ The program: ================== REBOL [ ] lay: layout [ style lab label 100 right across vh2 "Provide your e-mail account information" return lab "Userid" uid: field return lab "Password" pwd: field return lab "POP3 server" pop: field return lab button "Fetch e-mails" [fill] return lab "E-mails" emails: text-list 600x200 return ] fill: does [ clear emails/data count: 0 mails: read/lines to-url rejoin [ "pop://" uid/text ":" pwd/text "@" pop/text ] foreach mail mails [ count: count + 1 insert emails/data rejoin [ "===== mail #" count " =====" ] parse mail [ thru "From:" copy from to "^/" ] insert emails/data rejoin [ "From :" from ] parse mail [ thru "Date:" copy date to "^/" ] insert emails/data rejoin [ "Date :" date ] parse mail [ thru "Subject:" copy subject to "^/" ] insert emails/data rejoin [ "Subject:" subject ] ] if count = 0 [ insert emails/data " --- no e-mails found ---" show emails ] ] focus uid view lay