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

[REBOL] Problems passing script args

From: dan::rolander::com at: 10-Dec-2000 13:28

Hello, I'd like to be able to create Rebol exe's with Runtime and pass command line arguments to them, but I'm getting some really weird results and I can't figure out what's happening. I'm hoping somebody on the list can help. I'm running a very simple test script named args.r: REBOL [] probe system/script/args print system/script/args/1 halt (args.r results)
>From the Rebol console I get the results as a string: >> do/args %args.r "1 2 3"
Script: "Untitled" (none) 1 2 3 1
>> >From the DOS command line, or Windows Run window I get the results as a
block (with an extra space in front): C:\Program Files\Rebol>rebol args.r "1 2 3" Script: "Untitled" (none) [" 1 2 3"] 1 2 3
>>
Then, when I bind the script with Rebol/Runtime I start getting some really weird results... (args.exe results)
>From the DOS command line the script exits with an error:
C:\Program Files\Rebol>args.exe "1 2 3" Unable to find encapsulated data
>From the Windows Run window none is returned:
C:\Program Files\Rebol\args.exe "1 2 3" none ** Script Error: Cannot use path on none! value. ** Where: print system/script/args/1
>From the Windows Run window, if I add an extra arg (with any bogus value) in
the first postion, I'll get the real args returned as a string: C:\Program Files\Rebol\args.exe 0 "1 2 3" 1 2 3 1 ** Press enter to quit...
>From the DOS command line an extra arg1 doesn't help and the script exits
with an error: Unable to find encapsulated data If anyone understands this please share with me. Thanks, Dan