I'm using AMS 5.0.0.1 and trying to make a way to backup some files through a menu made with AMS.
<B>FIRST DOUBT</B>
I place a paragraph box, so the user can see where the backup file will be saved. It consists of a Paragraph box and a Search button. When the user clicks the Search button and defines the save dir and then confirms the dialog box, I set a string like this in the "On Leave" tab:
Paragraph.SetText("Paragraph1", DirSave);
The command should set in the mentioned paraghraph box the path where the file will be saved. This path was stored in the DirSave variable when the user confirmed the search dialog box.
The problem is that, when the user confirms the dialog, the following error is displayed:
On Leave, Line 1: Argument 2 must be of type string.
Since the argument 2 is the variable DirSave, the problem is that the AMS don't accept a variable in a command like this in the way I am using it. What am I doing wrong? I tried to use the same process in commands to insert text in a file or dialog, but the error is always "the argument must be of type string". I also tried to use the variable like {_DirSave}, _DirSave, etc....
<B> SECOND ONE </B>
Since the program that I am trying to backup generates random filenames to the type of files I want to backup (.dbf files), I am unable to create a table with specific filenames so I can inform it in the ZIP ADD command. So, how can I generate a table that consists of something like "SourceFolder .. "\\*.dbf"?
I'm very surprised with the new features in the AMS 5...specially the Zip.Add function, wich is the essential part of this project I'm trying to create....But am yet confused with the new ways to place the variables...Hope someone can give me a help! :confused:
Tanx a lot!!!!!!!!!!!!!!
<B>FIRST DOUBT</B>
I place a paragraph box, so the user can see where the backup file will be saved. It consists of a Paragraph box and a Search button. When the user clicks the Search button and defines the save dir and then confirms the dialog box, I set a string like this in the "On Leave" tab:
Paragraph.SetText("Paragraph1", DirSave);
The command should set in the mentioned paraghraph box the path where the file will be saved. This path was stored in the DirSave variable when the user confirmed the search dialog box.
The problem is that, when the user confirms the dialog, the following error is displayed:
On Leave, Line 1: Argument 2 must be of type string.
Since the argument 2 is the variable DirSave, the problem is that the AMS don't accept a variable in a command like this in the way I am using it. What am I doing wrong? I tried to use the same process in commands to insert text in a file or dialog, but the error is always "the argument must be of type string". I also tried to use the variable like {_DirSave}, _DirSave, etc....
<B> SECOND ONE </B>
Since the program that I am trying to backup generates random filenames to the type of files I want to backup (.dbf files), I am unable to create a table with specific filenames so I can inform it in the ZIP ADD command. So, how can I generate a table that consists of something like "SourceFolder .. "\\*.dbf"?
I'm very surprised with the new features in the AMS 5...specially the Zip.Add function, wich is the essential part of this project I'm trying to create....But am yet confused with the new ways to place the variables...Hope someone can give me a help! :confused:
Tanx a lot!!!!!!!!!!!!!!
Comment