Help with "open for access" error

Why am I getting file wasn't found error here? (The file is on the desktop).
try
-- set myPrefsFile to (choose file with prompt "Select a file to read:" of type {"TEXT"})
open for access (file "10.3.9:desktop:myFile")
set fileContents to (read file "10.3.9:desktop:myFile")
close access file "10.3.9:desktop:myFile"
display dialog fileContents
on error Error_Message
display dialog Error_Message
end try
Lennox

1. You need to specify the correct path and extension. For example:
10.3.9:Users:username:Desktop:myFile.txt
2. You shouldn't need to use 'open for access' if you're only going to read the file.
I don't have any additional suggestions for your other script.
(36335)

Similar Messages

  • Inconsistent "End of file error" on "open for access "myFile.txt"

    I have a script that accesses a txt file containing info needed for values in the script. Sometimes the script works flawless, but once I get the "End of file error," it won't work right anymore unless I log out and log back in or if I dump the file and rewrite it. Below is a copy of the portion of script having the problem:
    +set _fileRef to open for access "Library:Preferences:MyTextFile.txt" with permission+
    + set ReadMyTextFile to read _fileRef as string+
    + close access _fileRef+
    Is there a way to reset the "End of file" status so that I can access it later with the same script in one login session? I have a feeling that the first time it opens, that it reads to the end of the file and then closes the file. When it opens again the script starts to read where it left off at the end of the file. Does that sound right?
    Any help would be great.

    OK, it looks like if you are going to use the open for access..close access, you need to keep tack of the EOF yourself, so you can just read to the EOF - for example:
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto"> set TheOpenFile to open for access (choose file)
    try
    set SomeText to paragraphs of (read TheOpenFile to eof as text)
    close access TheOpenFile
    on error
    close access TheOpenFile
    end try
    choose from list SomeText with prompt "File text:" with empty selection allowed
    </pre>
    If there isn't any particular reason to explicitly open and close the file, you can use something like:
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto"> set SomeText to paragraphs of (read (choose file) as text)
    choose from list SomeText with prompt "File text:" with empty selection allowed
    </pre>
    In the above examples I used paragraphs of in order to use the choose from list, since it displays stuff like this a little bit better - see this article for a tutorial on file read/write in AppleScript.

  • Encountered an error when attempting to open Lightroom for the first time. Went to Lightroom Help and searched for the error "An error occurred when attempting to change modules". Non of the solutions helped. what now?

    Encountered an error when attempting to open Lightroom for the first time. Went to Lightroom Help and searched for the error "An error occurred when attempting to change modules". Non of the solutions helped. What now?

    I am getting this error message as well. I have just downloaded Lightroom recently. I try to click on Lightroom / preferences....and nothing happens. I tried to uninstall and it is greyed out so I can't do that either. Suggestions? Please help?

  • Help with opening Adobe Reader and downloading updates

    I can not open Adobe .pdf files any longer (this started yesterday, prior to that I could open adobe files).
    When I double click a .pdf file I get this notice on my screen: Windows cannot access the specified device path or file. You may not have the appropriate permission to access file.
    So I went to the Adobe download site to download a new copy of Adobe.  When I start the download I get this on the screen:  The instruction at "0x0e3a0068" referenced memory at "0x0e3a0068."  The memory could not be written.  Then two options are listed: click OK to terminate or cancel to debug.  So I click on cancel and I get this on my screen: Internet Explorer has closed this webpage to help protect your computer.   A malfunctioning or malicious addon has caused I.E. to close this webpage.
    I don't have AVG running, I do have avast but I've disabled it.  I ran Registry Mechanic and an I.E. erasure program but nothing helps.
    I have gone into I.E. and reduced the security level to its lowest state but no joy.
    So, any ideas or suggestions on what's the problem and how to overcome it would be appreciated.  Thanks, in advance, for your reply.  Jim R.

    Hi Mike..tried that as well but no joy.  A friend of mine was looking at it all and noticed that it was an I.E. thing as far as not letting me redownload the reader so I went to Mozilla Firefox and I could download a new version but....whenever I attempt to open a .pdf file I get that message, "Windows can not open the specified device, path or file. You man not have the appropriate permissions to access the item." 
    Damn...this is irritating as I need to get to some of thos files as I need them for a Journal I'm working on as editor-in-chief. 
    It all worked just fine last Saturday but starting Monday when I was on my flight out to D.C.  no joy. 
    Sigh...Jim R.
    Jim R.
    Date: Tue, 1 Dec 2009 14:50:27 -0700
    From: [email protected]
    To: [email protected]
    Subject: Help with opening Adobe Reader and downloading updates
    Under the help menu, there is an option to repair the installation of reader. Did you try that?
    >

  • [ETL]Could you please help with a problem accessing UML stereotype attributes ?

    Hi all,
    Could you please help with a problem accessing UML stereotype attributes and their values ?
    Here is the description :
    -I created a UML model with Papyrus tool and I applied MARTE profile to this UML model.
    -Then, I applied <<PaStep>> stereotype to an AcceptEventAction ( which is one of the element that I created in this model ), and set the extOpDemand property of the stereotype to 2.7 with Papyrus.
    -Now In the ETL file, I can find the stereotype property of extOpDemand as follows :
    s.attribute.selectOne(a|a.name="extOpDemand") , where s is a variable of type Stereotype.
    -However I can't access the value 2.7 of the extOpDemand attribute of the <<PaStep>> Stereotype. How do I do that ?
    Please help
    Thank you

    Hi Dimitris,
    Thank you , a minimal example is provided now.
    Version of the Epsilon that I am using is : ( Epsilon Core 1.2.0.201408251031 org.eclipse.epsilon.core.feature.feature.group Eclipse.org)
    Instructions for reproducing the problem :
    1-Run the uml2etl.etl transformation with the supplied launch configuration.
    2-Open lqn.model.
    There are two folders inside MinimalExample folder, the one which is called MinimalExample has 4 files, model.uml , lqn.model, uml2lqn.etl and MinimalExampleTransformation.launch.
    The other folder which is LQN has four files. (.project),LQN.emf,LQN.ecore and untitled.model which is an example model conforming to the LQN metamodel to see how the model looks like.
    Thank you
    Mana

  • "Error opening for writing" error msg.

    While installing Shockwave Player 12.1.0.150 I received "Error opening for writing" error message. The file C:\Windows\System32\Adobe\Director\SwDir_1210150.dll is missing.
    I uninstalled older versions of it using Add/Delete function of Programs and Features in the Control Panel. My OS is Windows 7 Pro, and default browser is Google Chrome. How/Where to fix this? Thank you in advance.

    SMH  What is up with this download????  NOW, I used the Slim version, it installed with no problem, and in the SysWOW folder where I found the missing .dll file. However, when I check if it's working and it's not. Checked Chrome's plug-ins and it's not there. This is enough to make a bulldog break his chain.

  • Help with updates for CS6

    I need help installing latest updates for CS6.  I have Win 7 and have tried updating from the Help - Updates menu.  The error is:  U43M1D207.

    Thanks for your response.  I am in the United States in So. Arizona.
    Date: Fri, 5 Oct 2012 12:21:45 -0600
    From: [email protected]
    To: [email protected]
    Subject: Help with updates for CS6
    Re: Help with updates for CS6 created by Jeff A Wright in Downloading, Installing, Setting Up - View the full discussion
    Crunkle1 you are welcome to work directly with our support team for guided assistance.  If you go to http://www.adobe.com/ and select Help and Contact Us you should be given the option to contact our support team via telephone.  Which country/region are you in?
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/4752605#4752605
    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: http://forums.adobe.com/message/4752605#4752605
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4752605#4752605. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Downloading, Installing, Setting Up by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • "open for read error" message

    A recent firmware update (2.1 for MAcBooks) caused many of us to lose use of our superdrives. Someone figured out a fix that involved "flashing" the drive by running a program he wrote from Terminal. It worked for quite a few people but when I tried to run it instead of executing the program the message "open for read error" was returned. The command was "./simple_flash 0 UJ857-KBVB-MBP-rpc1.dat" which was supposed to start the simple_flash executible which referred to or used the .dat file.
    Does anyone know what the "open for read error" is telling me? How can I resolve whatever it is that is preventing execution.
    Thanks very much. Many are buying new superdrives to solve this problem but that is expensive.

    I would say to take your machine into an Apple Store, but judging by your profile, I think that might not be feasible.
    Where are you running this from? I downloaded it and looked at the source and that error just means that it can't open the dat file. Actually, it means that it can't even find the dat file. In the Terminal, you must use "cd" to move to the directory where the "simple_flash" executable and the .dat file are located. Do an "ls" and, if they are both listed, it should work.

  • Error trapping with OPEN FOR

    I am trying to add some error handling to this packaged procedure written by someone else.
    How can I check for an Oracle error in the query in m_sql_string? I have tried checking
    SQLCODE after the 'OPEN FOR', but it is always 0 even when errors are being encountered.
    I need to trap errors and write them to an error table.
    CREATE OR REPLACE PACKAGE P1
    AS
    TYPE CHCUR IS REF CURSOR;
    PROCEDURE QRY_WR_STATUS_CHANGES (tsAfter IN VARCHAR2, rsResult OUT CHCUR);
    END P1;
    CREATE OR REPLACE PACKAGE BODY P1
    AS
    PROCEDURE QRY_WR_STATUS_CHANGES(tsAfter IN VARCHAR2, rsResult OUT CHCUR)
    IS
    m_sql_string VARCHAR2(30000);
    BEGIN
    m_sql_string := 'SELECT TS_STATUS, CD_STATUS, CD_WR, RowId
    FROM TABLE_A
    WHERE
    NOT EXISTS (SELECT ''X'' FROM TABLE_B where TABLE_B.USER_NAME =TABLE_A.ID_OPER)
    ) AND
    NOT EXISTS (SELECT ''X'' FROM TABLE_C where TABLE_C.wr = TABLE_A.CD_WR and
    TABLE_C.dist = TABLE_A.CD_DIST)
    AND
    TABLE_A.TS_STATUS >
    TO_DATE('''||tsAfter||''', '||'''MM/DD/YYYY HH24:MI:SS'')
    AND CD_STATUS Like ''%X''';
    OPEN rsResult FOR m_sql_string;
    END QRY_WR_STATUS_CHANGES;
    END P1;
    Thanks in advance.

    Thank you. I just tried adding such an exception block. It compiles and runs fine, but isn't trapping the error. I see the error returned in the results when I call the proc from SQL*PLUS, but can't seem to trap it in the code...it's like I need to check the contents of the OUT data for the error or something. Below is the modified code and then showing executing it and the results. Any further ideas are greatly appreciated.
    CREATE OR REPLACE PACKAGE P1
    AS
    TYPE CHCUR IS REF CURSOR;
    PROCEDURE QRY_WR_STATUS_CHANGES (tsAfter IN VARCHAR2, rsResult OUT CHCUR);
    END P1;
    CREATE OR REPLACE PACKAGE BODY P1
    AS
    PROCEDURE QRY_WR_STATUS_CHANGES(tsAfter IN VARCHAR2, rsResult OUT CHCUR)
    IS
    m_sql_string VARCHAR2(30000);
    BEGIN
    m_sql_string := 'SELECT TS_STATUS, CD_STATUS, CD_WR, RowId
    FROM TABLE_A
    WHERE
    NOT EXISTS (SELECT ''X'' FROM TABLE_B where TABLE_B.USER_NAME =TABLE_A.ID_OPER)
    ) AND
    NOT EXISTS (SELECT ''X'' FROM TABLE_C where TABLE_C.wr = TABLE_A.CD_WR and
    TABLE_C.dist = TABLE_A.CD_DIST)
    AND
    TABLE_A.TS_STATUS >
    TO_DATE('''||tsAfter||''', '||'''MM/DD/YYYY HH24:MI:SS'')
    AND CD_STATUS Like ''%X''';
    OPEN rsResult FOR m_sql_string;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('Error code is: Long postings are being truncated to ~1 kB at this time.

  • Help with Open Browser Window

    I built a site named greenscapepump.com. I used the behavior
    "Open Browser Window" that allows a photo to be viewed in a smaller
    window. I have it set up to double-click the photo name to go to
    the browser window. It works on some computers but not others. I
    used the same behavior on other pages in the same web site and it
    is working on all computers.
    The three pages under the menu "Portfolio" are: Architectural
    Fountains, Waterfalls and Streambeds, and Floating Fountains, are
    the pages that have problems with this behavior on some computers.
    Is this an individual computer problem, or do I need to do
    something in Dreamweaver to fix it?

    OMG - the code on the architecturalfountains page is a horror
    Why do you need to use doubleclick.... most users are
    accustomed to clicking
    on a link wait for something to happen....
    Also, the code for that dropdown is massive... are you really
    committed to
    that menu?
    The validator found quite a few errors on that particular
    page - I didn't
    test each page (that's up to you :) these errors aren't
    helping with your
    page load also - one of the pages (can't recall which now)
    just kept trying
    to load and never did stop... try fixing the errors (some
    more important
    than others to the well being of your page) and then see
    where you are at
    with your pages... I'd also suggest changing the
    'doubleclick' to just the
    one click - really no need for anything else.
    http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fgreenscapepump.com%2Farchitectura lfountains.html%23
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.DreamweaverResources.com
    |Tutorials|SEO |CSS Templates
    http://www.csstemplates.com.au
    http://www.adobe.com/devnet/dreamweaver/css.html
    CSS Tutorials for Dreamweaver
    "texasgranny" <[email protected]> wrote in
    message
    news:ef9h1v$4h8$[email protected]..
    :I built a site named greenscapepump.com. I used the behavior
    "Open Browser
    : Window" that allows a photo to be viewed in a smaller
    window. I have it
    set up
    : to double-click the photo name to go to the browser window.
    It works on
    some
    : computers but not others. I used the same behavior on other
    pages in the
    same
    : web site and it is working on all computers.
    : The three pages under the menu "Portfolio" are:
    Architectural Fountains,
    : Waterfalls and Streambeds, and Floating Fountains, are the
    pages that have
    : problems with this behavior on some computers.
    : Is this an individual computer problem, or do I need to do
    something in
    : Dreamweaver to fix it?

  • SAP Jam Integration with Cloud For Customer error

    Hello Experts,
    We are integrating SAP Jam with Cloud for Customer tenant. We have followed the instructions that are mentioned in 1311 guide for SAP Jam integration.
    But right now we are getting an error on SAP FEED work center and Account View.
    Error that we are getting is as follows:
    You are not authorized to access /c/C0000209652T.com/widget/v1/feed?wid=1&auth=single_use_token&skin=gr&faces=true&type=follows&num_items=30&avatar=true&live_update=true&mobile=false&post_mode=inline&reply_mode=inline&single_use_token=&locale=en
    Kindly help us understand the mistake or step that we might have skipped.
    Thanks & Regards,
    Chandan Bankar

    My example in the document deals with User ID as key_identifier.
    ie., we need a unique key which is common to both servers so that we can identify accounts. This is done through assertion attribute exchange.
    For eg, if I have an account with userID vatsav in C4C, then I must have an account with same userID in JAM (or vice versa) provided I set UserID for "Account Name Origin" in Step 10.
    Doing this way, I am telling JAM that I am using UserID as an assertion attribute which identifies both my accounts in C4c and JAM without any problem. When you login into C4C using vatsav as UserID, it automatically searches feeds for same userID in JAM and displays them in Mashup.
    It's a big concept actually. Implementation's already done by SAP.
    Hope, I am clear.

  • Need help with Acrobat Xi installation error

    Here is the error I am getting...
    Exit Code: 7 Please see specific errors below for troubleshooting. For example,  ERROR:   -------------------------------------- Summary --------------------------------------  - 0 fatal error(s), 3 error(s)    ----------- Payload: Acrobat Professional 11.0.0.0 {23D3F585-AE29-4670-8E3E-64A0EFB29240} -----------  ERROR: Error 1311.Source file not found: C:\Windows\Installer\Data1.cab.  Verify that the file exists and that you can access it.  ERROR: Install MSI payload failed with error: 1603 - Fatal error during installation. MSI Error message: Error 1311.Source file not found: C:\Windows\Installer\Data1.cab.  Verify that the file exists and that you can access it.  ERROR: Third party payload installer AcroPro.msi failed with exit code: 1603  ------------------------------------------------------------------------------------- "Windows 7.  Have tried installation several times.  Need help now, considering I am paying for this service!

    Thank you for the replies. 
    Jeff, I will check that link and try what is suggests.
    Bill, to answer your questions...
    1. This is a CC installation.
    2. Yes, I am logged in as the admin and I have no anti-virus other than Microsoft Essentials enabled.
    3. This is a download installation.
    To give even more info that might help, I am using a Windows 7 machine with more than enough capability to run CC.  I had installed Photoshop, Illustrator, among other apps successfully.  I then tried the Acrobat XI installation.  Acrobat XI downloaded and extracted, but when it started installing it froze around 50% and then I received the installation failed error from Windows.  Once that was confirmed the CC install progress finishes but shows failure.  The More Info reveals the error I pasted in above.  Afterward, none of the CC apps worked properly and had to be uninstalled.  So, next I installed the CC downloader and tried to start installing Acrobat XI first but the same error occurred.  That's when I got frustrated and posted my original message.  My limited knowledge leads me to think the error issue lies in the AcroPro.msi file but I have no idea what that is or how to find, correct, or install it.
    Thanks again for any help you can provide.  I'm really frustrated that I'm paying for something that I can't use.

  • Please help with cannot find symbol error. Been struggling all day :(

    Hi all. :)
    Writing a game for my phone with KToolbar and have been getting a cannot find symbol error for every variable and method I try to use across Classes. I've looked all over and though it seems a common problem I always either don't understand or can't get working the various solutions. Example of my errors:
    C:\...\BTK800i.java:197: cannot find symbol
    symbol : variable youSayWhat
    location: class HelloCanvas
              youSayWhat=key;
              ^
    If I try BTK800i.variable or BTK800i.message I get a new error.
    C:\...\src\BTK800i.java:184: non-static method newOrdersSarge() cannot be referenced from a static context
              BTK800i.newOrdersSarge();
              ^
    Both these errors apply to both variables and methods. It only happens when I'm using methods/variables of one class in another, am I using public and private incorrectly? It doesn't seem to make a difference if I make variables public or leave them private, I'm trying to get to them with a public method within a private class. Is it something else? I really have no idea. :(
    Here's my code, it's long enough to be a tiresome read so I've tried to skip what I know isn't relevant.
    public class BTK800i extends MIDlet {
         private Display myDisplay;
         private HelloCanvas myCanvas;
         public int youSayWhat;
            //a whole bunch more skipped here, but I'm fairly certain it's not anything that'll help find a solution
         public BTK800i() {
              paused=false;
    public void startApp() throws MIDletStateChangeException {
              if( paused ) {
                   myCanvas.repaint();
              else {
                   myDisplay=Display.getDisplay(this);
                   myCanvas=new HelloCanvas();
                   myDisplay.setCurrent(myCanvas);
                   myCanvas.setFullScreenMode(true);
                   youSayWhat=0;
                           //again with the skipping, more code not related
    public void newOrdersSarge() {
    //whole bunch of code
    //other methods skipped
    class HelloCanvas extends Canvas {
         public void keyPressed (int key) {
              youSayWhat=key;
              repaint ();
    //skippage
    }The stuff I skipped is mainly either more of the same sorta thing or maths/writing to screen stuff.
    Thanks alot to anyone who helps. I'm really struggling with this. :(
    Dan.

    But I have been reading them :(
    My next-door neighbour unfortunately is an 80-something married man, but I will go have a looksie about static and instances.
    I thought the point of public variables was that other classes could use them, is this wrong?
    Also does this mean that to use the variables from my BTK class in the HelloCanvas class I need to first instantiate BTK? I don't understand how that works as the code starts running from the BTK class in the first place :S I guess more reading will help with this.
    Thanks very much for replying. :)
    Edit:
    OK I have read up on it but I don't think I found anything I hadn't read before. I tried to make a new class which I could instantiate to hold all the variables and methods I wanted everything to be able to access, but that went disastrously. Am I right in understanding that there are no global variables in Java? :s
    Edited by: Dan69 on Apr 17, 2010 1:15 PM

  • Please help with opening old mac AE file on a pc

    Hi,
    With the latest version of AE on a pc I tried opening older mac version .aep file created I believe in 1999. I had very little hope so I wasn't surprised to see this message:
    "After Effects error: this file was created with an older version of After Effects [3.0 (Macintosh PPC)], and can’t be opened. You can convert this file using an older version of After Effect and resaving."
    It is not clear which version should be used, Pc or Mac, and if at the end that file could eventually be opened in thet latest AE on a pc.
    I will greatly appreciate any help with this.

    Thanks Mylenium
    Rebuilding is not an option. It is a lot of work and I need this as a portfolio item. I created a promotional interactive CD with Macromedia Director in 1999 for a sign company. I created 19 short animations for it with After Effects 3 using old PPC Mac.  I haven't used After effects since then but recently several new clients asked me if I can make animations from that nature. So, I'm trying to use my old work as a demonstration of my creative skills.  The problem is that the animations were rendered tiny with 309 x 228 pixels to fit in the interactive interface of the presentation intended for the small monitors used at that time. I took the animations from the interactive CD  and using the latest AE on a pc, I created a rough composition with running the animations one after another. To make the animations a bit larger I scaled most of them to 320 x 240 hoping it will look better.
    In my archives I have the project files and all .ai vector graphics used for the animations. I still have the old PPC Mac retired somewhere in the closets and installer CD with After Effects 3 and 4. I thought it would be great if I can somehow open the files in the latest version on a pc but if not I guess I have to take out that old mac are render to higher resolution using this ancient machine and AE version. And I'm wondering if all this is worth it.
    I will appreciate any tips, advices, things to be aware, etc, and how to make this looks better on YouTube.
    Oh, and another question by the way, I haven't been current to the animation software for a long time and wonder if this kind of presentational animations are best suited for creating with Flash or After Effects is still OK?

  • I need help with my for loop in this array

    Ok well, I can't get my code to work. Also, please remember that this is just my draft so it isnt pretty. I will fix it up later so please look at it. The thing I want to do is look into the array for a time that matches what the user entered and return the toString() of that one. I know there is something wrong with my for loop but I cant figure how to fix it. please help. here is what i have so far:
    import javax.swing.JOptionPane;
    public class Runner
        public static void main (String[] args)
            String timeStr;
            int time, again, optiStr;
            Inbound[] in = new Inbound[25];
             in[0]=new Inbound ("",0,"On Time num0");
             in[1]=new Inbound ("",2,"On Time num1");
             in[2]=new Inbound ("",3,"Delayed num2");
             in[3]=new Inbound ("",4,"On Time");
             in[4]=new Inbound ("",5,"On Time");
             in[5]=new Inbound ("",6,"Canceled");
             in[6]=new Inbound ("",1,"Canceled num6");
             in[7]=new Inbound ("",8,"On Time");
             in[8]=new Inbound ("",9,"Delayed");
             in[9]=new Inbound ("",10,"On Time");
             in[10]=new Inbound ("",11,"Delayed");
             in[11]=new Inbound ("",12,"On Time");
             in[12]=new Inbound ("",13,"Delayed");
             in[13]=new Inbound ("",14,"On Time");
             in[14]=new Inbound ("",15,"On Time");
             in[15]=new Inbound ("",16,"On Time");
             in[16]=new Inbound ("",17,"Canceled");
             in[17]=new Inbound ("",18,"On Time");
             in[18]=new Inbound ("",19,"On Time");
             in[19]=new Inbound ("",20,"Canceled");
             in[20]=new Inbound ("",21,"On Time");
             in[21]=new Inbound ("",22,"Delayed");
             in[22]=new Inbound ("",23,"On Time");
             in[23]=new Inbound ("",24,"Cancled");
             in[24]=new Inbound ("",7,"On Time num24");
            do{
                timeStr = JOptionPane.showInputDialog ("In military time, what hour do you want?");
                time = Integer.parseInt(timeStr);
                if (time<=0 || time>24)
                 JOptionPane.showMessageDialog (null, "Error");
                 optiStr = JOptionPane.showConfirmDialog (null, "If you want Incoming flights click Yes, but if not click No");
                if (optiStr==JOptionPane.YES_OPTION)
    //(ok this is the for loop i am talking about )
                    for (int index = 0; index < in.length; index++)
                      if ( time == Inbound.getTime())
                   JOptionPane.showMessageDialog (null, Inbound.tostring());  //return the time asked for
    //               else JOptionPane.showMessageDialog (null, "else");
                }//temp return else if failed to find time asked for
    //             else
    //               if (optiStr==JOptionPane.CANCEL_OPTION)
    //                 JOptionPane.showMessageDialog(null,"Canceled");
    //              else
    //                {Outbound.run();
    //                JOptionPane.showMessageDialog (null, "outbound");}//temp
                  again=JOptionPane.showConfirmDialog(null, "Try again?");
            while (again==JOptionPane.YES_OPTION);
    }any help would be greatly appriciated.

    rumble14 wrote:
    Ok well, I can't get my code to work. Also, please remember that this is just my draft so it isnt pretty. I will fix it up later so please look at it. The thing I want to do is look into the array for a time that matches what the user entered and return the toString() of that one. I know there is something wrong with my for loop but I cant figure how to fix it. please help. here is what i have so far:
    >//(ok this is the for loop i am talking about )
    for (int index = 0; index < in.length; index++)
    if ( time == Inbound.getTime())
    JOptionPane.showMessageDialog (null, Inbound.tostring());  //return the time asked for
    Inbound.getTime() is a static method of your Inbound class, that always returns the same value, I presume? As opposed to each of the 25 members of your array in, which have individual values?
    Edited by: darb on Mar 26, 2008 11:12 AM

Maybe you are looking for

  • How do you monitor direct through hardware?

    Hello, I am experiencing popping sounds when I record in a very simple setup and just want to monitor direct through my Motu Traveler. This will allow me to keep latency to a minimum and my buffer size relatively low. Can you advise me how to engage

  • To run mutipal SQLs in one procedure / function

    Hi, First of all, your help and efforts will be highly appreciated! I am new to the Oracle world and learning to write PL/SQL with real world problems. This is what I am facing now: I have a bunch of SQL scripts need to run several times a year, they

  • How to install java application /game ?

    Hi folks, I finally managed to connect my Nokia 6275i to PC suite 6.8 via Bluetooth but now I have other dilemma .... How do I install Java application or game ? I downloaded dictionary and game as well ( *.jar) but when I want to install it I can't

  • Cada vez que abro un programa me pide aceptar los acuedos de la licencia

    cada vez que abro los programas de adobe me pide aceptar los acuerdos

  • DW8-Open a Recent Item Screen?

    Last on the list of recently opened items is a (folder) Open. If I click on open it takes me to C/drive Documents where I have downloaded an entire website from my Cpanel. Unzipped it and listed it in Documents. I click on the folder in documents and