Hi,
I'm trying the trigger File monitor to start my task but I don't understand how to use the "Pass as parameters": it can be used to write in a variable ( in the field "Parameter name") the name of the new file monitored? If not, what is the function of "Pass as parameters"?
I could try to take the name file by using the action search file, but I could risk to take more than one file I think..
Thank you for tour support
File monitor - pass as parameters
Re: File monitor - pass as parameters
File monitor trigger can pass the lists of files as parameters.
You can use these parameters in the task as variables. In fact these parameters are local variables in the task.
See this example, please:
Save the text of the task into a file and use menu Task->Import in order to import into RoboTask
You can use these parameters in the task as variables. In fact these parameters are local variables in the task.
See this example, please:
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|2099193306
Comment=STRINGLIST
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task850"
Hide=INTEGER|0
ID=INTEGER|2138058689
LogOnAsUser=INTEGER|1
Name=STRING|"Show ""New files are:""..."
OnErrorTaskID=INTEGER|0
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
[Actions\Action1]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""New files are:"""
Params=FOLDER
[Actions\Action1\Params]
icon=STRING|"1"
msg0=STRING|"New files are:"
msg1=STRING|"{NewFiles}"
msg3=STRING|"Deleted files are:"
msg4=STRING|"{DeletedFiles}"
msg6=STRING|"Changed files are:"
msg7=STRING|"{ChangedFiles}"
msgcount=STRING|"8"
playsound=STRING|"0"
showmessage=STRING|"1"
[Events]
Event1=FOLDER
[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_FILE_MONITOR"
Params=FOLDER
UnigueID=INTEGER|16446209
[Events\Event1\Params]
chg=STRING|"1"
chga=STRING|"1"
chglistparameter=STRING|"ChangedFiles"
chgsl=STRING|"1"
chgsm=STRING|"1"
chgtl=STRING|"1"
chgtm=STRING|"1"
del=STRING|"1"
dellistparameter=STRING|"DeletedFiles"
folder1=STRING|"D:\incoming"
foldercount=STRING|"1"
incmask=STRING|"*.*"
interval=STRING|"10"
listmode=STRING|"1"
mon_files=STRING|"1"
mon_folders=STRING|"0"
new=STRING|"1"
newlistparameter=STRING|"NewFiles"
pass=STRING|"1"
passmode=STRING|"2"
saveresults=STRING|"0"
subfolders1=STRING|"1"
Oleg Yershov
Re: File monitor - pass as parameters
Hi Oleg, thank you for your support.
I managed to use the file name as variable, however I'm trying to use it in a "Browse file" mask of a site ( that use java or similar code so that I had to exclude the use of Fill form action) but, when I click on open windows warns me that che name path is not valid. The strange thing is that if I write again by myself( or copy it by the properties of the file), the path is considered valid.
Maybe the name is encoded in some way?
Do you have an advice to get over this problem? Maybe another action I could use.
I attach an image that could help to understand better.
Thank you and have a good day!
I managed to use the file name as variable, however I'm trying to use it in a "Browse file" mask of a site ( that use java or similar code so that I had to exclude the use of Fill form action) but, when I click on open windows warns me that che name path is not valid. The strange thing is that if I write again by myself( or copy it by the properties of the file), the path is considered valid.
Maybe the name is encoded in some way?
Do you have an advice to get over this problem? Maybe another action I could use.
I attach an image that could help to understand better.
Thank you and have a good day!
- Attachments
-
- Cattura.PNG (60.71 KiB) Viewed 13879 times
Re: File monitor - pass as parameters
Maybe your variable contain invisible symbols at the end (space-bar, end-of-line, etc).
Try to use STR Trim action before use this string
Unfortunately I can't say more because I don't see your task and your system environment.
Try to use STR Trim action before use this string
Unfortunately I can't say more because I don't see your task and your system environment.
Oleg Yershov