How can I detect a dialog and respond?

I'm having trouble doing something that's probably not that hard. I'm trying to "Print to PDF" a bunch of old AppleWorks documents. When you open a document created in AppleWorks v6 it opens right up, but when you open a document created in AppleWorks 5 you get a dialog box that says, "This document was created by a previous version of AppleWorks. A copy will be opened and "[v6.0]" will be added to the filename."
Right now I open the file and then:
tell application "AppleWorks 6"
        activate
        repeat while not (exists front document)
                delay .2
        end repeat
end tell
When the dialog box pops up, there's no front document so the whole thing freezes until you hit OK. How can I detect this dialog box and dismiss it?
Thanks
PS
When the box is open I ran this and got this result:
/usr/bin/osascript -e 'tell application "System Events" to get properties of windows of application process "AppleWorks 6"'
minimum value:missing value, orientation:missing value, position:436, 153, class:window, role description:dialog, accessibility description:missing value, focused:missing value, title:missing value, size:412, 123, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXDialog, selected:missing value, name:missing value, description:dialog, minimum value:missing value, orientation:missing value, position:8, 76, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Starting Points, size:631, 189, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Starting Points, description:floating window, minimum value:missing value, orientation:missing value, position:4, 22, class:window, role description:floating window, accessibility description:missing value, focused:missing value, title:Button Bar, size:612, 51, value:missing value, help:missing value, enabled:missing value, maximum value:missing value, role:AXWindow, entire contents:, subrole:AXFloatingWindow, selected:missing value, name:Button Bar, description:floating window

Hi,
The simplest would be to set the application preferences in the script.
Like this :
-- *** set prefs ****
tell application "AppleWorks 6"
      activate
      set oldPrefs to its preferences
      copy oldPrefs to tPrefs
      tell tPrefs
            set old version warning to false --doesn't show the old version warning alert  
            set converted file suffix to true -- append “[v6.0]” to documents converted from older formats
            set locked file warning to false
            set paint reduction warning to false
      end tell
      set preferences to tPrefs
end tell
-- *** end set prefs ****
--**** your script, example ***
set tfiles to choose file with multiple selections allowed
tell application "AppleWorks 6"
      repeat with i in tfiles
            open i
            tell front document
                  -- do something
            end tell
      end repeat
end tell
--**** end  your script ***
-- *** reset prefs ****
tell application "AppleWorks 6" to set preferences to oldPrefs

Similar Messages

  • How can you detect all words and phrases in a text document using java?

    Is there some java API which would help me extract all words, multi-word phrases, punctuations in an English text document? I would also like to get the order in which they appear with sentence detection. I've been searching for this in java NLP packages, but haven't found anything yet.
    Any help would be appreciated.
    Thanks,
    Ajith

    I don't understand what you actually want, but if your on about having a file and splitting it up into sentences then i would look into either psudocode or parsing strings, theres not a java api as far as i know that does anything like you want, you would have to write it yourself or find a project someone else has made.

  • How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?

    How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?  I would like them to open at the size they were previously resized like they used to in previous operating systems.  They currently open at a very small size and the first colum is only a few letters wide necessitating a resize practically every time one wants to use it.  Any help would be appreciated.

    hi Prasanth,
    select werks matnr from ZVSCHDRUN into table it_plant.
    sort it_plant by matnr werks.
    select
            vbeln
            posnr
            matnr
            werks
            erdat
            kbmeng
            vrkme
            from vbap
            into table it_vbap
            for all entries in it_plant
            where matnr = it_plant-matnr and
                  werks = it_plant-werks.
    and again i have to write one more select query for vbup.
    am i right?

  • HT5312 So I have a problem with iTunes not letting me download anything without first responding to some security questions which I don't remember setting up, how can fix it? Oh, and it won't let me reset the questions either!

    So I have a problem with iTunes not letting me download anything without first responding to some security questions which I don't remember setting up, how can fix it? Oh, and it won't let me reset the questions either!

    If you mean that you aren't getting the reset link, then from the page that you posted from :
    Note: The option to send an email to reset your security questions and answers will not be available if a rescue email address is not provided. You will need to contact iTunes Store support in order to do so. 
    You can contact iTunes Support in your country via this page : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down the HT5312 page that you posted from to add a rescue email address for potential future use

  • How can I detect a certain text within a field within CASE using IF

    Dear all,
    for a transformation / generation of values receiving from R/3 into BW I try to
    manupulate three fields. I have a problem detecting a string in a field.
    I am using a CASE with several WHEN clauses on one field. Depending on the
    value, an IF is integrated. There I look into another field evaluating, if it contains
    a certain string. E.g. IF STRING CP 'xyz' OR 'abc'.
    System gives error for the locigal expression. I also tried CS, but same error.
    How can I detect a certain text within a field and which is the right logical
    expression.
    Many thanks in advance!!!
    Claudia

    Hi,
    Folow the blow example...
    May be it helps....
    DATA: hex1 TYPE string,
          hex2 TYPE string.
    hex1 = 'FFFF'.
    hex2 = '123FF'.
    IF hex1 CP hex2.
    ENDIF.
    Cheers,
    SImha.

  • How can i detect if my PC is not on Network..... Urgent Pls Help Soon !!!!!

    Hello Everyone,
    We all know whenever we try to connect to a PC which is not on network, we get UnKnownHostException etc..... by which we can detect that the corresponding PC is not an network(intranet/internet)
    But when i send a msg from my PC to my PC, it works fine even if the network is down. I hv provided my PC's IP address instead of using localhost or 127.0.0.1 which reduces the possibility that the msg will not be traversed thru the network.
    Any IDEA how this works.
    Is There any possible way by which i can detect that my PC is not on network or the PC to which i'm trying to connect is not on network .......
    Pls help me out, its really urgent as to be implemented in my Project
    Thanks In Advance
    Sahil Shaikh

    Hello Surtee
    I have developed a Messeging Service for the eCRM Apllication my company is developing and we r in the final stage of debugging.
    Now whenever a user sends a msg to a PC which is not on network, the messaging service automatically sends an Offline mssg to that PC. But know i want ot distinguish wheather the PC to which i'm sending the msg is not on network or am I not on network based on this i need to perform diff. actions, hence i wanted to know that how can i detect .......
    Pls see if u canhelp me out ......
    Thanks
    Sahil Shaikh

  • How can we detect a virus on our mac?, How can we detect a virus on our mac?

    We think we may have a virus from the USPS spam email.  How can we detect a virus on our computer?

    What makes you think there is a "virus"?  Any symptoms...?
    There are other types of malware (such as trojans) that can affect Mac OS X, but no viruses.  A trojan would have to trick you into installing something (the malware) by making you think it is something else.  You would be notified (by the system) that you are running a downloaded application for the first time, AND if something will be done to update your current system, you will be asked to authenticate (with your admin user name and password).  If something like that comes up when you don't expect it, you should be suspicious (and NOT authenticate).  Just opening an email won't do anything, even if it's an email that may affects Windows PCs.
    This free utility can scan your Mac for malware. 
    http://www.clamxav.com/
    Apparently, there is a version on the Mac App Store.
    http://search.itunes.apple.com/WebObjects/MZContentLink.woa/wa/link?path=mac%2fC lamXav
    In the past, when I bothered to run it a few times a year, the only things it found were junk emails that I had not bothered to delete with embedded malware, all of it aimed at Windows PCs.

  • Firstly I updated my ipad into ios7 and after watching the video by Apple, iWork, pages and numbers are free for download after updating iOS 7. How can I download iWork pages and number for free?

    Firstly I updated my ipad into ios7 and after watching the video by Apple, iWork, pages and numbers are free for download after updating iOS 7. How can I download iWork pages and number for free? Please help me.

    stevejobsfan is correct; iwork for ios is free only for new purchases of new ios devices. A good work around (if you have wifi connectivity) is going to the icloud website on your ipad, and working on your document.
    A word of caution (the real reason I am responding to your post). If you do a lot of 'formatting' of a document on iwork for mac, and then save it in icloud; you will probably loose most of the formatting you have done (this will be true if you oppen the document in iwork for ios; also) It happened to me, and I did not duplicate the document before saving it to icloud; I lost at least an hours worth of work.

  • How can I detect the PC show down event?

    I want to save a file to a certain destination once the PC shut down event happened.
    And the save process must be proceeded prior to the PC shutdown.
    How can I detect the PC shut down event?

    Hi there
    Try the "Application Instance Close?" Event.
    Best regards
    chris
    CL(A)Dly bending G-Force with LabVIEW
    famous last words: "oh my god, it is full of stars!"

  • How can I detect if I'm running a compiled versione of my application?

    In my application I have included some special functions I don't want my customer to use. Since I will distribute the application as an .exe file, instead of cutting away those functions before releasing the .exe, I want to hide them when the application is runnig as an executable, and leave them active when running in the LV environment.
    How can I detect if I'm running an executable or the LV environment? Do I have to scan the application name until I find an .exe different from labview.exe or there is another way to obtain the flag (something similar to CVI function InStandaloneExecutable() for example)?
    Roberto
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

    An application property exists:Application:Kind
    with the following values: Development System, Runtime System, Student Edition, or Embedded LabVIEW.
    greetings from the Netherlands

  • How can I detect the vertices of a rectangle in my image ?

    I have applied a gradientMagnitude operator to my Image, and now I can see the shape of a rectangle with also other lines.
    How can I detect the vertices of the rectangle in my image?
    thank you

    Right mouse click the song and select "Get Info", go to option tab and check both Start Time and Stop Time.  Type in the Start and Stop time then click OK

  • My wife and I have 2 new iPhones and also have a mac book pro and an iMac. How can we share apps, music and contacts between all these?

    My wife and I have 2 new iPhones and also have a mac book pro and an iMac. How can we share apps, music and contacts between all these?

    Use the same Apple ID and password for purchasing in all these devices.

  • How can we get Dynamic columns and data with RTF Templates in BI Publisher

    How can we get Dynamic columns and data with RTf Templates.
    My requirement is :
    create table xxinv_item_pei_taginfo(item_id number,
    Organization_id number,
    item varchar2(4000),
    record_type varchar2(4000),
    record_value CLOB,
    State varchar2(4000));
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'USES','fever','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'HOW TO USE','one tablet daily','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'SIDE EFFECTS','XYZ','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'DRUG INTERACTION','ABC','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'OVERDOSE','Go and see doctor','TX');
    insert into xxinv_item_pei_taginfo values( 493991 ,224, '1265-D30', 'NOTES','Take after meal','TX');
    select * from xxinv_item_pei_taginfo;
    Item id Org Id Item Record_type Record_value State
    493991     224     1265-D30     USES     fever     TX
    493991     224     1265-D30     HOW TO USE     one tablet daily     TX
    493991     224     1265-D30     SIDE EFFECTS     XYZ     TX
    493991     224     1265-D30     DRUG INTERACTION     ABC     TX
    493991     224     1265-D30     OVERDOSE      Go and see doctor     TX
    493991     224     1265-D30     NOTES     Take after meal     TX
    Above is my data
    I have to fetch the record_type from a lookup where I can have any of the record type, sometime USES, HOW TO USE, SIDE EFFECTS and sometimes some other set of record types
    In my report I have to get these record typpes as field name dynamically whichever is available in that lookup and record values against them.
    its a BI Publisher report.
    please suggest

    if you have data in db then you can create xml with needed structure
    and so you can create bip report
    do you have errors or .... ?

  • Randomly when I plug my Iphone 4s into Itunes it will tell me that it can't detect my phone and that I need to restore it. It doesn't happen every time, but maybe every two weeks.

    Randomly when I plug my Iphone 4s into Itunes it will tell me that it can't detect my phone and that I need to restore it. It doesn't happen every time, but maybe every two weeks.I restore it and then it works for a while, but then a couple weeks later I'll plug it in and I get the same message again. It's very frustrating because even though I have all the settings to save to cloud, my apps and data don't all come back.

    Thank you both. I suppose I should have prefaced my question with the concern that I've read a number of other posts from people who have had a similar issue and when they tried to follow the directions, they ran into a multitude of other problems. As you might imagine, I'm hoping to avoid the creation of new problems as I try to solve this one. Thanks again.

  • How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?

    With Acrobat 6.0 I was able to copy a stamp in the same position (I mean "exactly" the same one) of different pages just by using the "copy/past" tool.
    Now I am using Acrobat XI and it seems like it is not possible anymore: I am copying a stamp and I am trying to past it in anoter page, but it appears in the center of the page (or wherever it wants to...).
    Does anyone have a solution?
    Thanks in advance.

    Thank you very much. I'll be waiting for you message.
    Messaggio originale----
    Da: [email protected]
    Data: 26/01/2015 17.56
    A: "Umberto Gangi"<[email protected]>
    Ogg:  How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?
        How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?
        created by Gilad D (try67) in Creating, Editing &amp; Exporting PDFs - View the full discussion
    Well, I was in the same situation so I've developed a tool that allows one to do it. I will send you some additional information about it in a private message.
         If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7132586#7132586 and clicking ‘Correct’ below the answer
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7132586#7132586
         To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, &amp; "Stop Following"
         Start a new discussion in Creating, Editing &amp; Exporting PDFs by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

Maybe you are looking for

  • Call to package not being executed in Pro*C

    Hello! We are doing a machine migration from a Sequent Computer System (DYNIX/ptx(R) V4.4.8) to an HP-UX B.11.11 U 9000/800; and from the Oracle version 8.1.7.3.0 to 8.1.7.4.0. And we are having some problems, which we did not found a valid solution

  • No color printing on Photosmart 5510 Printer.

    I have purcheased new cartitgages. I have shaken the cartiratages. I have tried the cleaning feature, realigning, even the old blow on the machine trick from Nintendo days! I am totally lost as to what the issue could be. It will print black, but onl

  • Transform XML in TEXT

    Hello, can anyone help me? I want to transform an XML-Document to Text-Document. I would store the data of this text-document in a MySql-Database. Can you tell me if the is a possibility to do all this with java. It's possible only with XSLT and how?

  • Can't open global workarea, possibly a bad repository install?

    I can't startup Designer 6i. I've run the Enable Version Support Option in the RAU, but I'm still getting this message: Message CDR-20043: Non-versioned repository has no workarea or insufficient privileges Cause Non-versioned repository cannot obtai

  • Question on configuration files

    hi all, can anybody tell me how many web.xml and how many struts-config.xml file can i maintain in a application thanks sikandar