PDA

View Full Version : Pick shortcut location


Philo
10-04-2004, 04:26 AM
Morning all,

Im having a bit of a mental block (it is Monday morning! ;) ) I need to allow a user to specify a location for a shortcut to be created.

I have the following code from the help but cant get it to work


location = Dialog.FileBrowse(false, "Save As", "c:\\", "All Files (*.*)|*.*|", "", "", false, true);

Shell.CreateShortcut(location[1], "Managing SEN Shortcut", first_hdd.."Managing_SEN\\Managing SEN in Mainstream Schools.doc", "", "", "", 0, SW_SHOWNORMAL, nil);


If I leave the filename and file extention fields blank the user gets stuck on the filebrowse dialog. If I enter values for these then a folder is created with those names and the shortcut placed inside. How do I just create a shortcut at the specified location?

Cheers

Phil

Stefan_M
10-06-2004, 02:27 PM
Why didn't you use Dialog.FolderBrowse() ?

Stefan_M

Philo
10-07-2004, 03:22 AM
Thats a good question :o

Think it must definatley have been a Monday morning thing! I ended up just defaulting the shortcut to the Desktop :rolleyes