• shellexecute()

    From timepro timesheet@21:1/5 to All on Thu Sep 8 01:50:27 2022
    taxfile='Z:\TAX\EINVOICE\010922_080922.XXX' // (text file)
    from inside my app, how to open it in a browser:
    SHELLEXECUTE( 0, 0, taxfile, 0, 0, 1 ) opens the file in notepad.

    thank you

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dlzc@21:1/5 to timec...@gmail.com on Thu Sep 8 10:53:23 2022
    On Thursday, September 8, 2022 at 1:50:28 AM UTC-7, timec...@gmail.com wrote:
    taxfile='Z:\TAX\EINVOICE\010922_080922.XXX' // (text file)
    from inside my app, how to open it in a browser:
    SHELLEXECUTE( 0, 0, taxfile, 0, 0, 1 ) opens the file in notepad.

    I think you need to pass "chrome @taxfile", or whatever browser is installed. A different kettle of fish.

    David A. Smith

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From timepro timesheet@21:1/5 to dlzc on Fri Sep 9 06:27:11 2022
    On Thursday, September 8, 2022 at 11:23:24 PM UTC+5:30, dlzc wrote:
    On Thursday, September 8, 2022 at 1:50:28 AM UTC-7, timec...@gmail.com wrote:
    taxfile='Z:\TAX\EINVOICE\010922_080922.XXX' // (text file)
    from inside my app, how to open it in a browser:
    SHELLEXECUTE( 0, 0, taxfile, 0, 0, 1 ) opens the file in notepad.
    I think you need to pass "chrome @taxfile", or whatever browser is installed. A different kettle of fish.

    David A. Smith

    thank you.

    nope, did not open the taxfile. ('chrome@taxfile')
    so, i just copied the .json(text) file to temp.HTML.
    now, shellexecute(...temp.html...) opens in the browser for viewing.
    (after exit, delete temp.html)
    but some lines are 350+ char long, chrome doesn't wrap/scroll that line. the user can view only that fits the screen).

    -if i open as shellexecute(...taxfile...), it opens in notepad, which the user can inadvertently edit.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dlzc@21:1/5 to timec...@gmail.com on Fri Sep 9 09:26:47 2022
    On Friday, September 9, 2022 at 6:27:12 AM UTC-7, timec...@gmail.com wrote:
    nope, did not open the taxfile. ('chrome@taxfile')

    I think the space is required 'chrome @taxfile'. Clipper should have "macro substituted" in the string, but you can always explicitly
    "chrome " + chr(34) + taxfile + chr(34) (as an argument in your shellexecute) ... when passing, but line length as you state is still a problem

    ...
    -if i open as shellexecute(...taxfile...), it opens in
    notepad, which the user can inadvertently edit.

    Could:
    Mark the file readonly, prior to passing, and
    Pass it to wordpad ('wordpad @taxfile'). Or the harder-to-read explicit version above.

    David A. Smith

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)