Einzelnen Beitrag anzeigen

Benutzerbild von Piro
Piro

Registriert seit: 14. Jul 2003
Ort: Flintbek
810 Beiträge
 
Delphi XE2 Professional
 
#10

Re: VBS (For Each xxx in xxxx) -> Delphi

  Alt 25. Nov 2006, 18:10
Danke an alle, irgendwie war ich blind.

Hier der endgültige Code:
Delphi-Quellcode:
procedure vbscript;
var
  oCPAppletMgr, oClientActions, oClientAction : OleVariant;
  i : Integer;
  sActionName : String;
begin
 sActionName := 'Hardware Inventory Collection Cycle';
 oCPAppletMgr := CreateOleObject('CPApplet.CPAppletMgr');
 oClientActions := oCPAppletMgr.GetClientActions;

 for i:=1 to oClientActions.Count do
 begin
   oClientAction := oClientActions.Item[i];
   //ShowMessage(oClientAction.Name);
   If oClientAction.Name = sActionName Then
        oClientAction.PerformAction;
 end;
end;
Schönen Samstag-Abend noch.
  Mit Zitat antworten Zitat