Richard
11-03-2006, 02:09 PM
This one has me baffled.
I want to show some html help for my program, so I copied the code from PPL's "Main_Form.ppl" help logic.
My code works fine on the PC, but fails on the PPC with a message effectively saying the file '##########' was not found. (where the # signs are square boxes).
The help on PPL works fine (with a dummy index.html) and shows the address in explorer as "file://\Program%20Files\PPL\manual\index.html"
So my code does this and my ShowMessage displays:
\My%20Documents\Convert\About_ppc.html"
which is correct.
(I also tried it with a space.)
Here's my code. I inserted the under-scores to show the indentation....
// Help
proc Help(Fn$)
local (Cmd$, Inf$);
#ifdef _WIN32
__Cmd$ = AppPath$ % Fn$ % "_pc.html";
#else
__Cmd$ = root% % Fn$ % "_ppc.html";
#endif
__x$ = pos(" ", Cmd$);
__while (x$ > 0)
____Cmd$ = mid(Cmd$, 0, x$) % "%20" % mid(Cmd$, x$ + 1, -1);
____x$ = pos(" ", Cmd$);
__end;
__showmessage(Cmd$);
__struct(Inf$, SHELLEXECUTEINFO);
__Inf.cbSize$ = sizeof(Inf$);
__Inf.lpFile$ = &Cmd$;
__ShellExecuteEx(&Inf$);
__return;
end;
If anyone can tell me why this code fails, it would be greatly appreciated.
Thanks,
Richard.
I want to show some html help for my program, so I copied the code from PPL's "Main_Form.ppl" help logic.
My code works fine on the PC, but fails on the PPC with a message effectively saying the file '##########' was not found. (where the # signs are square boxes).
The help on PPL works fine (with a dummy index.html) and shows the address in explorer as "file://\Program%20Files\PPL\manual\index.html"
So my code does this and my ShowMessage displays:
\My%20Documents\Convert\About_ppc.html"
which is correct.
(I also tried it with a space.)
Here's my code. I inserted the under-scores to show the indentation....
// Help
proc Help(Fn$)
local (Cmd$, Inf$);
#ifdef _WIN32
__Cmd$ = AppPath$ % Fn$ % "_pc.html";
#else
__Cmd$ = root% % Fn$ % "_ppc.html";
#endif
__x$ = pos(" ", Cmd$);
__while (x$ > 0)
____Cmd$ = mid(Cmd$, 0, x$) % "%20" % mid(Cmd$, x$ + 1, -1);
____x$ = pos(" ", Cmd$);
__end;
__showmessage(Cmd$);
__struct(Inf$, SHELLEXECUTEINFO);
__Inf.cbSize$ = sizeof(Inf$);
__Inf.lpFile$ = &Cmd$;
__ShellExecuteEx(&Inf$);
__return;
end;
If anyone can tell me why this code fails, it would be greatly appreciated.
Thanks,
Richard.