Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / August 2005



Tip: Looking for answers? Try searching our database.

Applescript with codewarrior

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
babu - 09 Aug 2005 13:51 GMT
I am new to the apple script. I want to write an AppleScript that opens
a CodeWarrior and creates new .mcp (project file) and apply some
settings to the project file. I don't know whether its possible or
not.. Can someone guide me how to do it.

Thanks in advance.
Robert - 10 Aug 2005 17:14 GMT
Create a new project file:

Create Project "users:myhome:projs:NewProj.mcp" from stationery alias
"where:I:keep:stationery:stationery.mcp"

Apply some settings:

Access paths:
on AppendAccessPath(aPath, isRecursive, isUserPath)
    tell application "CodeWarrior IDE"
        if (aPath does not end with ":") then set aPath to aPath & ":"

        set aPath to POSIX path of aPath
        set pathsToAdd to {{name:aPath, recursive:isRecursive,
origin:absolute, format:Unix Path}}
        if isUserPath then
            Set Preferences of panel "Access Paths" to {User Paths:pathsToAdd}
        else
            Set Preferences of panel "Access Paths" to {System Paths:pathsToAdd}
        end if
    end tell
end AppendAccessPath

Change target:

   set the current target of project document 1 to target targetIndex
of project document 1

Change the preprocessor text:

    Set Preferences of panel "C/C++ Preprocessor" to {Prefix Text:""}

Turn CVS on:

  Set Preferences of panel "VCS Setup" to {VCS Active:true, Connection
Method:"mwCVS"}

Make sure and wrap all of the above in:
tell app "Codewarrior IDE"
   ...
end tell

For more, in Script Editor, open the dictionary of the Codewarrior
application.
Feel free to email me.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.