Scripting studio questions... - Help!?

Hello, I've got two questions, both regarding applescript studio.
Q1: How can one execute applescript code without pressing a button etc.
Easy example: If I would like to display the default dialog with xcode's applescript, I would write "display dialog". But it doesn't display the default wanted dialog (just the app's window).
Q2: How do I retrieve every word of a Text view interface component?
Better asked. I would like to count all the words entered and have every word with a unique value, like the first word have the integer value of 1 the second word 2 the third 3 ...
Help (of any kind) is dearly appreciated!

You might be having a problem defining the Text VIew, so I will start from a blank application template.
Double-click the MainMenu.xib file to open it in *Interface Builder*, then add a Text View to the application window and size it as desired. Clicking in the middle of the Text View will select the Scroll View part, and clicking again near the top will select the Text View part. With the Text VIew selected, go to the AppleScript Inspector, choose the script that you want to use your Text View in and give the Text View a name (for example "myTextView"). You can give names to the other user interface items if desired - in this example there is only one of each item so their indexes can also be used (e.g. "window 1"). Usually a name will be more clear, but I used a couple of different ways to specify the Text View.
To add some delegate handlers, I selected the *end editing* event handler for the Text View, and the launched event handler for the application (don't forget to set the script). Once everything is defined in Interface Builder, I filled in the event handlers with some log statements to show what is happening (open the Console when build/running the application):
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFCE75;
overflow: auto;"
title="this text can be pasted into Xcode 3.1.x (Leopard)">
on launched theObject
log "launched..."
tell window 1
set contents of text view 1 of scroll view 1 to "This is some testing text - some testing text this is."
end tell
display dialog "This is a test dialog"
end launched
on end editing theObject
log "end editing..."
set theWords to words of (get contents of text view "myTextView" of scroll view 1 of window 1)
log result
end end editing
A test dialog will appear when the application is first run (launched), and pressing return in the Text View (which ends the editing) will log the words of the content to the console.

Similar Messages

  • I keep getting error messages that a script "may have stoped responding", The script in question is "contentAreaUtils.js".

    I just updated to FireFox v3.6.8, after using v3.5 successfully for many months. With the new version I keep getting error messages that a script "may have stopped responding", The script in question is "contentAreaUtils.js". My OS is Win2k SP4, with 253,424 KB RAM.
    Is there a known fix. If not, is there an easy way to revert to FireFox v3.5 ?

    Attached is an image of the error message.

  • Strange glitch in my script. Please help!

    I've been working on a script that would help a friend of mine to prep photos for his web-site. It was working just fine until after some small change it suddenly started telling me this: "Cannot open the file because the open options are incorrect". The ExtendScript Toolkit highlights line 44:  var doc =;
    I've looked at all variations of the; function but can't seem to understand what is wrong.
    I'm hoping someone will notice the problem. Thanks in advance!
    #target photoshop
    var outputWidth = 1500; 
    alert("You will now need to select a folder with photos to be processed.");
    var inputFolder = Folder.selectDialog("Select Input folder");
    // Creating a new  subfolder based on user input
    var outputFolder = new Folder(inputFolder + "/" + "PROCESSED"); 
    var Destination = outputFolder.path + "/" +;
    // Replacing %20 with space for clean alert
    var CleanDestination = Destination.replace('%20', ' '); 
    var CleanerDestination = CleanDestination.replace('%20', ' '); 
    var startRulerUnits = preferences.rulerUnits; 
    app.preferences.rulerUnits = Units.PIXELS;
    // our web export options
    var options = new ExportOptionsSaveForWeb();
    options.quality = 70;
    options.format = SaveDocumentType.JPEG;
    options.optimized = false;
    options.includeProfile = true;
    if (inputFolder != null && outputFolder != null) { 
        var files = inputFolder.getFiles(); 
        for (var i = 0; i < files.length; i++) { 
            var file = files[i]; 
            var doc =; 
            // get a reference to the current (active) document and store it in a variable named "doc"
            doc = app.activeDocument; 
           //get the filename without the extension 
            var Name =\.[^\.]+$/, ''); 
           if (doc.height > 1000) {
    //build up the output file name and path 
             var goodFolder = new Folder(outputFolder + "/" + "READY FOR WEB"); 
            var saveFile = File(goodFolder + "/" + Name + "-web" + ".jpg"); 
    // do the resizing.  if height > width (portrait-mode) resize based on height.  otherwise, resize based on width
            if (doc.height > doc.width) {
            else {
    else {
       //build up the output file name and path 
            var smallFolder = new Folder(outputFolder + "/" + "TOO SMALL"); 
            var saveFile = File(smallFolder + "/" + Name + ".jpg"); 
            doc.convertProfile('sRGB IEC61966-2.1', Intent.RELATIVECOLORIMETRIC, true, true);
            //you need to have a full filepath not a folder 
            doc.exportDocument(/*outputFolder */saveFile, ExportType.SAVEFORWEB, options); 
            $.writeln('File ' + (i + 1) + ' of ' + files.length + ' processed'); 
    //restore ruler units 
    app.preferences.rulerUnits = startRulerUnits; 
    alert(files.length + " files have been processed into " + CleanerDestination);

    Right before var doc =;  fails to execute, the value of var file is "~/Desktop/Input/.DS_Store", where Input is my folder with images.

  • JSP1.2 scripting variable! help!!

    JSP1.2 scripting variable! help!!
    Posted by: Tony Liu on August 18, 2005 @ 03:06 PM
    TOMCAT5/jsp1.2. I am using custom tag to expose a variable�Cthen a jsp script references an object that tag exposes. However, error happens to me always. "variable cannot be resolved". looks it cant expose the variable to jsp page.
    My code:
    TLD file:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 90 in the jsp file: /Tony/amvetsform.jsp
    Generated servlet error:
    method cannot be resolved
    Who could let me know what's wrong with it? Bug from Tomcat? Or, I missed something to produce a scripting variable for jsp? It was supposed to be easy to expose a variable....
    Thanks in advance.

    A bit more info please.
    How are you using this with your tag?
    The code from your JSP with
    - your custom tag being used
    - where it is in relation to your scriptlet expression.
    The "name-from-attribute" means that the name of the created variable is defined by the "method" attribute of your tag.
    <my:tag method="theNameOfMyVariable">
      <%= theNameOfMyVariable %>
    </my:tag>Where do you use the variable in relation to where the tag is?
    Declaring it AT_BEGIN means that it is available from the start tag to the close of any enclosing custom tag.
    It won't be a bug in Tomcat. Always assume it is a problem with your code. 99.99% of the time, that assumption is correct.

  • Apple id is disabled, to reset the password I do not know the email and security question. help what to do?

    apple id is disabled, to reset the password I do not know the email and security question. help what to do?

    Hi ingaosk,
    Thanks for the question. Based on what you stated, it seems like you did not receive the reset email. I would recommend that you read this article, it may be able to help you isolate or resolve the issue.
    If you didn't receive your Apple ID verification or reset email - Apple Support
    Thanks for using Apple Support Communities.

  • HT1349 I for get security question help my too rest , send to my mail :

    I send email for serves and send to my by email ling I tray eat not help my to rest my security question .
    No we to send security question to my email or what I down I tray from many days
    The serves send that and it,s not help : read it
    The following information for your Apple ID *********** was updated on 02/03/2013:
    Phone number(s)
    If these changes were made in error, or if you believe an unauthorized person accessed your account, please reset your account password immediately by going to
    To review and update your security settings, sign in to
    This is an automated message. Please do not reply to this email. If you need additional help, visit Apple Support.
    Apple Customer Support
    Tel my what I do I need my program and my many in my account and wan I need to seal program he asking security question , what I do
    I for get security question help my too rest , send to my mail : ***********
    <E-mail Edited by Host>

    Do not post your email adress here.
    Open your browser and go to and follow the instructions there.

  • Can send me recent real time sap script interivew question?

    Hi any one plz send me the real time sap script interivew questions... or mail me on [email protected]

    Please check the links,
    FAQ on Scripts
    If this data isn't enough, then you can search for SAP script interview questions in SDN, you get more results.
    Reward points if it is useful.

  • HT201363 I forget security question, help me recover?

    I forget security question, help me recover?

    You need to ask Apple to reset your security questions; ways of contacting them include phoning AppleCare and asking for the Account Security team, clicking here and picking a method for your country, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.

  • About Java 2 opaque font color question, help needed!

    About Java 2 opaque font color question, help needed!
    I was trying to test opaque font (the string has a foreground color and a background color), but i can't find the method for doing that.
    i can change foreground by Graphics2D.setPaint(
    Anybody know how to change the background of the string?

    Hi. The way I'd do it would be to use the font metrics to find the length of a string and draw a rectangle and then drawstring over the rectangle. If you want an example, I can post it although I suspect theres a better way.

  • I forgot my security queStions help me!

    I forgot my security queStions help me!

    If you have a rescue email address set up on your account then you can try going to and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address set up then go to Express Lane  and select 'iTunes' from the list of 'products' in the middle of the screen.
    Then select 'iTunes Store', and on the next screen select 'Account Management'
    Next choose 'iTunes Store Account Security' and fill in that you'd like your security questions/answers reset.
    You should get an email reply within, I think, about 24 to 48 hours (and check your Spam folder as well as your Inbox)

  • Sister was using my iPod, she changed Apple id to hers, then forgot the iTunes password, now it's disabled she doesn't know what backup email she use or the security questions HELP can Apple reset my iPod?

    sister was using my iPod, she changed Apple id to hers, then forgot the iTunes password, now it's disabled she doesn't know what backup email she use or the security questions HELP can Apple reset my iPod?

    Is there a way to find my Apple ID Name if I can't remember it?
    Yes. Visit My Apple ID and click Find your Apple ID. See Finding your Apple ID if you'd like more information.
    How do I change or recover a forgotten Apple ID Password?
    If you've forgotten your Apple ID Password or want to change it, go to My Apple ID and follow the instructions. SeeChanging your Apple ID password if you'd like more information.
    Forgotten Security Questions/Answers
    You need to contact Apple by:
    1 - Use the Express lane and start here:
    then click More Products and Services>Apple ID>Other Apple ID Topics>Forgotten Apple ID security questions.
    Apple - Support -form iTunes Store - Contact Us
    2 - Call Apple in your country by getting the number from here:
    Apple ID: Contacting Apple for help with Apple ID account security
    3 - Use your rescue email address if you set one up
    Rescue email address and how to reset Apple ID security questions
    For general  information see:
    Apple ID: All about Apple ID security questions

  • HT5312 forgot the answers to security questions. help.

    forgot the answers to security questions. help.

    Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • Issue with Proportional Spreading Script. Please help !

    I have a requirement where I need to write a spreading script for a data form. On this form user will enter data at a parent level and what the script needs to do is spread the parent level input value to the 0 level members proportinally based on the values already existing in the 0 level members.
    Say the account member is “X”. All the other members on the data form in the POV/Page/Rows and Columns are 0 level members except for one that is Product which is in the Page
    - A
    - B
    I came up with this basic logic for the proportinal spread. Ofcourse I will need to include some logic with IF statement or something else to check if the cell belongs to product A or product B. For now, assuming the value is being input for A so now we need to spread that value at A to 0 level members proportionally.
    “X” = ((“X” -> (@CURRMBR(“Product”)*100)/(Previous Parent Value *100))*”X”->”A”
    Example with numbers:
    Current member cell value = 100 (0 level member for Product A)
    Previous Parent Value = 200 (Value for A)
    New Parent Value = 400 (User inputs this new value by overwriting the previous value 200)
    So, X = ((100*100)/(200*100))*400 = 200
    Now, the logic of the formula makes sense to me and would spread proportionally, but my question is how would we get the “Previous Parent Value to calculate the % as the user will overrite it with a new value = 400 before running the rule. So, we would not have 200 anymore and unless we have it we wont be able to know the % to do a proportional spread.
    I apologize if this is confusing, but please help me with your ideas on how can I achieve this proportional spreading script. I would really appreciate your inputs.
    ~ Adella

    Have you not asked this earlier?
    Business Rule - Allocation Script Logic - Not working ! Please help.
    But in hindsight, I think there's a little problem with the script I had posted. This was what I suggested:
    FIX(“AccountMember”,”FY11”,”EntityMember”,”Local”,”Working”,”BU”,@LEVMBRS(“Product A”,0),@LEVMBRS(“Product B”,0),”Current”,@LEVMBRS(“Dept”,0),LEVMBRS(“Customer”,0))
    &Currmonth = @PARENT(Product)*(&Currmonth/@SUMRANGE(&Currmonth,@RELATIVE(@PARENT(@Currmbr(Product)),0)));
    ENDFIX;The problem I see here, every time the script calculates a product, the total of the siblings of the product changes and when it calculates the next product, allocation is done based on a different different total. To overcome this, you can try it this way:
    FIX(”FY11”,”EntityMember”,”Local”,”Working”,”BU”,@LEVMBRS(“Product A”,0),@LEVMBRS(“Product B”,0),”Current”,@LEVMBRS(“Dept”,0),LEVMBRS(“Customer”,0))
    /*copy original values to somewhere else to make sure allocation base doesn't change*/
    FIX("AccountMember",”FY11”,”EntityMember”,”Local”,”Working”,”BU”,@LEVMBRS(“Product A”,0),@LEVMBRS(“Product B”,0),”Current”,@LEVMBRS(“Dept”,0),LEVMBRS(“Customer”,0))
    &Currmonth = @PARENT(Product)*(&Currmonth->"AccountMemberAllocBase"/@SUMRANGE(&Currmonth->"AccountMemberAllocBase",@RELATIVE(@PARENT(@Currmbr(Product)),0)));

  • Studio MaxL Help

    Hi Experts,
    Currently i am loading the ASO cube using essbase studio maxl script.
    Could you please help me what script i have to attach to this *"to enable query tracking and to use already saved aggregation list*".
    *"deploy data from model 'XXXX' in cube schema '\XXX' login 'XXX' identified by 'XXX' on host 'XXX' to application 'XXX' database 'XXX' overwrite values use streaming build using connection 'XXXX' keep 200 errors on error ignore dataload write to default;"*
    Please kindly help me to achieve this issue.

    After your deploy command add
    Alter database xxxxx.yyyyy enable query_tracking;
    execute aggregate build on database xxxx.yyyy using view_file xxxxxx;

  • Arch64 sounds studio -OR- help get me out of FC3

    Hey everybody,  It's been a while since I've been on the messageboards.  My computer died before I went on vacation, and on my return I decided to set up a Linux recording studio.  I decided to go with the Planet CCRMA version of FC3 so I could see what they consider to be "proper function" for their audio apps.
    So I've pretty much got it, and I still hate RPMs.  I'd also like to take advantage of my 64-bitness, but since I haven't been around, I don't know how Arch 64 is going.  My rig:
    Athlon 64 3000+
    1GB dual channel DDR
    NF4-SLI motherboard
    Geforce 6600GT 128MB PCIe
    100GB ATA WD HDD - OS
    120GB SATA WD HDD - Music library
    200GB SATA Samsung HDD - Recording
    BenQ DVD-RW
    RME HDSP9652
    I'm using a Presonus DigiMAX 96k as mic preamps, with ADAT lightpipe into the HDSP9652.  I'm wondering if there are any people out there doing similar things on Arch64, and how it's going for them.  Questions:
    1. Can I usually just recompile most Arch packages and have them work, or are those the exception?
    2. Does anybody have Ardour up and running with the LADSPA plugins listed at the CCRMA site?  How about with RME hardware? … world.html
    3. I see there's a wiki entry for installing Arch64, but there's also an install CD at  Should I just be able to install off the CD like I do the normal Arch CD?
    If I get up and running, I'll be happy to maintain apps I use and I wouldn't mind using my computer as a compiling box for 64-bit stuff.  Apps I use (some better than others):
    Anyway, any help would be appreciated.  I wouldn't mind that much just running i686 Arch for the time being.  I'm looking forward to being back in Arch again.

    I'm in Arch again.  AaaaahHH!!! Thank God.  it's like, you can f8king tell it what to do, and it DOES IT!
    Oh, my.  I am flush with the glory of Ardour working without any tweaking!  FLUSH!
    No 64 bit yet, but soon to come.  WEEE!

Maybe you are looking for