in reply to win32::ole module

Can you post more code, and the exact error you get? Which menus of which application are you trying to use?

C.

Replies are listed 'Best First'.
Re^2: win32::ole module
by karayil (Initiate) on May 30, 2005 at 08:56 UTC
    #!perl #Script to build a project # Win32::OLE gives access to COM objects, # including the IDE’s COM objects use Win32::OLE; # Create an instance of CodeWarrior $CW = Win32::OLE->new("CodeWarrior.CodeWarriorApp",'Quit'); # Get the command line argument $projecttoopen = @ARGV[0]; # Open the project $project = $CW->File->Open($projecttoopen, true, 0, 0)|| die "can't op +en a project $!" # Build the project # Build() $project->Build(); # end of script

    ---> here, able to invoke the application. But $CW->File->Open fails with error message --Can't call method "Open" on an undefined value at build.pl line 23

    -jaya

    Janitored by holli - fixed formatting

      Well that tells us that $CW->File is returning undefined. Perhaps you should call $CW->File the examine Win32::OLE->LastError().