2008/8/23 Ted Gould <ted@...11...>

john cliff wrote:

The script expects the username as arg 1, password as 2 and the filename as 3.

all its getting is the temp filename.  Anyone got any ideas why?


Yes, we're calling in a way that explicitly sets the parameters to the function.  So I would imagine if you look at argv[0] you'd see your username and password in there separated by a space, just as in the INX file.

Nope, sys.argv[0] gives the script path, and just it. all the bits other than the script name itself are getting dropped.

sys.arg[1] gives the filename.

 
There are some other ways to handle this.  I don't remember if this was for 0.46, but parameters can be hidden from the GUI so that they can be in the INX file and no show up to the user when running the script.  That'd be a better way to pass them.

You call also do a wrapper script.


Also any suggestions for asking for a user/pass combo in a secure way?


Username/password and secure change things a lot.  I would say probably the best way would to be implementing your own preferences dialog.  I've wanted to implement for a long time (I swear I'm doing it shortly) a way that a second script can be set in the INX file such that it would be used to get the preferences if the script didn't want to use AutoGUI.  That's the only secure way I can think of.

           --Ted