Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1024425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:46:35+00:00 2026-05-16T11:46:35+00:00

How do I make a new document in TextMate using rb-appscript or AppleScript? Here

  • 0

How do I make a new document in TextMate using rb-appscript or AppleScript?

Here is my rb-appscript:

te = app("TextMate")
te.launch
doc = te.make(:new => :document)

But it doesn’t work.

Here is the error message I get:

    OSERROR: -10000
    MESSAGE: Apple event handler failed.
    COMMAND: app("/Applications/TextMate.app").make({:new=>:document})

If someone gives me an AppleScript code I can convert it to rb-appscript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:46:36+00:00Added an answer on May 16, 2026 at 11:46 am

    Technically, it’s supposed to be just this:

    tell application "TextMate"
        set theResult to make new document
    end tell
    

    But I get the same error in Script Debugger. Creating a new document manually and getting the document via a script works fine. I’m going to say you found a bug in TextMate’s Applescript implementation. You could go the GUI scripting route here (shamelessly copied from the Mac OS Automation site):

    return do_menu("TextMate", "File", "New")
    --> result: true and a window appeared in TextMate
    
    on do_menu(app_name, menu_name, menu_item)
        try
            -- bring the target application to the front
            tell application app_name
                activate
            end tell
            tell application "System Events"
                tell process app_name
                    tell menu bar 1
                        tell menu bar item menu_name
                            tell menu menu_name
                                click menu item menu_item
                            end tell
                        end tell
                    end tell
                end tell
            end tell
            return true
        on error error_message
            return false
        end try
    end do_menu
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to make a new bare git repository but I get this error:
I want to make new stackpanal from another stackpanal already made before but if
This is probably a very basic question; I always see make new document with
Just started to use MODX Revo. When I make new document in MODX(Revo), fill
Make a new AS3 Document in Flash, paste in the following code and run
How to make an eclipse plugin open a new-generated document in the main view
My application just available on the App Store but I found an error, so
Basically, my client wants to make new visitors enter the site I'm working on
Every time i make a new JFrame object, the frame appears in the 0,0
I have make a new dropdown navi in css . Chrome, firefox, safari is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.