Accessing ARGV[n] under SciTE fails; no problem under Command Window

Discussion in 'Ruby' started by Richard, Jan 24, 2007.

  1. Richard

    Richard Guest

    Hi,

    I've got the statements:

    sAppDir = ARGV[0]
    puts "Application Directory = '#{sAppDir}'"
    sFileName= ARGV[1]
    puts "YAML filename = '#{sFileName}'"

    Under SciTE with parameters 1/2 set to xxx/yyy respectively, execution
    yields:

    Application Directory = ''
    YAML filename = ''

    Under Command window, I get:

    K:\>GenDB_CreationSQL_FromYML.rb XXX YYY
    Application Directory = 'XXX'
    YAML filename = 'YYY'

    I'm running under WinXP/SP2 with SciTE ver. 1.72 (which I just upgraded
    from ver. 1.59, hoping to solve this problem)

    Any ideas?

    Thanks in Advance,
    Richard

    P.S. I didn't post on the Scintilla-interest list. I was getting
    killed with Spam when I was subscribed to that list, which ended when I
    unsubscribed.
     
    Richard, Jan 24, 2007
    #1
    1. Advertising

  2. Richard

    mitchell Guest

    Re: Accessing ARGV[n] under SciTE fails; no problem under CommandWindow

    Hi,

    >
    > Under SciTE with parameters 1/2 set to xxx/yyy respectively, execution
    > yields:
    >
    > Application Directory = ''
    > YAML filename = ''
    >
    > Under Command window, I get:
    >
    > K:\>GenDB_CreationSQL_FromYML.rb XXX YYY
    > Application Directory = 'XXX'
    > YAML filename = 'YYY'
    >
    > I'm running under WinXP/SP2 with SciTE ver. 1.72 (which I just upgraded
    > from ver. 1.59, hoping to solve this problem)
    >
    > Any ideas?


    In your ruby.properties, make sure you have something like:
    command.go.$(file.patterns.rb)=ruby $(FileNameExt) $(1) $(2) $(3) $(4)

    The $(1), $(2), etc. is the parameters you input into the params dialog.

    -Mitchell;

    >
    > Thanks in Advance,
    > Richard
    >
    > P.S. I didn't post on the Scintilla-interest list. I was getting
    > killed with Spam when I was subscribed to that list, which ended when I
    > unsubscribed.
    >
    >
    >
     
    mitchell, Jan 24, 2007
    #2
    1. Advertising

  3. Richard

    Richard Guest

    Hi Mitchel,

    Thank you very much. I'm sure I did that in my 1.59 version, which
    I'll double check (I only changed the path to get to the 1.72 ver.).
    If by some quirk I'm unable to do that successfully, I'll post again
    to announce my stupidity :)

    Best wishes,
    Richard

    On Jan 24, 8:05 am, mitchell <> wrote:
    > Hi,
    >
    >
    >
    >
    >
    > > Under SciTE with parameters 1/2 set to xxx/yyy respectively, execution
    > > yields:

    >
    > > Application Directory = ''
    > > YAML filename = ''

    >
    > > Under Command window, I get:

    >
    > > K:\>GenDB_CreationSQL_FromYML.rb XXX YYY
    > > Application Directory = 'XXX'
    > > YAML filename = 'YYY'

    >
    > > I'm running under WinXP/SP2 with SciTE ver. 1.72 (which I just upgraded
    > > from ver. 1.59, hoping to solve this problem)

    >
    > > Any ideas?In your ruby.properties, make sure you have something like:

    > command.go.$(file.patterns.rb)=ruby $(FileNameExt) $(1) $(2) $(3) $(4)
    >
    > The $(1), $(2), etc. is the parameters you input into the params dialog.
    >
    > -Mitchell;
    >
    >
    >
    > > Thanks in Advance,
    > > Richard

    >
    > > P.S. I didn't post on the Scintilla-interest list. I was getting
    > > killed with Spam when I was subscribed to that list, which ended when I
    > > unsubscribed.
     
    Richard, Jan 24, 2007
    #3
  4. Richard

    Richard Guest

    Hi Mitchell,

    For the benefit of other users who may view this thread, here's what I
    came up to customize SciTE for my purposes:

    if PLAT_WIN
    command.go.*.rb=ruby $(FileNameExt) $(1) $(2) $(3) $(4)
    command.go.subsystem.*.rb=1
    command.go.*.rbw=rubyw $(FileNameExt) $(1) $(2) $(3) $(4)
    clear.before.execute
    line.margin.visible
    line.margin.width=3+

    Again, thanks for getting me restarted.

    Regards,
    Richard

    On Jan 24, 8:05 am, mitchell <> wrote:
    > Hi,
    >
    >
    >
    >
    >
    > > Under SciTE with parameters 1/2 set to xxx/yyy respectively, execution
    > > yields:

    >
    > > Application Directory = ''
    > > YAML filename = ''

    >
    > > Under Command window, I get:

    >
    > > K:\>GenDB_CreationSQL_FromYML.rb XXX YYY
    > > Application Directory = 'XXX'
    > > YAML filename = 'YYY'

    >
    > > I'm running under WinXP/SP2 with SciTE ver. 1.72 (which I just upgraded
    > > from ver. 1.59, hoping to solve this problem)

    >
    > > Any ideas?In your ruby.properties, make sure you have something like:

    > command.go.$(file.patterns.rb)=ruby $(FileNameExt) $(1) $(2) $(3) $(4)
    >
    > The $(1), $(2), etc. is the parameters you input into the params dialog.
    >
    > -Mitchell;
    >
    >
    >
    > > Thanks in Advance,
    > > Richard

    >
    > > P.S. I didn't post on the Scintilla-interest list. I was getting
    > > killed with Spam when I was subscribed to that list, which ended when I
    > > unsubscribed.
     
    Richard, Jan 25, 2007
    #4
  5. Richard

    Richard Guest

    Hi Mitchell,

    For the benefit of other users who may view this thread, here's what I
    came up to customize SciTE for my purposes:

    if PLAT_WIN
    command.go.*.rb=ruby $(FileNameExt) $(1) $(2) $(3) $(4)
    command.go.subsystem.*.rb=1
    command.go.*.rbw=rubyw $(FileNameExt) $(1) $(2) $(3) $(4)
    command.go.subsystem.*.rbw=1
    command.help.*.rb=$(CurrentWord)!c:\apps\ruby\ProgrammingRuby.chm
    command.help.subsystem.*.rb=4
    clear.before.execute=1
    line.margin.visible
    line.margin.width=3+

    Again, thanks for getting me restarted.

    Regards,
    Richard

    On Jan 24, 8:05 am, mitchell <> wrote:
    > Hi,
    >
    >
    >
    >
    >
    > > Under SciTE with parameters 1/2 set to xxx/yyy respectively, execution
    > > yields:

    >
    > > Application Directory = ''
    > > YAML filename = ''

    >
    > > Under Command window, I get:

    >
    > > K:\>GenDB_CreationSQL_FromYML.rb XXX YYY
    > > Application Directory = 'XXX'
    > > YAML filename = 'YYY'

    >
    > > I'm running under WinXP/SP2 with SciTE ver. 1.72 (which I just upgraded
    > > from ver. 1.59, hoping to solve this problem)

    >
    > > Any ideas?In your ruby.properties, make sure you have something like:

    > command.go.$(file.patterns.rb)=ruby $(FileNameExt) $(1) $(2) $(3) $(4)
    >
    > The $(1), $(2), etc. is the parameters you input into the params dialog.
    >
    > -Mitchell;
    >
    >
    >
    > > Thanks in Advance,
    > > Richard

    >
    > > P.S. I didn't post on the Scintilla-interest list. I was getting
    > > killed with Spam when I was subscribed to that list, which ended when I
    > > unsubscribed.
     
    Richard, Jan 25, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bret

    char **argv vs. char* argv[]

    Bret, Aug 31, 2003, in forum: C Programming
    Replies:
    21
    Views:
    4,634
    Richard Heathfield
    Sep 3, 2003
  2. David
    Replies:
    10
    Views:
    6,013
    Richard Heathfield
    Sep 15, 2003
  3. Hal Styli
    Replies:
    14
    Views:
    1,686
    Old Wolf
    Jan 20, 2004
  4. =?ISO-8859-1?Q?Thomas_N=FCcker?=

    sys.argv[0] - 'module' object has no attribute 'argv'

    =?ISO-8859-1?Q?Thomas_N=FCcker?=, Jun 30, 2003, in forum: Python
    Replies:
    0
    Views:
    944
    =?ISO-8859-1?Q?Thomas_N=FCcker?=
    Jun 30, 2003
  5. jab3

    char **argv & char *argv[]

    jab3, Dec 4, 2004, in forum: C Programming
    Replies:
    5
    Views:
    682
    Chris Torek
    Dec 8, 2004
Loading...

Share This Page