Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Script Host
Message
De
31/08/2000 16:08:31
Steve Summers
Pima County Superior Court
Tucson, Arizona, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Windows Script Host
Divers
Thread ID:
00411480
Message ID:
00411480
Vues:
37
I recently read an Advisor tip on creating shortcuts that recomended using Windows Sripting Host object. The code was written in VB and I wanted to convert it to VFP code. I can't seem to create an instance of this class in VFP. Here is the VB code:

Dim strDesktop As String
Dim shl As IWshShell_Class
Dim sct As IWshShortcut_Class

Set shl = New IWshShell_Class
strDesktop = shl.SpecialFolders("Desktop")

Set sct = shl.CreateShortcut(strDesktop & _
"\Notepad.lnk")
sct.TargetPath = "Notepad.exe"
sct.Description = "Start Notepad"
sct.Save
Set sct = Nothing
Set shl = Nothing

I found the library using the VB object browser and tried the following in VFP:

o = createobject("IWshRuntimeLibrary.IWshShortcut_Class")

VFP says it can't find this class?
Thanks in advance or I hope this helps!

[STS]
:>
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform