PDA

View Full Version : Type mismatch 'CreateShortcut '


dkallen
11-11-2004, 06:15 PM
In the VStudio.bld sample
the step Create log shortcut works great.
But when I try to create one , it doesn't work.
As a test, I have a small text file on my hard drive.
c:\dir.txt

I use CreateShortcut as a VBScript with one line

CreateShortcut "C:\dir.txt", "test"

I run it and get

Building project step 'Create log shortcut'...
Error at Line 1, Column 1 (Type mismatch: 'CreateShortcut')
Step 'Create log shortcut' failed
Build ended.

I can find no documentation on CreateShortcut

thanks
David K Allen

kevina
11-11-2004, 08:34 PM
As the comment states where CreateShortcut is called in the VStudio.bld sample, it is a script function defined as Project script code in VStudio.bld.

You have several options to use this script function in other builds:
1) Copy it as project script in the desired build
2) Copy it as global script, where it will be available for all builds on that machine
3) Copy it into the Run Script step where you want to use it

dkallen
11-12-2004, 08:59 AM
Thanks.
I moved it to Global and now it works fine.
Sorry I didn't know about scripts yet.
I'm only on page 19 of the manual.
I can see I will benefit from reading it first.
And by the way, the manual is very well written.
My thanks for that.

kevina
11-12-2004, 09:20 AM
Thanks for the compliment on the manual. I will ensure the author sees your positive comments.

Glad it is working for you now...