On Sun, 31 Mar 2013 21:15:20 -0300
Haroldo Stenger <[email protected]> wrote:

> hi, from time to time I find myself wondering whether there is a way for
> this filename in this stock-leo script not to be hardcoded, so that the way
> to use this script with my file does not require to modify that script.
> Many times it hits me quite paradoxically for a rather silly reason, namely
> that the filename in the leo script (take scripts.leo / import-org-mode ,
> which has this:
> 
> files = (
> 
> r'c:\Users\edreamleo\test\import-org-mode.txt',
> 
> r'c:\Users\edreamleo\test\import-org-mode.txt',
> )
> 
> ) ,
> 
> I mean paradoxically because the filenames are in windows-specific format,
> and although I can modify it myself, it makes me keep wonderindg if there
> is something extra that is windows specific; or in the end, what are the
> places that require me to change strings for the script to work for my case.
> 
> The question would be, how do people manage to pass parameters to leo
> scripts ?

I can't answer that with respect to scripts in scripts.leo, but in
general, although it doesn't seem to be something that I need to do
much, when needed, I use

g.app.gui.runAskDateTimeDialog
g.app.gui.runAskOkCancelNumberDialog
g.app.gui.runAskOkCancelStringDialog
g.app.gui.runAskOkDialog
g.app.gui.runAskYesNoCancelDialog
g.app.gui.runAskYesNoDialog
g.app.gui.runOpenDirectoryDialog
g.app.gui.runOpenFileDialog
g.app.gui.runSaveFileDialog

all of which prompt the user for some sort of input.

Cheers -Terry

> Is or has this been an attention-catching topic in the past ? What
> alternatives are there around ?
> 
> best and thanks
> 
> Haroldo
> 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to