hello hello Kevin ...

  k>>  shoes "C:\Documents and Settings\*user*\Desktop\welcome.rb"

Now?  May I make a couple of assumptions?

  1. You want to run "welcome.rb" when the user logs-in or
  2. You want to run "welcome.rb" when she starts the command-line (DOS box)?

Either way, Windows looks in the PATH environment string for one of
the file types listed in the PATHEXT environment variable.

Or you can just use the full path to the shoes exe  <--- EXE file or
use a BAT file.

   c:\>   c:\bin\shoes\shoes "C:\Documents and
Settings\*user*\Desktop\welcome.rb"

The syntax is:

  c:\>   shoes  "c:\Documents and Settings\%USERNAME%\Desktop\welcome.rb"

In both cases, I tested this with the command line and with a
Short-cut, then I'd be using:

  c:\>   shoes  "c:\Documents and Settings\welcome.rb"  "%USERNAME%"

Either in the short-cut command line, or on the BAT file command line.

And inside Welcome.rb look at this:

    # get user ...

      $USER = ARGV[1]

    load  "#{$USER}.rb"

    Shoes.app( :title => 'parent', :width => 300, :height => 200 ) do

       alert("Hello  #{$USER} .. welcome to Shoes" )

    end #Shoes app

I kind of figure that's going to give you the first 70% of your app.

You can stick a shortcut to your little shoe app in the start/startup folder ::

    -- "c:\Documents and Settings\all users\Start
Menu\Programs\Startup\welcome.lnk

To use yoru Path and PathExt to Shoes; or

    -- "c:\Documents and Settings\all users\Start
Menu\Programs\Startup\welcome.bat

Too just run as a batch file.  Personally I'd use a .LNK file because
then I can tell it to be invisible, minimized, etc

You get the user name from the environment variable USERNAME.

Btw, thanks for the idea -- a Shoes "hello Will" program would be a
pretty cool thing to do.

aloha / enjoy,
                     \_w_/
 ___________________________________
    º http://mbimarketing.wordpress.com
    º http://adroit-process.blogspot.com


2009/8/6 kevin van oosterhout <[email protected]>:
> I think i misunderstood the way you Run from Command line.
>
> What i do is this:
>
> shoes "C:\Documents and Settings\*user*\Desktop\welcome.rb"
>
> That does the job for me ;-)

Reply via email to