If you use an argument to WBRun that contains a colon ":" it results in a requester asking for a volume.
Enter a command like this in a shell to reproduce:
WBRun PROG Work:Odyssey/Odyssey ARGS http://amigans.net
The result will be a requester asking for volume "http:". Adding quotes to the argument has no effect.
WBRun should just be passing arguments to the program and not trying to lock or open them itself.
Some WBRun arguments fail (Solved)
Some WBRun arguments fail (Solved)
Last edited by xenic on Tue Feb 23, 2016 4:10 pm, edited 1 time in total.
AmigaOne X1000 with 2GB memory - OS4.1 FE
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: WBRun bug causing some arguments to fail
If you invoke WBrun on a file ot directory it's te same as if you had double clicked on it on the workbench.
You cannot pass arguments to a workbench program, but you can multislect icons then double click on a prgram, and I think this is what ARGS provides the equivalent of.
If does not because it cannot pass the CLI argument string to the prgram, it doesn't make sense, there is not such thing on the workbench.
You cannot pass arguments to a workbench program, but you can multislect icons then double click on a prgram, and I think this is what ARGS provides the equivalent of.
If does not because it cannot pass the CLI argument string to the prgram, it doesn't make sense, there is not such thing on the workbench.
- broadblues
- AmigaOS Core Developer
- Posts: 600
- Joined: Sat Jun 18, 2011 2:40 am
- Location: Portsmouth, UK
- Contact:
Re: WBRun bug causing some arguments to fail
PS WBrun is a thin wrapper to IWorkbench->OpenWorkbenchObject() so to understand more why WBRun locks the parent directory of any argument term passed take look at the autodoc for IWorkbench->OpenWorkbenchObject()
eg this example:
eg this example:
Code: Select all
// Launch the application "Paint" with the project files "Image1"
// and "Anim1", which are both found in the drawers "Paint:Pictures"
// and "Paint:Animations", respectively.
BPTR lock1 = Lock("Paint:Pictures",SHARED_LOCK);
BPTR lock2 = Lock("Paint:Animations",SHARED_LOCK);
if(lock1 && lock2)
{
if(!OpenWorkbenchObject("Paint",
WBOPENA_ArgLock, lock1,
WBOPENA_ArgName, "Image1",
WBOPENA_ArgLock, lock2,
WBOPENA_ArgName, "Anim1",
TAG_DONE))
{
PrintFault(IoErr(), NULL);
}
}
if (lock1)
Unlock(lock1);
if (lock2)
Unlock(lock2);
Re: WBRun bug causing some arguments to fail
You're right. I didn't think it through before reporting a problem. I removed "bug" from the topic title and marked it solved. Thanks for setting me straight.broadblues wrote:If you invoke WBrun on a file ot directory it's te same as if you had double clicked on it on the workbench.
AmigaOne X1000 with 2GB memory - OS4.1 FE