How to save a file compressed in jpg format using Corel Script?

Hi:

I'm using Corel Script to save a file from Photo Paint 9 to jpg format file.

I'm using this command .FileSave

.FileSave FileName$, 774, 0

But I need to compress the file so I've tried this other parameter...

.FileSave FileName$, 774, 3

I've been reading about this other command and I've found 2 examples but they don't work...

.FilterJPG 50, FALSE, 0, 0, FALSE
.FilterJPG 0, TRUE, 10, 0, 0

Has anyone known how to do it, please?

Thank you!!!

I've two links with the reference language for these two commands

FileSave

FilterJpg