Changeset 981


Ignore:
Timestamp:
Oct 6, 2016, 4:15:46 PM (9 years ago)
Author:
Herwig Bauernfeind
Message:

GUI-Tools: Fix Ticket #229 (SMBPrint)

Location:
branches/guitools-2.0/smbprint
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/guitools-2.0/smbprint/smbprint.VRP

    r804 r981  
    66RunDirectory:
    77VRXWindow: __VREMainWindow,1,2180,3710,927,8000
    8 VRXWindow: __VRESectionListWindow,1,3216,6023,2891,3342
    9 VRXWindow: __VREToolsWindow,1,3211,9877,4968,1661
     8VRXWindow: __VRESectionListWindow,1,3132,2457,6890,3342
     9VRXWindow: __VREToolsWindow,1,3211,9877,5468,1665
    1010UserFile: 1
    1111UserWindow: Main,1
  • branches/guitools-2.0/smbprint/smbprint.VRX

    r804 r981  
    126126*/
    127127Main_Create:
    128     ok = VRRedirectStdIO("ON")
     128    debug = 0
     129    if debug = 1 then ok = VRRedirectStdIO("ON")
     130                 else ok = VRRedirectStdIO("OFF")
    129131    PrintParms =  VRGet("Application","Commandline")
    130     say "Printparms='"Printparms"'"
    131     say length(PrintParms)
     132    spooldir   = directory()
     133    if debug = 1 then say "Printparms='"Printparms"'"
     134    if debug = 1 then     say length(PrintParms)
    132135    if PrintParms <> "" then do
    133136        parse var PrintParms '"'spoolfile'" "'smbprintername'" "'Jobname'" "'pages'" "'JobSize'"'
    134         say 'Verzeichnis: "'directory()'"'
    135         say 'Spoolfile:   "'spoolfile'"'
    136         say 'Smbprinter:  "'smbprintername'"'
     137        if debug = 1 then say 'Verzeichnis: "'spooldir'"'
     138        if debug = 1 then say 'Spoolfile:   "'spoolfile'"'
     139        if debug = 1 then say 'Smbprinter:  "'smbprintername'"'
    137140
    138141        ok = VRMethod( "Application", "ListPrinters", "printer." )
     
    140143        if ok = 1 then do
    141144            do i = 1 to printer.0
    142                 say printer.i
     145                if debug = 1 then say printer.i
    143146                parse value printer.i with PName';'PQueue';'Rest
    144                 say PName'<-->'PQueue
     147                if debug = 1 then say PName'<-->'PQueue
    145148                if translate(PQueue) = translate(smbprintername) then do
    146149                    FoundQueue = 1
     
    152155        if FoundQueue then do
    153156            ok = VRset("DT_Job","Caption", 'Print "'Jobname'" ('Pages', 'JobSize' bytes) to "'PName'"')
    154             ok = VRPrintFile( smbprintername, directory'\'spoolfile, , JobName )
    155             ok = SysSleep(3)
    156             /* ok = VRRedirectStdIO("OFF") */
     157            ok = VRPrintFile( smbprintername, spooldir'\'spoolfile, , JobName )
     158            if debug = 1 then say "->"smbprintername", "spooldir"\"spoolfile", , "JobName
     159            ok = SysSleep(10)
     160            if debug = 1 then ok = VRRedirectStdIO("OFF")
    157161        end
    158162        else do
     
    162166            call _ShowMsg
    163167        end
    164         ok = SysFileDelete(Spoolfile)
     168        /* ok = SysFileDelete(Spoolfile) */
    165169    end
    166170    else do
Note: See TracChangeset for help on using the changeset viewer.