Re: DNA Studio scripting
I got it.
in Option, store/apply function should be string value :)
Option ("TB","StoreThunderbird","ApplyThunderbird","Thund erbird");
Ramkumar Santoshi wrote:
> Hello all.
>
> I am trying to write script to copy Thunderbird profile located in
> %APPDATA%\Thunderbird
>
> When only selecting this application during a migration, I get a weird
> error, and the script does not work. (see script below), although the
> "Check syntax" says it has 0 errors.
>
> I am getting the error:
> Events:
> Level: Error
> All Application Settings\Thunderbird Profile
> Syntax Error: syntax error on Line: 3 (}())
> -------------------
> If i fill the first 10 lines of Detection() with Message("test); lines,
> it still says the error is on line 3, so i'm not sure what's going on
> there. Same if i pad it with blank lines.
>
> Also i'm confused over the use of 'function' and 'ApplyFunction'. In the
> example they give, they do have Store commands within 'function
> TestStore()', but the docs for 'function' say "Only General commands
> (not Store or Apply commands) can occur in this function".
>
> And why isn't there a 'StoreFunction'?
>
> The script below never gets to StoreThunderbird().
>
> Any help?
>
> --------------
> function Detection()
> {
> if (Detect("thunderbird.exe") == false) return;
> Option ("Thunderbird Profile",StoreThunderbird,ApplyThunderbird,
> "Thunderbird");
> }
>
> function StoreThunderbird()
> {
> Message("in storethunderbird function");
> //StoreDirectory( APPDATAPATH + "\\Thunderbird");
> StoreDirectory( "d:\\temp"); //Testing
> }
>
> function ApplyThunderbird()
> {
> ApplyDirectory(APPDATAPATH + "\\Thunderbird");
> }
>
|