Profile Properties - Running Visual Basic Scripts
This profile property enables you to run a Visual Basic script (.vbs) before and after running a profile.This profile property isn't available unless Expert Mode is activated.
Upon Profile Startup/Completion
The file path of the specified VB script is shown in the box. Red highlighting indicates that the VB script couldn't be found by AllSync. The following buttons are available:- New – Create new VB script
- Select – Select VB script
- Edit – Edit VB script
- Remove – Remove VB script
- Test – Test VB script
Run script for:
This option enables you to specify the operation during which the script is to be started. The following options are available:- Copy Operation
- Copy Preview
- Process Copy Preview
- Filter Wizard
- Command Line
Requirements and Tips
- Visual Basic scripts can't be used with AllSync unless Microsoft Windows Scripting Host is installed on your computer. You can check this by running the sample script Test.vbs.
- The properties and methods of the WScript object have to be called without "WScript." Example: Instead of WScript.CreateObject only CreateObject has to be used.
- Some properties and methods of the WScript object, e.g. Sleep or Echo, cannot be used in the script or possess limited functionality.
- The error value -99 causes the profile to be aborted and no error message will be generated. See sample script 'CheckDestinationDrive.vbs'. You also can use a variable with the name "ExitCode" and set the value to "-99".
Placeholders
The following placeholders can be used inside the script:Placeholder | Description |
---|---|
[SourceX] | [Source1] is replaced by the first source folder activated in the source folder list, [Source2] by the second one, etc. |
[DestinationX] | [Destination1] is replaced by the first destination folder activated in the destination folder list, [Destination2] by the second one, etc. |
[Profil] | Profile name |
[ErrorCount] | Error count |
[CopyToSource] | The amount of data in bytes to be copied from the destination to the source |
[CopyToDestination] | The amount of data in bytes to be copied from the source to the destination |
Options
Automatically abort script after:
This option enables you to specify that the script be automatically aborted after a certain number of seconds. When activating the Script may use GUI language elements (e.g. MsgBox) option, a dialog containing a warning pops up when the time has elapsed. The user has to acknowledge the warning.Script may use GUI language elements (e.g. MsgBox)
An error is generated when this option is deactivated and GUI language elements have been used in the script, e.g. the MsgBox command. Deactivate this option when the profile is run automatically via AllSync Scheduler so that no dialog pops up and has to be acknowledged by the user.Abort profile ....
This option causes the profile to be terminated if an error occurs in the script or the script cannot be run for launching the profile.Sample Scripts
The sample scripts supplied with AllSync are located in the Scripts subdirectory of the AllSync application folder. The sample scripts are continuously updated and adapted by us as needed. When making changes to the sample scripts, make sure to save them under a different name otherwise they will be overwritten and your changes lost the next time you update AllSync.The following scripts are currently available: