Print Catalog Items

Discuss and share scripts and script files...
Post Reply
TestMeister
Posts: 188
Joined: 04 Feb 2008 20:17

Print Catalog Items

Post by TestMeister »

Wondering if anyone has a script they can share that can do this?

jupe
Posts: 2791
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Print Catalog Items

Post by jupe »

This should work:

Code: Select all

text catalogreport("{Caption}","- {Caption}: {Location}");
for more information:

Code: Select all

help "idh_scripting_comref.htm#idh_sc_catalogreport";

highend
Posts: 13313
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Print Catalog Items

Post by highend »

Does "Print" mean output to the display / send to a printer?

If the second one is true, something like this could work...

Code: Select all

    $report = catalogreport("Category: {Caption}", "  {Caption}, {Location}");
    if ($report) {
        $printers = runret("wmic path win32_printer get name /format:list");
        $printers = replace(regexmatches($printers, "Name=.*?$", "|"), "Name=");
        $printer  = quote(popupmenu($printers, -1, -1, , , 0, "|"));
        if ($printer) {
            setting "BackgroundFileOps", 0;
            $file = "%TEMP%\~report.txt";
            writefile($file, $report);
            run "rundll32.exe %SYSTEMROOT%\System32\shimgvw.dll,ImageView_PrintTo /pt ""$file"" $printer", "<curpath>", 0, 0;
            delete 0, 0, $file;
        }
    }
One of my scripts helped you out? Please donate via Paypal

TestMeister
Posts: 188
Joined: 04 Feb 2008 20:17

Re: Print Catalog Items

Post by TestMeister »

Many thanks guys, I will work with those!
Was just looking for output to screen but since I have a PDF print driver that would work as well

Post Reply