AppleScript Studio Problems...

I have documented some AppleScript Studio problems that I have encountered, along with some screenshots.
Hopefully somebody might have a clue what is causing the problems.
http://www.mac-specialist.com/r/as_studio.html
I would be grateful for any insights,
Bill Hernandez
Plano, Texas

Steve,
This is the message I sent earlier with new findings:
After I deleted "Smart Crash Reports.bundle" in /Library/InputManagers/, I rebooted, went to AS Studio to see if there were any problems, and guess what ?
The Debugger started working. It's been broken as long as I can remember. Every time I've wanted to learn how to work with AS Studio since it came out, the Debugger has never worked, and I always ended up moving on to something else.
This is awesome...
Bill Hernandez
Plano, Texas
<hr>
On Dec 24, 2006, at 5:27 PM, Steve Hayman wrote:
Hi Bill.
Make sure you're building a debug version of the project in order for breakpoints to work. In Xcode you set this with Project > Set Active Build Configuration > Debug .
This was the very first thing I checked the other day when I started trying to learn AS Studio in earnest.
Also I don't think those messages you are seeing about Smart Crash REports.bundle actually indicate that the app has crashed; it's just reporting that it can't load this bundle for some reason, and then proceeding anyway - I don't see anything that indicates your app has crashed.
I read a long article at : http://daringfireball.net/2006/01/smartcrashreports
and came away without a real solution. It was close to 3 am so I was barely awake, but came away confused as to what the solution was. I had used Unsanity's products particularly the menu product, but they caused too many problems with Quickeys and 4th Dimension. After talking to the people that write Quickeys, I disabled all their stuff and everything started working fine with Quickeys and 4D. They are far more important for me, that the Unsanity stuff.
I agree with the Daring Fireball article, and am annoyed that Unsanity patches the OS without asking for permission. I won't buy their products any more.
That bundle is something that certain third-party applications install which attempts to email crash reports for their apps back to their authors, rather than to Apple. I don't know what app you might have installed that included this but it would probably be safe to remove the bundle. (Double clicking on it wouldn't do anything; it's not intended to be double clicked; it just sits there and waits to be loaded.)
After I wrote the original message I realized that it wasn't double clickable, but by then it was too late. I think it was probably Unsanity's APE, or FruitMenu.If you look at /Library/InputManagers/ there's an "info" file, and a "Smart Crash Reports.bundle". I just deleted both of them, if it causes a problem I'll copy them from another machine that doesn't have it. I'm not sure but I believe they patch the original one from Apple. I'm not sure if that is correct?
<hr>
On 22-Dec-06, at 8:54 PM, Bill Hernandez wrote:
Wizards,
I have documented some AppleScript Studio problems that I have encountered, along with some screenshots.
Hopefully somebody might have a clue what is causing the problems.
http://www.mac-specialist.com/r/as_studio.html
I would be grateful for any insights,
Bill Hernandez
Plano, Texas

Similar Messages

  • Applescript Studio Problems, Web Browser

    Hey,
    I'm attempting an application using Applescript in Xcode because I just can't get my head around objective-c.
    So far I have a GUI with a button and a webview both linked to this code:
    on clicked (theObject)
    if the name of theObject is "loadgoogle" then
    tell mainwindow
    open location "http://google.com"
    end tell
    end if
    end clicked
    It compiles fine but when I click the button nothing happens.
    Could someone please enlighten me?
    Kind Regards
    Message was edited by: maximart4u

    Are you really using *AppleScript Studio*, or are you just dropping the old handlers into a new AppleScriptObjC project?
    If you are creating a new project, note that AppleScript Studio is deprecated in Snow Leopard. You can still edit existing AppleScript Studio projects (which explains why it compiles), but your on clicked handler does not meet the new naming protocol used in AppleScriptObjC and Interface Builder.
    See the AppleScriptObjC Release Notes - it has information about enabling the AppleScript Studio palette in Interface Builder (the AppleScript Studio project templates have been removed, though). There is also a AppleScriptObjC in Xcode tutorial at MacScripter that should get you started.

  • AppleScript Studio/Xcode problem - Problem with text entries! Please help!

    Hey, I've been up for hours each night looking for solutions to this but still have had no luck.
    I am creating an app in Xcode/Applescript studio that will ask you to enter how many times you would like system events to repeat a certain keystroke. First of all, the code would look something like this:
    on click theObject
    If the name of theObject is equal to "myApplication" then
    (Right here would be where the variables representing text in an input in the app's window would be, which I have absolutely no clue what to type.)
    tell application "text edit"
    activate
    tell application "system events"
    keystroke x (x representing a variable)
    end tell
    end tell
    end clicked
    and that's about as far as I can get. I want a variable representing the text in the main text entry box, but I have no clue how to access that text, or even know if it's submitted or detected when I hit a button. Hopefully you're following, as I am way to confused to fully explain it, but please try and help me out if you can.

    Hi Kamprath445,
    Though this mentions iTunes, I think it has good examples you can use...
    http://dougscripts.com/itunes/itinfo/keycodes.php
    More in depth...
    http://developer.apple.com/documentation/applescript/conceptual/applescriptlangg uide/conceptual/ASLR_variables.html

  • Create a tab view item in obj-c for use in applescript studio

    I'm making an application with applescript studio. I want to be able to add tab view items to a tab view at the press of a button. The problem I have is applescript studio doesn't allow me to create a new tab view item. So I'm thinking I can create the tab view item using objective-c, pass that to my applescript, then add it to my tab view.
    In applescript I plan to use the following call methods to first create the tab view item object, and then add it to my tab view. The objective-c code which is called from the first line in the applescript code is below that. When I run my code I'm getting an error saying newTVI is not defined... so maybe you can see my error! Be kind to me because I'm new to objective-c and I'm sure that's where my problem lies. Anyway, I'd appreciate any help.
    ==Applescript calls to create and add a new tab view item
    set newTVI to call method "returnNewTabViewItem" of class "makeNewTabViewItem"
    call method "addTabViewItem:" of objMainTV with parameter newTVI
    ==Objective-c code to create the tab view item
    ==makeNewTabViewItem.h==
    #import <Cocoa/Cocoa.h>
    @interface makeNewTabViewItem : NSTabViewItem
    NSTabViewItem *newTVI;
    -(NSTabViewItem *)returnNewTabViewItem;
    @end
    == makeNewTabViewItem.m==
    #import "makeNewTabViewItem.h"
    @implementation makeNewTabViewItem
    -(NSTabViewItem *)returnNewTabViewItem
    newTVI = [[[NSTabViewItem alloc] initWithIdentifier:nil] autorelease];
    return newTVI;
    @end

    Please, any ideas?

  • Option+Return does not work in applescript studio

    Fresh install of osx 10.4.6 Tiger, newest release of xcode.
    I start an applescript studio application project, when editing in Xcode Option+Return does not insert the continue line character.
    I can open the same .applescript in the Applescript Editor and Option+Return does work.
    Also, Option+Return works in my desktop installation of Xcode. No idea what's different here or how to fix it, but it's really messing with my work flow.

    Moved to .NET SDK forum.
    Search here, lots of post on IIS and setting Printer Access Permissions for your application.
    Also search MSDN on what is required to for IIS to access local Printers.
    Also search for ActiveX Controls and Browser permissions, you'll likely have problems there also since most Browsers will not or do not recommend allowing any ActiveX control.
    Don

  • Scripting AppleScript Studio Applications

    Is there a way to create commands in an AppleScript Studio application that could be called by an AppleScript? Ideally, I want to be able to use the command in an AppleScript and have it execute a handler in my Studio Application.
    Thanks,
    Carl

    Won't be a problem with AppleScriptObjC

  • Starting mysql daemon hangs applescript studio app

    hi,
    i am currently writing a small application with applescript studio that starts an apache server and a mysql database.
    Starting apache via a 'do shell' command is no problem at all but starting mysql with this command
    do shell script "/pathto/mysqldsafe --port=2323 --somemoreoptions &"
    hangs my application.
    Executing the command in a shell works well.
    I guess the problem is that firing the command (in the terminal) causes the terminal to return to the command prompt (username:~ username$ ) pretty immediatley. But after one or two seconds there are some more information echoed to the shell ('Starting mysqld daemon with databases from pathto_datadir').
    Maybe this confuses my app and it starts waiting for things that will never end.
    My current workaround is to open the terminal and to execute the command there:
    tell application "Terminal"
      do script "pathto/mysqldsafe --port=3023 --somemoreoptions &"
      delay 1
      if terminalwasopen is equal to false then
        quit
      else
        close window 1
      end if
    end tell
    Any ideas how to get rid off this wokaround and how to manage this with a simple 'do shell script'?
    Thanks in advance.
    i++
    PowerBook Pro 15"   Mac OS X (10.4.7)  

    This issue is discussed in the do shell script technote.
    Specifically, even though you tell the process to background (by appending the &), AppleScript still holds onto the process' stdout and stderr, waiting for the output of the command.
    The solution is to suppress or redirect stdout and stderr, e.g.:
    do shell script "/pathto/mysqldsafe --port=2323 --somemoreoptions > /dev/null 2>&1 &"
    The '> /dev/null' suppresses stdout (which could go to a file if you prefer), and '2>&1' sends stderr to the same place as stdout.
    Incidentally, I assume you have some check to ensure apache and/or mysql aren't already active, right? This would cause a problem if mysql is already running.

  • Drag & drop from sorted table view to outline view in AppleScript Studio

    I want to make a drag and drop from a sorted table view to an outline view in applescript Studio.
    Problem is that the data are copied from the data source of the table view,
    wich is unsorted, rather than from the table view itself that is sorted.
    So I have the wrong data droped.
    The element wich is passed from the table view thru the outline view is the row number. Then the script find the data of the corresponding row of the data source of the table view(unsorted).
    I want the script, using the row number, to get the content of the displayed row of the table view (sorted).
    Any help welcome.

    I want to make a drag and drop from a sorted table view to an outline view in applescript Studio.
    Problem is that the data are copied from the data source of the table view,
    wich is unsorted, rather than from the table view itself that is sorted.
    So I have the wrong data droped.
    The element wich is passed from the table view thru the outline view is the row number. Then the script find the data of the corresponding row of the data source of the table view(unsorted).
    I want the script, using the row number, to get the content of the displayed row of the table view (sorted).
    Any help welcome.

  • Applescript Studio - Dynamically named button title

    Can anyone tell me if it is possible to retrieve the title of a button in an Applescript Studio application?
    I have no problem if the title of the button is set in the Attributes Inspector.
    EXAMPLE:
    If I set the title of a button to "test" in the attributes inspector and attach a script to a button like:
    *display dialog (get title of button "btnName" of window 1)*
    the result will be a dialog containing the text "test"
    However, if I set the title of a button through a script like
    *set title of button "btnName" of window 1 to "test"*
    and then try to retrieve it the same way
    *display dialog (get title of button "btnName" of window 1)*
    the dialog is empty
    Does anyone know if it is possible to retrieve these dynamically set button titles?

    The name of the button has an applescript name, which is how I reference it from the script. But, the actual project uses a series of buttons which all have their titles set dynamically from a script. Also the mode of the buttons are set to "On Off" (not that I think that should make a difference) I am running leopard 10.5 with xcode 3.0.
    I'm rather new to Applescript Studio and xcode. I don't know what would be wrong with the set-up. And why I would have no problem setting the button titles from a script but not be able to retrieve them.
    I have come up with a work around, keeping track of the button titles in a separate array. I seems stupid to have to do that rather than access the existing button property, but it does work.
    I will have to set up a simple test to explore what may be going wrong.

  • AppleScript Studio: status bar and panel window

    My problem is that the panel won't open, and so I don't see the progress bar.
    All I am looking for is the panel to come down, show the progress bar turning, then for the panel to go away when iCal is done adding the event. This is the entire script, but I'm not sure I have everything right in Interface builder. The Documentation for display mentioned clicking panel ended, but then further down it looked like you didn't need it.
    I'm confused.
    -- +Event.applescript
    -- +Event
    -- Created by Michael Ewald on 6/26/06.
    -- Copyright 2006 Michael Ewald. All rights reserved.
    load panel "statusPanel" from nib "statusPanel"
    on clicked theObject
    -- Get & Format form items
    set eventTitle to contents of text field "eventTitle" of window "main" as string
    set eventLocation to contents of text field "eventLocation" of window "main" as string
    set EventNotes to contents of text view "eventNotesText" of scroll view "eventNotesScroll" of window "main"
    set allDay to state of button "allDay" of window "main"
    set startDate to current date
    set startDate to content of control "startDate" of window "main"
    set endDate to content of control "endDate" of window "main"
    -- Make Event
    start progress indicator "statusBar" of window "statusPanel"
    try
    start progress indicator "statusBar" of window "statusPanel"
    display "statusPanel" attached to window "main"
    tell application "iCal"
    set theCalName to "AppleScript Test"
    set theCal to calendar theCalName
    if allDay is equal to 1 then
    make new event at end of calendar theCalName with properties {summary:eventTitle, location:eventLocation, allday event:true, description:EventNotes}
    else if allDay is equal to 0 then
    make new event at end of calendar theCalName with properties {summary:eventTitle, location:eventLocation, start date:startDate, end date:endDate, description:EventNotes}
    end if
    end tell
    -- reset form
    set the contents of text field "eventTitle" of window "main" to ""
    set the contents of text field "eventLocation" of window "main" to ""
    set contents of text view "eventNotesText" of scroll view "eventNotesScroll" of window "main" to ""
    set state of button "allDay" of window "main" to 0
    set currentDate to current date
    set currentDatePlus to (current date) + 1 * hours
    -- Update Times
    set content of control "startDate" of window "main" to currentDate
    set content of control "endDate" of window "main" to currentDatePlus
    on error
    display alert "There was a problem!"
    end try
    close panel "statusPanel"
    end clicked
    ----

    Thanks for the response,
    right now the window is in a seperate nib file. I was
    trying to follow the applescript studio example
    "Display Panel"
    Then you need to load it, look at the example, you see panelWIndow is declared as property:
    property panelWIndow : missing value
    then inside on click handler:
    if panelWIndow is equal to missing value then
    load nib "statusPanel" -- if your nib is statusPanel.nib
    set panelWIndow to window "statusPanel" --> that's AppleScript window name
    end if
    then you can use:
    display panel panelWIndow attached to window "main"
    What is the advantage / disadvantage of having more
    than one nib file?
    Not a whole lot in simple app, because you have to load it to use it.
    But in more complex apps, the advantage is that you don't commit run time memory, if the users don't use it.

  • AppleScript Studio + Sparkle Framework for auto updates

    I have sucessfully added the Sparkle framework to one of my Applescript Studio applications, but I'm having trouble finding out how to call a Cocoa method from within an Applescript. I need to live-update the interval at which Sparkle checks for updates. As of now I have to restart the app for the changes to take place.
    Here is the explanation from their documentation on how to do it...
    http://sparkle.andymatuschak.org/wiki/Documentation/PeriodicChecks
    +You might make a menu in your preferences to let the user specify this interval; just update SUScheduledCheckInterval in the user defaults with the user’s choice—a setting there will override one in Info.plist. You’ll need to let Sparkle know when the interval changes, though: *just call scheduleCheckWithInterval: on your SUUpdater (it’ll cancel the old one).*+
    I just don't know how to do this in Applescript. I'm assuming it's possible through the "call method" command, but I haven't been able to figure it out by myself.
    My best guess was the following...
    +call method "scheduleCheckWithInterval:" of object "SUUpdater"+
    Has anyone got this working before?
    Thanks for any help.

    Won't be a problem with AppleScriptObjC

  • AppleScript Studio Location?

    I downloaded the Xcode tools volume specifically for the Applescript Studio app. The only problem is, i can't seem to locate that app in particular in the volume . There are a dozen or so packages can anyone tell me which one contains it? I'd rather not install a whole bunch of stuff that i'm probably won't use or just test each one. I have all ready installed the Developer tools.pkg and it wasn't in there. Any help would be greatly appreciated.

    Hey,
    AppleScript Studio is a part of Xcode and not a seperate application. To create an AppleScript Studio project simply launch Xcode and select AppleScript Application as the project type when asked. If you are new to AppleScript Studio you might want to try googling for AppleScript Studio.

  • AppleScript Studio Quit Working

    Last December (2007) I followed the tutorials in the "Introduction to AppleScript Studio Programming Guide" to create a handful of demo projects, plus one of my own invention that actually worked!
    Today I sat down to resume my learning and I found that, while the target apps I had created still work, I cannot rebuild the projects. The error message is the same in every case:
    Tool:0: Command /usr/bin/gcc-4.0 failed with exit code 1
    Tool:0: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKit
    load command 19 unknown cmd field
    To reproduce the error, I...
    Open the project's folder
    Double-click on the <projectname>.xcodeproj icon
    Click the "Build and Go" button.
    Any idea what may have changed since last December?
    --Gil

    I just encountered a problem with my project that occurs under the same circumstances: open my project file, click on the build button, and it fails with the same error:
    /usr/bin/ld: /System/Library/Frameworks/WebKit.framework/WebKit load command 19 unknown cmd field
    collect2: ld returned 1 exit status
    I just ran an update to move to 10.4.11. I get the feeling that updated Webkit, and that's causing the problem. I'm on a PPC machine running XCode 2.1 but perhaps it's time to check out 2.5.
    For what it's worth, I found that I was still able to compile using "xcodebuild" on the command line. You might try giving this a shot. From the Terminal, cd into the project's directory; then execute "xcodebuild -alltargets clean && xcodebuild build" -- this will clean the current executable then build it.
    A couple questions for you: (1) What OS are you running? (2) What version of XCode? (3) What processor architecture (Intel or PPC)?
    That's all for now.. let me know how it goes..
    On a side note, I found your post through a Google search, and it's only a day and a half old... nice.
    (Update -- Ah... I see you solved the problem by upgrading to XCode 2.5.)
    Message was edited by: Krishen

  • AppleScript Studio - Huge .nib file?

    I'm creating my first AppleScript Studio application, and I've noticed that one of the nib files used in the project has grown to a huge size (20MB)... and I'm wondering why, and whether this is normal?
    (One other has grown to ~5MB, the other three are small ~50kB - around what I'd expect.)
    I do have two buttons that show icons - but the files are small ~100kB each... not enough to explain 20MB worth of nib. (Besides, I thought that the icon files are stored separately - they are copied to the resources folder by XCode.)
    It's not a huge concern at the moment, because everything works, and 20MB is not huge... I'm just concerned that such a simple App has an interface file that's 20MB (the entire app builds to 27.2MB, with 26.2MB of nibs... surely that's not normal?
    Any ideas?
    EDIT: Sorry, I should have mentioned that I'm using IB v 3.0 (629) on Leopard 10.5.2.
    Message was edited by: OSXAlex

    Michael,
    I guess you should be able to do this using a shell script and "curl" - the one problem with curl is that it won't honor your system's proxy settings...
    Andreas

  • Building a stand-alone AppleScript Studio application

    I’m taking a crack at building my first stand-alone application with AppleScript Studio. After many attempts to locate the needed “build” information in the various documentation resources I’m still pretty much poking around in the dark ...
    My application runs fine in the Xcode IDE. No problems. The application that Xcode saves in the project’s Debug folder runs too, (well, on the computer I developed it on) even if I move it out of its folder ...
    However, the app. doesn’t run on other macs. When double-clicked and it sorta fizzles without ever opening — wondering if the debug version relies on some resources within the project. I've installed it on a PowerBook and iBook, both running Mac OS 10.4
    I tried Build/Release. This also produced an application (in the Build/Release folder) which when failing to launch and causes the OS to burp, “You cannot open the application “My First App” because it may be damaged or incomplete.” This app will not run on my development computer or other laptops (PowerBook and iBook.)
    Build/Release also invoked three Xcode compiler error messages that seem to indicate that I need to change the NIB settings:
    /usr/bin/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Cocoa.framework/Coco a cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /usr/bin/ld: warning /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/AppleScriptKit.frame work/AppleScriptKit cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (file not loaded)
    /usr/bin/ld: warning fat file: /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib does not contain an architecture that matches the specified -arch flag: i386 (file ignored)
    Also got this warning(?):
    /usr/bin/ld: Undefined symbols:
    __keymgr_dwarf2_registersections
    _cthread_initroutine
    _atexit
    _errno
    _exit
    mach_initroutine
    _ASKInitialize
    _NSApplicationMain
    collect2: ld returned 1 exit status
    Also tried Clean All. Same result.
    I'm sure there's a simple step ... which I will remember well, 'cause I'm learning it the hard way.
    John

    However, the app. doesn’t run on other macs. When
    double-clicked and it sorta fizzles without ever
    opening — wondering if the debug version relies on
    some resources within the project. I've installed it
    on a PowerBook and iBook, both running Mac OS 10.4
    You're right. You can't move a debug version of the app to another computer unless you copy the entire project folder. The debug version of the app requires access to other by-products of the build process in order to run.
    Build/Release also invoked three Xcode compiler error
    messages that seem to indicate that I need to change
    the NIB settings:
    The following errors are not related to your NIB file. They indicate you're trying to link against the 10.3.9 frameworks on an intel CPU. The 10.3.9 frameworks are PPC only.
    /usr/bin/ld: warning
    /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Framew
    orks/Cocoa.framework/Cocoa cputype (18, architecture
    ppc) does not match cputype (7) for specified -arch
    flag: i386 (file not loaded)
    /usr/bin/ld: warning
    /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Framew
    orks/AppleScriptKit.framework/AppleScriptKit cputype
    (18, architecture ppc) does not match cputype (7) for
    specified -arch flag: i386 (file not loaded)
    /usr/bin/ld: warning fat file:
    /usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSyst
    em.dylib does not contain an architecture that
    matches the specified -arch flag: i386 (file
    ignored)
    [snip]
    Take a look at the suggestions I made in this thread to make sure your project is set up to build a universal binary and to ensure that you're linking against the 10.4 universal frameworks.
    Steve

Maybe you are looking for