Printing command is not printing

Discuss RoboTask here
Post Reply
jeroen123
Posts: 25
Joined: Wed Feb 15, 2012 5:35 pm

Printing command is not printing

Post by jeroen123 »

Hello Oleg,
I have written a simpel task to print new documents automatically; pls see it below.

now it appears that the Adobe dialog screen is opened to show the document, and it closes again, and the file is deleted; but there is no print..
but When I put it back from the dustbin it prints (automatically)!

Do you see any error while it will not print in the first stage?
thanks!

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task4"
Hide=INTEGER|0
ID=INTEGER|1404434663
LogOnAsUser=INTEGER|1
Name=STRING|"S04 Printen MY PARCEL labels"
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action10=FOLDER
Action11=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
Action9=FOLDER

[Actions\Action1]
ActionID=STRING|"A_GENERAL_PRINTDOC"
Enabled=INTEGER|0
Name=STRING|"Print pakbon*.pdf"
Params=FOLDER

[Actions\Action1\Params]
files=STRING|"C:\Users\beheer\Downloads\pakbon*.pdf"
printer=STRING|"HP LaserJet 500 color M551 PCL6"
printto=STRING|"1"

[Actions\Action10]
ActionID=STRING|"A_WINDOW_COMMAND"
Enabled=INTEGER|-1
Name=STRING|"Close window ""Adobe Reader"""
Params=FOLDER

[Actions\Action10\Params]
action=STRING|"4"
caption=STRING|"1"
child=STRING|"0"
class=STRING|"0"
classexact=STRING|"0"
exact=STRING|"0"
findmode=STRING|"0"
hidden=STRING|"0"
processall=STRING|"0"
wincaption=STRING|"Adobe Reader"

[Actions\Action11]
ActionID=STRING|"A_FILE_DELETE"
Enabled=INTEGER|-1
Name=STRING|"Delete File"
Params=FOLDER

[Actions\Action11\Params]
Count=STRING|"5"
deletedirs=STRING|"0"
file0=STRING|"C:\Users\beheer\Downloads\myparcel-label*.pdf"
file1=STRING|"C:\Users\beheer\Downloads\pakbon*.pdf"
file2=STRING|"C:\Users\beheer\Downloads\packingslip*.pdf"
file3=STRING|"C:\Users\beheer\Downloads\invoice*.pdf"
file4=STRING|"C:\Users\beheer\Downloads\MyParcel*.pdf"
hidden=STRING|"1"
subdir=STRING|"0"
system=STRING|"1"
ToRecycleBin=STRING|"1"

[Actions\Action2]
ActionID=STRING|"A_WINDOW_COMMAND"
Enabled=INTEGER|0
Name=STRING|"Close window ""Adobe Reader"""
Params=FOLDER

[Actions\Action2\Params]
action=STRING|"4"
caption=STRING|"1"
child=STRING|"0"
class=STRING|"0"
classexact=STRING|"0"
exact=STRING|"0"
findmode=STRING|"0"
hidden=STRING|"0"
processall=STRING|"0"
wincaption=STRING|"Adobe Reader"

[Actions\Action3]
ActionID=STRING|"A_GENERAL_PRINTDOC"
Enabled=INTEGER|0
Name=STRING|"Print invoice*.pdf"
Params=FOLDER

[Actions\Action3\Params]
files=STRING|"C:\Users\beheer\Downloads\invoice*.pdf"
printer=STRING|"HP LaserJet 500 color M551 PCL6"
printto=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_WINDOW_COMMAND"
Enabled=INTEGER|0
Name=STRING|"Close window ""Adobe Reader"""
Params=FOLDER

[Actions\Action4\Params]
action=STRING|"4"
caption=STRING|"1"
child=STRING|"0"
class=STRING|"0"
classexact=STRING|"0"
exact=STRING|"0"
findmode=STRING|"0"
hidden=STRING|"0"
processall=STRING|"0"
wincaption=STRING|"Adobe Reader"

[Actions\Action5]
ActionID=STRING|"A_GENERAL_PRINTDOC"
Enabled=INTEGER|0
Name=STRING|"Print packingslip*.pdf"
Params=FOLDER

[Actions\Action5\Params]
files=STRING|"C:\Users\beheer\Downloads\packingslip*.pdf"
printer=STRING|"HP LaserJet 500 color M551 PCL6"
printto=STRING|"1"

[Actions\Action6]
ActionID=STRING|"A_WINDOW_COMMAND"
Enabled=INTEGER|0
Name=STRING|"Close window ""Adobe Reader"""
Params=FOLDER

[Actions\Action6\Params]
action=STRING|"4"
caption=STRING|"1"
child=STRING|"0"
class=STRING|"0"
classexact=STRING|"0"
exact=STRING|"0"
findmode=STRING|"0"
hidden=STRING|"0"
processall=STRING|"0"
wincaption=STRING|"Adobe Reader"

[Actions\Action7]
ActionID=STRING|"A_GENERAL_PRINTDOC"
Enabled=INTEGER|-1
Name=STRING|"Print 2 files"
Params=FOLDER

[Actions\Action7\Params]
files=STRING|"C:\Users\beheer\Downloads\myparcel-label.pdf,""C:\Users\beheer\Downloads\MyParcel Shipping Labels*.pdf"""
printer=STRING|"ZDesigner GK420d (Kopie 1)"
printto=STRING|"1"

[Actions\Action8]
ActionID=STRING|"A_WINDOW_COMMAND"
Enabled=INTEGER|0
Name=STRING|"Close window ""Adobe Reader"""
Params=FOLDER

[Actions\Action8\Params]
action=STRING|"4"
caption=STRING|"1"
child=STRING|"0"
class=STRING|"0"
classexact=STRING|"0"
exact=STRING|"0"
findmode=STRING|"0"
hidden=STRING|"0"
processall=STRING|"0"
wincaption=STRING|"Adobe Reader"

[Actions\Action9]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 2000 ms"
Params=FOLDER

[Actions\Action9\Params]
delay=STRING|"20"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
UnigueID=INTEGER|16446209

[Events\Event1\Params]
chg=STRING|"0"
chga=STRING|"1"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"0"
folder1=STRING|"C:\Users\beheer\Downloads\"
foldercount=STRING|"1"
incmask=STRING|"myparcel*.pdf"
interval=STRING|"3"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"1"
new=STRING|"1"
pass=STRING|"0"
passmode=STRING|"1"
saveresults=STRING|"0"
subfolders1=STRING|"0"
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Printing command is not printing

Post by Oleg »

Unfortunately "Print File" action doesn't wait for end of printing operation. I wrote this into our ToDo. Maybe it's possible to do something to improve this.
Put the enough pause (30 seconds or more).

Also I recommend you to print files one-by-one in the loop
See the task below. Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Do not forget to enable the task after importing.

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1416408852
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task41"
Hide=INTEGER|0
ID=INTEGER|998190703
LogOnAsUser=INTEGER|1
Name=STRING|"S04 Printen MY PARCEL labels (In the Loop)"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER

[Actions\Action1]
ActionID=STRING|"A_LOOP_FILE"
Enabled=INTEGER|-1
Name=STRING|"File Loop"
Params=FOLDER

[Actions\Action1\Params]
createmode=STRING|"1"
date1=STRING|"20150819"
date2=STRING|"20150819"
destvar=STRING|"FILE_TO_PRINT"
DuringDays=STRING|"1"
DuringHours=STRING|"1"
DuringMinutes=STRING|"1"
DuringMonths=STRING|"1"
exclude=STRING|"F"
file0=STRING|"C:\Users\beheer\Downloads\*.pdf"
filecount=STRING|"1"
OlderDays=STRING|"1"
OlderHours=STRING|"1"
OlderMinutes=STRING|"1"
OlderMonths=STRING|"1"
savesize=STRING|"0"
searchkind=STRING|"0"
sort=STRING|"0"
sortby=STRING|"0"
sortorder=STRING|"0"
subdirs=STRING|"1"
timesize=STRING|"0"
WithoutPath=STRING|"0"

[Actions\Action2]
ActionID=STRING|"A_GENERAL_PRINTDOC"
Enabled=INTEGER|-1
Name=STRING|"Print {File_To_Print}"
Params=FOLDER

[Actions\Action2\Params]
files=STRING|"{File_To_Print}"
printer=STRING|"ZDesigner GK420d (Kopie 1)"
printto=STRING|"1"

[Actions\Action3]
ActionID=STRING|"A_GENERAL_PAUSE"
Enabled=INTEGER|-1
Name=STRING|"Delay 10 sec"
Params=FOLDER

[Actions\Action3\Params]
delay=STRING|"10"
dimension=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_WINDOW_COMMAND"
Enabled=INTEGER|-1
Name=STRING|"Close window ""Adobe Reader"""
Params=FOLDER

[Actions\Action4\Params]
action=STRING|"4"
caption=STRING|"1"
child=STRING|"0"
class=STRING|"0"
classexact=STRING|"0"
exact=STRING|"0"
findmode=STRING|"0"
hidden=STRING|"0"
processall=STRING|"0"
wincaption=STRING|"Adobe Reader"

[Actions\Action5]
ActionID=STRING|"A_FILE_DELETE"
Enabled=INTEGER|-1
Name=STRING|"Delete File"
Params=FOLDER

[Actions\Action5\Params]
Count=STRING|"1"
deletedirs=STRING|"0"
file0=STRING|"{File_To_Print}"
hidden=STRING|"1"
subdir=STRING|"0"
system=STRING|"1"
ToRecycleBin=STRING|"1"

[Actions\Action6]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
UnigueID=INTEGER|820881456

[Events\Event1\Params]
chg=STRING|"0"
chga=STRING|"1"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"0"
folder1=STRING|"C:\Users\beheer\Downloads\"
foldercount=STRING|"1"
incmask=STRING|"myparcel*.pdf"
interval=STRING|"3"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"1"
new=STRING|"1"
pass=STRING|"0"
passmode=STRING|"1"
saveresults=STRING|"0"
subfolders1=STRING|"0"
Oleg Yershov
Post Reply