The forum

Passing command line arguments to Apps? (AGAIN...)

Author Replies
hasi Sunday 20 January 2008 at 2:28
hasiAnonymous


Hey all,
I am opening this thread, which is a continuation of an earlier thread with exactly the same name:
http://www.playonlinux.com/topic-989-Passing_command_line_arguments_to_Apps.html

The reason is that I had set the first one as "solved", but found out some more problems, later. Since I do not know how to set the status back to unsolved, I opened this new thread. As explained in the other thread, I think there are issues with how PlayOnLinux passes command line arguments to wine. Has anyone looked into that? Any ideas?

Any suggestions would be greatly appreciated.
Best,
--hasi.
Quentin PÂRIS Sunday 20 January 2008 at 9:23
Quentin PÂRIS
Admin

I think you could resolve your problem if you use :

$HOME/.PlayOnLinux/configurations/installed/scriptname
hasi Sunday 20 January 2008 at 16:51
hasiAnonymous

Wow, that solved it!
Thanks very much. I simply had to replace $@ in the PowerPoint script by "$@"
I wouldn't have imagined it to be actually *that* simple!
I am so happy!
--hasi
hasi Sunday 20 January 2008 at 18:07
hasiAnonymous

Tinou,
the problem seems to be a little deeper:
if you do a simpleecho --$1-- in the script calling the applications installed via PlayOnLinux, you will find that $1 has a leading space that seems to be generated by playonlinux. Windows applications seem to be more or less tolerant to such a leading space. Word, for instance, does not seem to tolerate it, while Acrobat does not have a problem.

Let me be a little more precise: If you call
playonlinux --run "Word 2003" "C:\asdf.doc",
The first argument seen by the script "Word 2003" in the directory you mentioned, will actually be " C:\asdf.doc".
Of course, I can take care of that by chopping it off with a tailored version of the "Word 2003" script (which I am doing, and it works). However, ideally that extra space would not be generated in the first place. Is that done in playonlinux? How would one address such a problem? Ideas, opinions anyone? Should we open a new thread?
Thanks to all.
--hasi.
hasi Sunday 20 January 2008 at 18:09
hasiAnonymous

Tinou,
the problem seems to be a little deeper:
if you do a simpleecho --$1-- in the script calling the applications installed via PlayOnLinux, you will find that $1 has a leading space that seems to be generated by playonlinux. Windows applications seem to be more or less tolerant to such a leading space. Word, for instance, does not seem to tolerate it, while Acrobat does not have a problem.

Let me be a little more precise: If you call
playonlinux --run "Word 2003" "C:\asdf.doc",
The first argument seen by the script "Word 2003" in the directory you mentioned, will actually be " C:\asdf.doc".
Of course, I can take care of that by chopping it off with a tailored version of the "Word 2003" script (which I am doing, and it works). However, ideally that extra space would not be generated in the first place. Is that done in playonlinux? How would one address such a problem? Ideas, opinions anyone? Should we open a new thread?
Thanks to all.
--hasi.