Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Script Problem
Pages: [1] Print
Author Topic: Script Problem  (Read 229 times)
Guest_Leke
Guest


Email
Script Problem
« on: October 17, 2005, 05:54:41 AM »

Code:
REBOL []

if not exists? %downloads/ [make-dir %downloads/]
change-dir %downloads/

prin "Enter Download Link " get-address: input
file: read/binary to-url get-address

prin "Enter a name & extension for your file: " name: rejoin ["%" input]

write/binary name file

Enter Download Link http://geocities.com/leke1975/goodies.zip
Enter a name & extension for your file: test.zip
** Script Error: write expected destination argument of type: file url object block
** Near: write/binary name file
halt
>> name
== "%test.zip"
>>


What's happening here?

 
Logged
Sunanda
Full Member
***
Offline Offline

Posts: 110


View Profile
Script Problem
« Reply #1 on: October 17, 2005, 05:58:49 AM »

rejoin ["%" input]

Does not create a word of datatype file!

It creates a string that begins with a percent sign.

Try:

to file! input
Logged
Guest_leke
Guest


Email
Script Problem
« Reply #2 on: October 17, 2005, 06:35:17 AM »

Ahh yes!
"test.zip" is a string.

Thanks Sunanda.
Logged
Pages: [1] Print 
Rebol Talk Forum  |  Getting Started  |  Newbie Help  |  Topic: Script Problem
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2008, 06:37:08 AM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2290 Posts in 593 Topics by 3742 Members
Latest Member: CorHorgeExpex

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc