Display dialog, getting both text returned and button returned

I am most of the way through my first major project in applescript. I want to get both the text returned of and the button returned of a dialog box. Is this possible?
So basically i want to do the below without having the dialog box run twice.
set thebutton to the button returned of (display dialog "Already Assigned!" & return & "Please assign a new letter" default answer "…" buttons {"Cancel", "Delete Previous Location for this Letter", "OK"} default button "OK")
set theLetter to the text returned of (display dialog "Already Assigned!" & return & "Please assign a new letter" default answer "…" buttons {"Cancel", "Delete Previous Location for this Letter", "OK"} default button "OK")
Rich

Well thanks for the fast response, both work fine, cheers. That problem is now sorted.
However while i was waiting for the responses i came across another problem, i would like to delete a specified item from a list. This is not the actual script but i was using it to test the syntax. So basically how would i go about deleting the the letter P from a list PQ
set letterlist to {}
display dialog letterlist as string
set namep to "P"
copy (namep) to end of letterlist
set nameq to "Q"
copy (nameq) to end of letterlist
display dialog letterlist as string
set theKeyPressed to "P"
repeat with each_item in letterlist
if each_item contains theKeyPressed then
delete each_item
end if
end repeat
display dialog letterlist as string
Rich

Similar Messages

  • How to get both, the ResultSet and Output (return value) from Oracle Stored Procedure

    Hi! I am doing a conversion from MSSQL to Oracle with C++ and MFC ODBC. Any comment is appreciated!! I have Oracle 8i and Oracle ODBC 8.1.6 installed.
    My question is how to retrieve the return value AND ALSO the resultSet at the same time by using Oracle function without modifying my souce codes (except puttting mypackage. string infron of my procedure name, see below).
    -- My source code in C++ with MSSQL ....
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    Where CustoemrList is a Crecordset object...
    IN DoFieldExchange(CFieldExchange* pFX) I have ...
    //{{AFX_FIELD_MAP(CQOSDB_Group)
    pFX->SetFieldType(CFieldExchange::outputColumn);
    RFX_Long(pFX, T("Name"), mCustoemrName);
    //}}AFX_FIELD_MAP
    // output parameter
    pFX->SetFieldType( CFieldExchange::outputParam );
    RFX_Int( pFX, T("IndexCount"), mCustomerNumber);
    -- m_CustomerNumber is where i store the return value!!!
    -- In Oracle Version, i have similar codes with ...
    sqlStr.Format("{? = call mypackage.ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    -- I have oracle package/Body codes as following...
    create or replace package mypackage
    as
    type group_rct is ref cursor;
    Function listgroups(
    nameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct ) return int;
    end;
    Create or replace package body mypackage
    as
    Function listgroups(
    NameID NUMBER ,
    RC1 IN OUT Mypackage.group_rct )return int
    IS
    BEGIN
    OPEN RC1 FOR SELECT Name
    from Customer
    WHERE ID = NameIDEND ListGroups;
    END
    return 7;
    END listgroups;
    END MyPackage;
    Ive simplified my codes a bit....
    null

    yes, it is exactly what i want to do and I am using Oracle ODBC driver.
    I tried using procedure with 1 OUT var fo numeric value and the other IN OUT ref cursor var instead of function, but error occurs when I called it from the application. It give me a memory ecxception error!!
    sqlStr.Format("{? = call ListOfCustomers(%i)}", nNameID);
    RcOpen = CustomerList.Open(CRecordset::forwardOnly, sqlStr, CRecordset::readOnly );
    it seems to me that the ? marker var is making all the trouble... can you please give me any more comment on this?? thanks!
    null

  • After aborted rebuild in Mail: I can see and select the message in the center pane and when I click on it to display, I get "Loading" text, but nothing comes up

    I have searched quite a bit to find a resolution to this problem, with no success. Any help would be appreciated.
    I decided to rebuild my inboxes by following this advice: http://support.apple.com/kb/PH11704. The rebuild took several hours and at 96% (4 minutes remaining apparently), the indexing froze (that is, after 8 hours, the message was still telling me "4 minutes left"). I forced quit mail, restored the previous Envelope files from the trash, and everything seemed fine.
    However, since this failed attempt, I can see and select the message in the center pane and when I click on it to display, I get "Loading" text, but nothing comes up. All messages in my various inboxes have the reloading problem, EXCEPT messages that I downloaded since the aborted rebuild (in other words, there are about 40 messages that I downloaded since I tried the rebuild and I have no problem with these). The other 70,000 messages however wont load, even though I can see them in the centre pane and spotlight has no problem finding them and showing me their contents (when I hover the mouse over the message). When I click on the message in spotlight, mail opens and the loading problem re-occurs.
    Since then, based on various suggestions I found for similar issues, I have used Disk Utility to verify and repair permissions and the drive. I used Onix to rebuild the Mail index (that only took about a minute - I am not sure how to interpret this when compared to the hours the rebuild took with Mail). No joy, I still have the same problem. I even restored one of my inboxes via Time Machine and the same issue with loading continues.
    I am using ML 10.8.2. I have a combination of IMAP accounts (work) and POP accounts (personal). The issue of loading occurs irrespective of the account.
    I am baffled and am now considering migrating to either Thunderbird or Postbox 3 to try and solve my problem. I prefer to stay with Mail. I should note also that I am using MailTags with Mail (http://www.indev.ca/MailTags.html), although I have not used any of the features. I upgraded to ML from SL about 2 weeks ago. It was very smooth and there appear to be no issues (not sure how helpful this is and probably not at all related to this issue).
    Any suggestions much appreciated!

    Maybe these will help:
    https://discussions.apple.com/message/17677533#17677533
    https://discussions.apple.com/message/18324129#18324129
    https://discussions.apple.com/message/18203126#18203126

  • In popup step how do I get the "text on the button" in the report rather than button index?

    (1)
    How do I configure the POPUP step in "SEQ MAIN.seq" to execute the second
    step (IS OUT PUT IS 20?) in "SEQ 1.seq" when "IS OUT PUT IS 20?" button
    hit and execute the third step (IS OUT PUT IS 30?) in "SEQ 1.seq" when "IS
    OUT PUT IS 30?" button hit.
    (2)
    In popup step how do I get the "text on the button" in the report rather than button index?
    File attached
    Attachments:
    test_stand.zip ‏32 KB

    The handle to the Step.Button1Label gets you the data, but there are several ways to get it into the actual report.
    The easiest is to use the reporttext.
    In a post expression, you can use something like
    Step.Result.ReportText = Evaluate("Step.Button" + Str(Step.Result.ButtonHit) +"Label")
    and then the default report generation will include it in the report. Otherwise, you need to get the text into the Resultlist by various means (check the user manual, or the TestStand II customisation course) and handle the report generation yourself inside of the appropriate sequence in the process model.
    Just my 2cents
    S.
    // it takes almost no time to rate an answer
    Attachments:
    IncludeButtonTextInReport2_0.seq ‏18 KB

  • From which table ,i ll get both the invoice and cleared amount ???

    Hi Friends,
    i am making a report for my sales client where finance part is also required.
    the requirement is : the sales people want know the status of the invoice generated at their end.the report shud be like if they enter the invoice no,fiscal year and coustomer they will be able to see the status of the invoice.how much pmt has received for that particular invoice,wheather it is open or fully cleared?
    From which table i can get both invoice no. and the payment/pmts rerceived against that invoce/invoices.
    plz guide.
    Regards,
    Biswa

    Hi,
    SAP Standard Report itself covers all the requirements mentioned.  With FBL5N, we get to know how much has been invoiced, paid and cleared and how much advance has been paid by customer etc., in one screen.  Apart from this we have also all signs which show, which all invoices are due, overdue and its easy to analyse as well.
    Was this requirement given by client after seeing this standard report?
    Hope this info is helpful.
    Regards,
    Venkat

  • How to get both OTF data and spool at a time

    Hi Experts,
        My requirement is to get both OTF data and spool.
    In 'OPEN_FORM' i tried passing itcpo-TDGETOTF = 'X'. itcpo- TDNEWID = 'X'.
    I was able to get OTF data but spool is not getting generated.
    IF i pass only itcpo- TDNEWID = 'X'. the spool is getting generated but not OTF data.
    when both the fields are set i.e. itcpo-TDGETOTF = 'X'. itcpo- TDNEWID = 'X'.
    the spool is generation is getting supressed.
    Similarly when i tried to get OTF data by passing itcpo-TDGETOTF = 'X'. to 'OPEN_FORM' as i need to convert it to PDF and send it to vendors as email ,
    The print preview in TCODE ME23n was not getting generated for 'MESSAGE' option 'External send'.
    Please suggest me how to get both OTF data and spool at a time.

    Hi Kartik,
    This one is similar to my question to print and email invoice at same time.  I pass itcpo-tdgetotf = 'X' in order to get otfdata and send email with the attachment of otfdata.
    Now I have data in otfdata, but when I call print_otf function, I clear out itcpo-tdgetotf, and passed
    itcpo-tddest = device_type but I still get error message said 'Handler not valid for open spool request'.
    Can you give me a working example that you have otfdata table and print data from that table.  I also post my question on other thread
    submit report and export to memory
    thanks

  • I already have Lightroom 5.6, but would like to get both Photoshop CC and Lightroom on the monthly rental, how can I do that please?

    I already have Lightroom 5.6, but would like to get both Photoshop CC and Lightroom on the monthly rental, how can I do that please?

    Hi,
    You can subscribe through the Adobe Website: Creative Cloud pricing and membership plans | Adobe Creative Cloud this is the US site where the plan is $9.99 per month but just choose the website for your region if you are not in USA.
    Don.

  • Development of Form for Returnable and Non-returnable material Gate pass

    Dear Experts,
    I am working with an Indian client impementing SAP PM. I need help in developing a form for Returnable and Non Returnable Gatepass. Requirements are below;
    RGP/NRGP should be made for all materials going out of the factory, irrespective of it being coded or not
    It should be plant specific
    It should have reference to material movement document for tracking purpose
    It should have details of vendor, transport company, vehicle number, permits if required, etc
    A Z report should give details of all RGP/NRGP based on material document number and date
    Please guide me based on your experience.
    Thanks,
    Boby

    Boby,
    This can be met. But before developing this, have you implemented the refurbishment process of PM module? This will really help in tracking the equipment and also for the development of RGP/NRGP.
    First you have to create a form for the gate pass  and have to create an enhancement in MIGO for triggering the RGP/NRGP, else you can also create a separate Z transaction code for printing the Gate pass. You will get all the fields like vendor, material, QTY, movement type from the MIGO GI document. 
    For the gate pass the MIGO document will be the reference all the times, you can also develop a Z report for the records for the gate pass.
    Regards,
    Praveen

  • Command+Return and Shift+Return keyboard shortcuts stopped working

    I'm using Firefox 4.0 on a 21.5" iMac running Mac OS X version 10.6.7. Just this morning, the command+return and shift+return keyboard shortcuts to auto-complete the .com and .net addresses of websites stopped working. Command+w still closes a tab, and command+left click still opens a tab in a new window. However, when I type anything in the address bar ("mac" for example) and then hit command+enter, Firefox opens up a new tab with a Google search for the word I typed. The address for this new tab is as follows:
    http://www.google.com/search?q=mac&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
    Any idea what gives? I'm rather perplexed and frustrated.

    Just removed OmniBar and the problem went away.

  • Getting the text of a Button when it is being read as a Node. Looping VBox

    I'm learning JavaFX and this is just a small programming question.
    I have 3 buttons in a VBox. And I want to apply the same 3 effects on all buttons after I put them in the Vbox. But when I use a for loop and getChildren() on the VBox, they are returned as 'Nodes'. I can't use the Button.getText() to find out the text of the button.
    Is there a way I can getText of a Node? Or maybe convert the current Node to a Button and get the text that way?
    VBox vbox = new VBox();
    Button option1= new Button("First Button");
    Button option2= new Button("Second Button");
    Button option3= new Button("View Rules");
    vbox.getChildren().add(option1);
    vbox.getChildren().add(option2);
    vbox.getChildren().add(option3);
    for (final Node button : vbox.getChildren())
    button.setOnMouseEntered(new EventHandler<MouseEvent>()
    @Override
    public void handle(MouseEvent arg0)
    button.setEffect(addEffect(Color.web("#53CFA6"), .8, 10));
    button.setOnMouseExited(new EventHandler<MouseEvent>()
    @Override
    public void handle(MouseEvent arg0)
    button.setEffect(addEffect(Color.web("#FF6800"), .8, 10));
    button.setOnMouseClicked(new EventHandler<MouseEvent>()
    @Override
    public void handle(MouseEvent arg0)
    button.setEffect(addEffect(Color.web("#E62800"), .8, 10));
    //Need to use button.getText()
    //Button button; button.getText() works
    }

    Hello user,
    You should have formatted your code properly. Look in the forum guides to format the codes.
    For getting the instance of Button , You need to do it safely
    There are two ways to get instance of Button.
    for (final Node button : vbox.getChildren()){
         Button b = null;
         if(button instanceof Button){
              b = button;
         if(b != null){
              //Do your stuffs here
    }Or You can even do like this too
    for (final Node button : vbox.getChildren()){
         Button b =null;
         try{
              b = (Button) button; //casting the class
         catch(ClassCastException e){
              e.printStackTrace();
         if(b != null){
              //Do your stuffs here
    }Thanks
    Narayan

  • Should I get both a Macmini and 15" Macbook Retina?

    Hi,
    I am a looking to switch from PC to Mac. At present I am faced with the dilemma of whether to purchase a two mac setup. Tradtionally I have been a desktop and a laptop person. In undergrad that is what I had and now that I am in gradschool(and working full time) I find myself both at my desk and in class. Since my desktop is about to die ( 7 years old), this is going to be a decision that happens soon. 
    What I am contemplating is the following set up
    rMBP 15"
    - 2.7ghz
    - 256GB SSD
    - 16GB Ram
    +
    mac mini
         - 2.6 ghz
         - 1TB HDD+ 256GB SSD (installed by certified tech)
         - 4GB Ram (upgraded post purchase to 16GB
    +
    Apple's Georgous display (I have a left over monitor I will daisy chain at the end)
    +
    Superdrive &  some external storage.
    I am also a photographer so I run photoshop and lightroom, but I have heard that the mac mini would be smoked by the rmbp. To complicate matters I need to run windows in parallel so that I have access to MS Access, ESRI's ArcGIS mapping software, and some coporate apps for work when I telework.
    So what should I do. I have play around with the idea of getting the bigger SSD on the rmbp and dropping the mac mini, but I love having computer redundency and have a boat load of data so regardless something is going to be left on my desktop. In an ideal world I would have the option of picking a MacPro, but they are so out of date now that I don't want to invest in that.
    Any advice you provide would be most welcome.

    My opinion:
    The rMBP should serve you well for your photography. The Mac Mini would serve you well as a server to house data files and allow you to connect to it to retrieve the files without carrying around portable USB external drives.
    I have both an early 2012 rMBP (i7, 2.3GHz, 8GB, 256GB SSD) and late 2012 Mac Mini (i5, 2.5GHz, 4GB Ram, 500GB HDD). I use the rMBP every day and I installed OS X Server ($19.99 from App Store) on the Mac Mini so I can have a server. I run the File Sharing, VPN, Time Machine and Open Directory services on the Mac Mini. I have two USB 3.0 500GB external drives that I alternate with Time Machine to back up both the rMBP and Mac Mini. I also added a 120GB SSD to the Mac Mini and created a Fusion Drive that combines both the SSD and HDD into one Logical Volume Group. The SSD really speeds up the Mac Mini and the combination using the built in OS X Mountain Lion CoreStorage, manages my space needs without me manually moving files around. So, I have a networked day-to-day computer (rMBP) that is mobile and I have a home server that houses my iTunes music and data files so I don't use up the 256GB of SSD storage on the rMBP. That space is plenty for me and day-to-day files.
    If you're trying to choose between the two, I think the rMBP would be the better choice for what you do. You can always add portable external USB drives (USB 3.0) to house large data files and take them with you.

  • I accidently synced my phone to my dads itunes account, so when he went to 'backup' his phone, he got all of my photos and text messages. How do I get his text messages and photos back?

    When I first got an iPhone, I didnt have my own iTunes account. So in turn i used my Dads. Well being unaware of what i was doing, I synced my iPhone to his account. Well a couple of months ago, i started using my moms apple ID to buy things in the app store, and i started recieving her text messages. Now my dad, has plugged his phone into his itunes account and has synced it and has all of my photos, his contacts are still there, but he has all of my apps, all of my text messages and has all of my photos. What can i do to get his things back? And stop getting my moms text messages. I really would like some help on this please Thanks!!!

    Not a good idead to share IDs
    Read http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    Read Sharing an Apple ID with your Family
    Does your father have a recent backup of his phone?  If so restore his phone from that.  Please not that everythign created on th ephone since the backup was made will be lost

  • If my apple receives my secondary emails in the inbox, then my iphone doesn't and vice versa. I can't get both to receive and send email messages.

    It has taken me 18 months to get my secondary emails to show up on my Apple mail server. Now my iphone mail service for that account won't work. How can I get both to work at the same time?

    This method of finding answers is way too time consuming. It is just adding to what I have to research in order to use my products. Now, I'm spending time browsing the webpages in search of information on deleting a question. And I didn't find my answer based on this method of solving problems.

  • Problem with action script 3 make input text box and button....

    Hi every one I am trying to make a family book using "Air for Android" with a simple search engin in the book
    air for android only work with AS3,
    the search function is to type a person's name and hit submit then go to a specific frame.
    have a problem making below code to work in AS3 and hopefully one of you guys can lead me in the right direction to fix the issue.
    Currently, I have an input text box and a button. When you type specific words into the input box and then hit the button it sends you to a specific frame.
    (it work find in AS2 but not in AS3,)
    Here is my current code that is placed on the main timeline, first frame:
    stop();
    onEnterFrame = function () {
        submit.onRelease = function() {
            switch (yourname.text) {
            case "name1" :
                gotoAndStop(2);
                break;
            case "name2" :
                gotoAndStop(3);
                break;
    My button that checks if the phrase is correct is called "submit" and my input box has an instance of "yourname".
    My phrases that will be accepted in the input box are "name1" and "name2" which bring me to two different frames.
    Basically, I'm having a problem with making this to work with AS3.

    you should use the default option in the switch statement
    that way yourname contains something not in one of the case statements it will go to the default bit and execute teh code there
    function onSubmit(e:MouseEvent):void
                                  switch (yourname.text)
                                            case "name1":
                                                      gotoAndStop(2);
                                                      break;
                                            case "name2":
                                                      gotoAndStop(3);
                                                      break;
                                            default:
                                                      goToAndStop(you frame you want);
                                            break;

  • How to get the text boxes and select lists dynamically?

    Hi,
    I have a requirement such that I need to create the text boxes and select lists depending on the user input at the run time. It means that if the user requires four text boxes/select lists then I need to have 4 such thing. If the user need 6 then I need to have 6.
    The design may be such that initially only one text box/select list will be available when the page launches. Then as ad when the user asks for more those will be available to the user accordingly.
    regards,
    Dipankar.

    You can use Ajax to call textboxes and select list based on what user enters.
    Otherwise make those items conditional and based on what user enters you can display textbox or select list.
    You can call Single Textbox and Select List using Ajax for any number of conditions.
    Regards
    Chandra

Maybe you are looking for