Starting an applescript studio app

I have written an applescript. I want to incorporate it into an applescript studio app........mainly to make use of the progress bar indicator. How do I get the script to start without having to click on any buttons. Thanks.

Hook up your window (or the progress indicator) to the "awake from nib" handler in Interface Builder and insert your existing applescript code into the "on awake from nib theObject" handler that gets created in the AS Studio script.
Steve

Similar Messages

  • Applescript studio app and plist???

    Hi everyone!
    If I have an Applescript studio app and I don't write anything to a plist is it still possible the app will make it's own plist for any reason? Seems to be but I can't tell for sure because seems not to be consistent. Any help would be great!
    Thanks,
    Reg

    On second thought, the plist file might be created if
    you display something. I just did a clean install so
    everything's new. Let me check with one of the apps
    that displays a an open dialog or something.
    Yes there are certain things in AS Studio that will write to a plist file. One example I know of is if you give any of your windows an "Auto Save Name" (in the "Attribute" pane of IB's inspector pane). The "Auto Save Name" will be used as the key to a plist entry that auto-saves the window's size and position on screen. When you re-run your app the window will be opened with the size and location stored in the plist.
    I believe kel may also be correct that if your app displays an open or save dialog then some state information about those dialogs will be saved to your plist.
    You can always use "plutil" to convert the plist file from binary to xml and then display the contents to see what's in there...
    <pre>
    plutil -convert xml1 /path/to/file.plist
    cat /path/to/file.plist
    </pre>
    Steve

  • Applescript Studio app crashes with link error (dyld) image not found

    I've built a small Applescript studio app that works fine on the development machine but when I run it on other machines it crashes with a dyld error, specifically:
    Link (dyld) error:
    Library not loaded: /System/Library/PrivateFrameworks/ZeroLink.framework/Versions/A/ZeroLink
    Referenced from: /Volumes/Discover Your Mac Spotlight movie/Table of Contents Viewer.app/Contents/MacOS/Table of Contents Viewer
    Reason: image not found
    Does any one know why this happens and how I can fix it?
    Thanks very much in advance...
    iMac G5 20   Mac OS X (10.4.2)  

    Rick,
    looks like you built the application in "Development" mode - switch the build style to "Deployment" and most probably things will be fine in the other machine.
    Andreas

  • 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.

  • AppleScript Studio apps not Universal?

    I am using XCode 2.3 on a PowerBook G4 running Mac OS X 10.4.7.
    I have an application I have written in AppleScript Studio in that the only code I have written is all AppleScript code.
    I have set the Architectures in XCode to include BOTH PowerPC and Intel and the Target SDK is Mac OS X 10.4 Universal. I am running the "Deployment" build.
    According to http://developer.apple.com/documentation/MacOSX/Conceptual/universalbinary/universal_binary_compiling/chapter_2_section3.html this should be sufficient to produce a "Universal Binary". However the resulting Binary stubbornly shows itself as Application (PowerPC) in the Finder instead of Application (Universal).
    What am I doing wrong? Or is it that pure AppleScript Studio will always result in PowerPC as the benefit from Intel nativeness is so slight.
    Ah ha! Found the answer, I had to select "Upgrade All Targets in Project to Native" in the Project menu. This was not mentioned in the Apple documentation above.
    Message was edited by: John Lockwood

    Found answer myself. Need to select Upgrade All Targets in Project to Native.

  • Applescript studio app just quits

    hi, i made a cocoa app written in applescript using Xcode. but when i send the app to other computers, the app just opens then quits right away. but it works fine on my computer. any ideas?

    http://discussions.apple.com/thread.jspa?threadID=475738
    …loads OK here, there may be something amuck in the system? The first thing you should try is to Set Active Build Configuration on the Project Menu to 'Release,' then build your app. You should then find a release executable in your project folder that you can send instead of the debug.

  • 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

  • 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.

  • Create UI elements dynamically in AppleScript Studio?

    I'd like to create an applescript studio app that can create UI elements (radio buttons, checkboxes, etc) dynamically based on certain other criteria. I've been writing applescripts for a while but am somewhat new to applescript studio, so I don't know where to look for this, other than here. Any help would be greatly appreciated.

    that's what I thought. Unfortunately I'd like to have the ability to have no prior knowledge of what UI elements are needed, and call them into being at any time. So I'm gonna infer that that just isn't possible.
    Related question: can I set up a UI element, let's say a checkbox, and dynamically tell the UI element how many checkboxes I need and what their names/values should be? Or once again do I need to have prior knowlege of how many checkboxes I need?

  • 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 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

  • 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

  • Newbie help with sample Studio app. "Plain Text Editor"

    I'm trying to make the jump from AppleScript to AppleScript Studio, and because I want to eventually write a document producing application I thought I'd start with the textbook example "Plain Text Editor" included with Xcode. I think I see how menu items are connected to "Target/Actions," and I was able to build and run it without difficulty. It's remarkable how little AppleScript had to be written to produce a rudamentary text editor. But in playing with the built application, I noticed that the Revert menu item does not work exactly as expected.
    If you create a text document, and then make some change to it, and then click the Revert menu item, you get the expected little dialog asking if you want to revert to the most recently saved version, but if you then click the Revert button, the text displayed in the text view object does not revert to the original. However, something is happening, because whatever code is behind the Save, Close, and Quit menu items does seem to be "aware" that the Revert item has been invoked: because if you click one of these after Revert, the "do you want to save changes?" warning doesn't appear, just as one might expect.
    The Revert menu item seems to be connected to a "Target/Action" called "revertDocumentToSaved:" which sounds perfectly reasonable. But does the fact that Revert doesn't cause the displayed editing text to revert mean that (a) there is a bug in the code behind this Target/Action, or (b) that the writer of this textbook example just didn't bother to do everything needed for the Revert item to work in an intuitive manner?
    Whichever the answer, what would I do to make it work properely?
    It seems like there must be some sort of connection between the text view object in the editing window, and the Close, Save, Quit suite of menu items, because the behavior of these is dependant on whether or not there are unsaved changes in the text view object. But looking through the Inspector for this object, I don't see any, neither AppleScripts, nor Outlets, nor Target/Actions. Where and for what should I be looking?
    Dual 1.2 GHz   Mac OS X (10.4.8)  
    Dual 1.2 GHz   Mac OS X (10.4.8)  

    I think -- and I'm sure someone will correct me if I'm wrong -- that this is a place where AppleScript Studio's implementation just isn't done right. Either they intended to add a "revert" handler somewhere and forgot, or else they meant to have it send an existing message and didn't.
    I haven't done any document-based applications -- heck, I've only dabbled slightly in AppleScript Studio -- so there may be a "deeper" answer to this, but you might consider just hooking the menu item up to send its "choose menu item" handler to your document script, and have it react accordingly.

  • Open Design Studio app through BI Platform - Unable to find server in CMS FWM 01014

    Hello!
    I tried to start work with SAP BusinessObjects Design Studio,
    but there are some bugs with Studio apps & BI Platform:
    Design Studio add-on was installed to BI platform (4.1 SP2),
    after that I successfully connected from Studio to BI plaftorm and save some simple apps to platform.
    When I try to open app in platfform - ERROR:
    Unalbe to find server in CMS server_url:6400 and cluster @server_url:6400 with type pjs and service AnalysisApplicationDesignService.
    I found two SAP notes (in attachment) cause to this issue:
    1894504 - Design Studio - Support Note for BIP Add-On
    2058382 - Adaptive Processing Server containing Analysis Application service crashes
    Reccomendation in them doesn't help
    When I open Adaptive Proccesing Server properties in CMC and check services - there was no Analysis Application Design Service in Select services menu, but it must be there! (SAP note reccomend reconnect service to server)
    Is I am correct that something wrong with Design Studio Add-on?
    What could help?
    Please share your experience and ideas,
    Lest solve this!
    With regards,
    Sergey Marusiy

    Hi Manfred,
    Yes, it was released already (since some time in 2013),
    but it seems to be under revision at the moment.
    The note tells to create a new SIA and switch off the old one.
    We did it slightly different: We just added a 2nd SIA and kept the old one.
    The DesignStudio APS hosting the Analysis Application Service has to be created on the 2nd (new) SIA.
    This has the advantage that you don't have to do all the APS/AJS configuration again (APS split, command line parameters, etc.), since you keep the original SIA, but the disadvantage that you have a 2nd SIA to manage.
    The note mentions this as a workaround.
    The solution should be to run the script attached to the note and then the issue should be fixed, but in our case (and Sergey's) that didn't do the trick, therfore we us this workaround as a "permanent solution" (for the moment).
    Krgds
    Moritz

  • Visual Studio App Wizard won't install with Visual Studio 2005

    When I try run the Visual Studio App Wizard from the Acrobat SDK V8.1 on my PC it tells me 'Please install Visual Studio 2005 before install Acrobat 8 Plugin Wizard'. I have Visual Studio 2005 installed with SP1. I also have the .NET framework 2.0.50727 SP1 loaded. I see this same problem on two different PC's with the same software configuration loaded. Any known issues with that?

    I've never seen this happen. It's been a while since I last installed the
    v9 SDK and it's plug-in wizard, so I don't remember how the installation
    went.
    I do most of my plug-in work on the Mac, where there is no plug-in wizard,
    so I don't use it - not even on Windows. You do not need it to start a new
    plug-in: Just use either the Starter plug-in from the samples, or the
    BasicPlugin project. This will give you something that compiles and runs.
    Then do a few simple text replacements to give things the proper names and
    use that as your starting point. The wizard will give you a few more things
    in regards to HFTs, but it's not complicated or time consuming to do that
    by hand. The good thing about having to do this every now and then is that
    it keeps your memory fresh about how HFTs work.
    If you want to save yourself some time, create your own starter plug-in
    that you mark up with comments about what you need to replace and why - put
    all the stuff in that you usually need and then just use that every time
    you need to start a new plug-in. Setting up a plug-in framework is usually
    a very small portion of the time that you will eventually spent on the
    plug-in development, so using the wizard will not save you much in the
    overall development time.
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    [email protected]
    http://www.khkonsulting.com
    On Sat, Nov 3, 2012 at 12:55 PM, Ramon F Herrera

Maybe you are looking for

  • Unable to get my BG in HR:Position

    i've config my BG in Sys Ad:profile site level, but im unable to get this BG in organization column in positions form. and it also gives message "APP-PER-52803: YOUR BUSINESS GROUP DOES NOT MATCH YOUR SECURITY PROFILE" how can i appreciate you guys p

  • (solved)missing start menu icons

    did pacman -Syu yesterday and got a major upgrade. problem was i lost all my openoffice ,audacity.bzflag icons from the start menu. plus a few more. programs were still there, i could start them from the run command. just a little inconvenient that w

  • [SOLVED] Changing Directory Display in NCMPCPP Browser

    Is anyone familiar with an option to change how directories are displayed in NCMPCPP's file browser? The default surrounds a directory with brackets, i.e. [Boards of Canada] [Califone] [Department of Eages] I can't find an option to disable or change

  • 9i client installation program "hangs up"

    Hope some one can help with a problem I encountered while trying to install the version 9 client on my windows machine. I downloaded the version 9 client for windows (twice to be sure it was not a corruption issue). When install it using the oracle i

  • Embedded ActiveX in a Flex app

    We have a requirement to embed a signed ActiveX control in both a Flex and an AIR application. Flex does not support HTML content, but AIR does, but it still filters out the Object tags. We are looking for some help to see how we can achieve this, ei