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

problem with system/script/args/1

 [1/7] from: zimmerman:chartermi at: 1-Sep-2001 23:23


Hi, I'm using a script trying to send info to an eggdrop, but whenever I run it it I receive this error message ** Script Error: Cannot use path on none! value ** Where: do-boot ** Near: ftpst: join ".say " system/script/args/1 append I run the script from the W2k command line as such, c:\egg.r test The only thing that makes sense to me is that the script thinks there is no value in system/script/args/1, But I have supplied an argument. I am confused by this. If someone could help me out I would appreciate it. Chris(TheTurtle) Here is my script in full: (some things have been replaced for security reasons :-)) REBOL [Title: "Eggdrop thingee"] ftpst: join ".say " system/script/args/1 append ftpst " arbitrary string " egg: open/direct/lines tcp://192.168.0.1:12444 print first egg insert egg "username " print first egg insert egg "password of bot" print egg first insert egg ftpst close egg quit

 [2/7] from: vache::bluejellybean::com at: 1-Sep-2001 23:59


Make args a block. Then try it. (to-block system/script/args/1) --- "Richard Zimmerman" <[zimmerman--chartermi--net]>

 [3/7] from: zimmerman:chartermi at: 2-Sep-2001 5:36


Hrmm..well same error, just in the to-block line, instead of the join line. :/

 [4/7] from: arolls:bigpond:au at: 3-Sep-2001 0:05


The problem is that when you launch the rebol program by its filename only (egg.r test) the argument "test" does not get passed in. If you issue on the command line this instead: C:> path\to\rebol.exe egg.r test then you will see system/script/args filled in properly. I think it's something to do with the file association. Win2k sees the egg.r file, sees that it is a rebol script by looking at the extension, then launches rebol to run it. But it doesn't also pass any further arguments to it. I can't see a way in the windows file types settings to specify command line arguments. So I think you must specify the rebol.exe.

 [5/7] from: ric:getorbital at: 2-Sep-2001 10:05


You can fix the Windows file association to pass arguments on to the script.
>From a file-explorer window, follow the following path:
Tools --> Folder Options --> File Types --> Rebol --> Advanced --> Edit (You'll have to scroll down to find Rebol, and you have to select the default (bold-faced) association if there is more than one.) There you'll find a string like, "c:\rebol\command\rebol.exe" -qs "%1" Change it to, "c:\rebol\view\rebol.exe" -qs "%1" %* That %* at the end passes all the remaining arguments to the script. -- Ric

 [6/7] from: arolls::bigpond::net::au at: 4-Sep-2001 1:28

Re: problem with system/script/args/1 - .r file association in windows


Interesting info. I was confused for a while because in my system (win2k), the "Advanced" button was actually Restore (Damned morphing buttons.) I think I left .r files unassociated because I didn't want to run them by clicking on them. Anyway, now I've got the "Edit" as the default action and "Run" as a right mouse button menu option. Much better.

 [7/7] from: zimmerman:chartermi at: 3-Sep-2001 14:18

Re: problem with system/script/args/1


Thanks for the help Ric and Anton, works great now chris