"SEARCHING AND SAVING FILES"

HI ALL,
I am required to search for a client, using their surname, first name or age and display a list of all their matching records in the text area if the results are found.
Then i am required to save the data and load it from a file using an application and not an applet. If this information is validated then the user should be able to select the client and account from a choice list. This means that each time a client object is created an entry is added to the list of clients showing the client ID, surname and first name. When a client number is entered in the text field (or selected from the list) all accounts that are owned by the client will be displayed in a choice list. Each choice list entry for an account must show the account number and the account type.
Basically Im unsure how to do this so I REALLY need your help.
Here is parts of my code, if you need more verification of what im doing please feel free to email me [email protected], cause I desperately need your help.
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class Assignment2 extends Applet
implements ActionListener {
private Branch Brh = new Branch ();
private Client Clt = new Client ();
private Account Acc = new Account ();
private Cheque Cheq = new Cheque ();
private EFTCard Eft = new EFTCard();
private ClntArray ctArray = new ClntArray ();
// create an array to hold upto ten branch objects
private Branch branchArray[] = new Branch[10];
// declare and initialise variable to keep count of
// howmany branches
private int branchCount = 0;
// Declare variables for each type of component required for this applet
// Buttons for client processing
Button btnNewClient, btnUpdateClient, btnDeleteClient;
Button btnSearchClient, btnNextClient, btnPreviousClient;
// Buttons for account and transaction processing
Button btnNewAccount, btnUpdateAccount, btnDeleteAccount;
Button btnSearchAccount, btnNextAccount, btnPreviousAccount;
Button btnNewTranx, btnPrintStatement;
// Buttons for misc processing
Button btnClear;
// declare variables for checkboxes and a checkbox group
Checkbox chequeAccount, EFTAccount;
CheckboxGroup accountType;
// choice list to hold branches that can be selected from
Choice availableBranches;
// labels and textfields for client processing
Label clientHeading;
Label promptSName, promptFName, promptClientPh, promptClientAge,promptClientNo;
TextField txtSurname, txtFirstname, txtClientPh, txtClientAge, txtClientNo;
// labels and textfields for account processing
Label accountHeading, accountTip;
Label promptAccNo, promptAccBalance, promptAccInterest, promptAccType;
TextField txtAccountNo, txtAccountBalance, txtInterestRate, txtTranxAmount;
Label promptTranxAmount, promptSelectBranch;
// general labels and text fields
Label header, footer;
TextArea results;
// panels for client processing
Panel pTextFields, pClientButtons, pClientStuff;
// account processing panels
Panel pAccountFields, pAccountButtons, pAccountStuff;
// miscelaneous panels used for formatting user interface
Panel pTop, pCentre, pBottom, pAllTextFields;
Panel pCheckBoxes, pBranches, pLists;
// variable used to create output string
String msg = "";
/***** init() method *************************************************
* This method will create all required objects, add them to the *
* applet, and register interest in events on some objects through *
* listener classes *
public void init() {
resize(700,590);
setLayout(new BorderLayout(5, 5));
// create buttons for client processing
btnNewClient = new Button("New Client");
btnUpdateClient = new Button("Update Client");
btnDeleteClient = new Button("Delete Client");
btnSearchClient = new Button("Search Clients");
btnNextClient = new Button("Next>>");
btnPreviousClient = new Button("<<Previous");
// create account processing buttons
btnNewAccount = new Button("New Acct");
btnUpdateAccount= new Button("Update Acct");
btnDeleteAccount = new Button("Delete Acct");
btnSearchAccount = new Button("Search Accts");
btnNextAccount = new Button("Next>>");
btnPreviousAccount = new Button("<<Previous");
btnNewTranx = new Button("Perform Transaction");
btnPrintStatement = new Button("Print Statement");
// button to clear the form values
btnClear = new Button("Clear All");
accountType = new CheckboxGroup();
chequeAccount = new Checkbox("Cheque Account", accountType, false);
EFTAccount = new Checkbox("EFT Account", accountType, true);
header = new Label("Client and Account Management Information System", Label.CENTER);
footer = new Label("");
// create six default branch objects and add them to the branch array
// and set counter to show howmany branches there are - assumes the
// the appropriate constructor has been defined in the Branch class
branchArray[0] = new Branch("Perth", "036060");
branchArray[1] = new Branch("Fremantle", "036080");
branchArray[2] = new Branch("Joondalup", "036989");
branchArray[3] = new Branch("Churchlands", "036018");
branchArray[4] = new Branch("MtLawley", "036605");
branchArray[5] = new Branch("Booragoon", "036090");
branchCount = 6;
// now add the default branch names and codes to choice list
// NOTE: you may have to change the getBranchName() and getBranchCode() methods to match
// those you have defined in your Branch class
availableBranches = new Choice();
for (int indx = 0; indx < branchCount; indx++) {
availableBranches.add(branchArray[indx].getBranchName() + " " +
branchArray[indx].getBranchCode() );
} // end of for loop to add branch names and codes
// create labels and text fields required for client processing
clientHeading = new Label("Client Processing");
promptSName = new Label("Surname: ", Label.RIGHT);
promptFName = new Label("First Name: ", Label.RIGHT);
promptClientPh = new Label("Client Number: ", Label.RIGHT);
promptClientAge = new Label("Client Age: ", Label.RIGHT);
promptClientNo = new Label ("Client Number: ", Label.RIGHT);
txtFirstname = new TextField(20);
txtSurname = new TextField(20);
txtClientPh = new TextField(18);
txtClientAge = new TextField(3);
txtClientNo = new TextField(15);
// create account processing labels and text fields
accountHeading = new Label("Bank Account Processing");
accountTip = new Label("Client must exist before account is created");
promptAccNo = new Label("Account Number: ", Label.RIGHT);
promptAccBalance = new Label("Balance: ", Label.RIGHT);
promptAccInterest = new Label("Interest Rate: ", Label.RIGHT);
promptTranxAmount = new Label("Transaction Amount $", Label.RIGHT);
promptAccType = new Label("Account Type: ");
txtAccountNo = new TextField(20);
txtAccountBalance = new TextField(20);
txtInterestRate = new TextField(10);
txtTranxAmount = new TextField(10);
results = new TextArea(8, 40);
// start adding components to applet
add(header, BorderLayout.NORTH);
pCentre = new Panel();
pCentre.setLayout(new BorderLayout(5, 5));
// set up client information panel
pTextFields = new Panel();
pTextFields.setLayout(new GridLayout(3, 4));
pTextFields.add(clientHeading);
pTextFields.add(new Canvas());
pTextFields.add(new Canvas());
// pTextFields.add(new Canvas());
pTextFields.add(new Canvas());
pTextFields.add(promptClientNo);
pTextFields.add(txtClientNo);
pTextFields.add(promptSName);
pTextFields.add(txtSurname);
pTextFields.add(promptFName);
pTextFields.add(txtFirstname);
// pTextFields.add(promptClientPh);
// pTextFields.add(txtClientPh);
pTextFields.add(promptClientAge);
pTextFields.add(txtClientAge);
pClientButtons = new Panel();
pClientButtons = new Panel();
pClientButtons.add(btnNewClient);
pClientButtons.add(btnUpdateClient);
pClientButtons.add(btnDeleteClient);
pClientButtons.add(btnSearchClient);
pClientButtons.add(btnPreviousClient);
pClientButtons.add(btnNextClient);
pClientStuff = new Panel();
pClientStuff.setLayout(new GridLayout(2, 1));
pClientStuff.add(pTextFields);
pClientStuff.add(pClientButtons);
// set up account and transaction information panel
pAccountFields = new Panel();
pAccountFields.setLayout(new GridLayout(3, 4));
pAccountFields.add(accountHeading);
pAccountFields.add(new Canvas());
pAccountFields.add(new Canvas());
pAccountFields.add(new Canvas());
pAccountFields.add(promptAccNo);
pAccountFields.add(txtAccountNo);
pAccountFields.add(promptAccBalance);
pAccountFields.add(txtAccountBalance);
pAccountFields.add(promptAccInterest);
pAccountFields.add(txtInterestRate);
pAccountFields.add(promptTranxAmount);
pAccountFields.add(txtTranxAmount);
pAccountButtons = new Panel();
pAccountButtons.add(btnNewAccount);
pAccountButtons.add(btnUpdateAccount);
pAccountButtons.add(btnDeleteAccount);
pAccountButtons.add(btnSearchAccount);
pAccountButtons.add(btnPreviousAccount);
pAccountButtons.add(btnNextAccount);
pAccountButtons.add(btnNewTranx);
pAccountStuff = new Panel();
pAccountStuff.setLayout(new GridLayout(2,1));
pAccountStuff.add(pAccountFields);
pAccountStuff.add(pAccountButtons);
pAllTextFields = new Panel();
pAllTextFields.setLayout(new GridLayout(2,1));
pAllTextFields.add(pAccountStuff);
pAllTextFields.add(pClientStuff);
// set up the panel that will hold the checkboxes and list of branches
pCheckBoxes = new Panel();
pCheckBoxes.setLayout(new GridLayout(3, 1));
pCheckBoxes.add(promptAccType);
pCheckBoxes.add(EFTAccount);
pCheckBoxes.add(chequeAccount);
pBranches = new Panel();
pBranches.setLayout(new GridLayout(3, 1));
promptSelectBranch = new Label("Select Branch: ");
pBranches.add(promptSelectBranch);
pBranches.add(availableBranches);
pLists = new Panel();
pLists.setLayout(new GridLayout(1, 3));
pLists.add(pCheckBoxes);
pLists.add(pBranches);
pLists.add(new Canvas());
// add all the above panels to the panel that will be added to the
// centre of the applet
pCentre.add(pLists, BorderLayout.NORTH);
pCentre.add(pAllTextFields, BorderLayout.CENTER);
pCentre.add(results, BorderLayout.SOUTH);
add(pCentre, BorderLayout.CENTER);
//add general processing buttons to panel, then add panel to applet
pBottom = new Panel();
pBottom.add(btnPrintStatement);
pBottom.add(btnClear);
add(pBottom, BorderLayout.SOUTH);
add(new Label(" "), BorderLayout.EAST);
add(new Label(" "), BorderLayout.WEST);
// add listeners for client buttons
btnNewClient.addActionListener(this);
btnUpdateClient.addActionListener(this);
btnDeleteClient.addActionListener(this);
btnSearchClient.addActionListener(this);
btnNextClient.addActionListener(this);
btnPreviousClient.addActionListener(this);
btnNewAccount.addActionListener(this);
btnUpdateAccount.addActionListener(this);
btnDeleteAccount.addActionListener(this);
btnSearchAccount.addActionListener(this);
btnNewTranx.addActionListener(this);
btnNextAccount.addActionListener(this);
btnPreviousAccount.addActionListener(this);
btnPrintStatement.addActionListener(this);
btnClear.addActionListener(this);
} //end of init method
/***** actionPerformed() method **************************************
* Method is called when an event occurs on any of the object that *
* have been registered as an action listener *
public void actionPerformed (ActionEvent e) {
Object obj = e.getSource();
* if new client button is clicked then *
* create new client object *
* read data from text fields and set the client object's values *
* add this client object to array of client objects *
if (obj == btnNewClient) {
//declare variables to later check the validation of the info
boolean cNo = false;
boolean cSurName = false;
boolean cFstName = false;
boolean cAge = false;
//must change the the age to interger to then chek validation
//check for surname
if (txtSurname.getText().equals ("")) {
results.append("\n Enter Surname");
else { cSurName = true;
//check for firstname
if (txtFirstname.getText().equals ("")) {
results.append("\n Enter Name");
else { cFstName = true;
//check for client number
if (txtClientNo.getText().equals ("")) {
results.append("\nPlease Enter Correct Client Number");
else { // cNo = true;
//convertedInt = Integer.parseInt(stringValue);
//mudt try n plsce this in the rite plc to be able to wrk
int ClientLoc = ctArray.findLoc(txtClientNo.getText());
if (ClientLoc == -1) {
Client Clt = new Client(txtClientNo.getText(), txtFirstname.getText()
,txtSurname.getText(), txtClientAge.getText());
ctArray.AddClient(Clt);
results.setText("New client has been added to the arrary!");
ClientLoc = ctArray.findLoc(txtClientNo.getText());
results.append(ctArray.getClient(ClientLoc).getFirstName());
} // end of new client button for the if
* if new updateclient button is clicked then *
* then do the bits required to *
* read data from text fields and set the client new details object val *
if (obj == btnUpdateClient) {
int ClientLoc = ctArray.findLoc(txtClientNo.getText());
if (ClientLocc == -1){
results.setText(" Could Not Find Client!");
} else {//this will shoe the client loc that the client has been updated
display(ClientLoc);
} //end of the else bit this is just help to show {} are in place
} // end of if for update client
* if new btnDeleteClient button is clicked then *
* then do the bits required to *
* delete the client form the array *
if (obj == btnDeleteClient) {
int ClientLoc = ctArray.findLoc(txtClientNo.getText());
if (ClientLoc == -1) {
results.setText(" Could Not Find Client!");
} else { //start of the else if the client was found
ctArray.remove(ClientLoc);
results.setText("Client Deleted!");
} //end of te elsebit for the removing of the client
} //end of the btndeleteclient process
* if new btnSearchClient button is clicked then *
* then do the bits required to *
* SearchClient the client form the array *
if (obj == btnSearchClient) {
int ClientLoc = ctArray.findLoc(txtClientNo.getText());
if (ClientLoc == -1) {
results.setText(" Could Not Find Client!");
} else {//here is the search was good then will be able
// to display the info of the client
results.append("\n Customer Number: " + Clt.getClientNo());
results.setText(" First Name: " + Clt.getFirstName());
results.append("\n Surname: " + Clt.getSurname());
results.append("\n Customer Age: " + Clt.getAge());
}//end of the else bit that allows the user to see the clients details
// in the either the textfiels or the resultds bit as it is yet to be decided
}//end of the btnsearchclient
* if new btnNextClient button is clicked then *
* then do the bits required to *
* NextClient the client form the array *
if (obj == btnNextClient) {
int ClientLoc = ctArray.findLoc(txtClientNo.getText());
if (ClientLoc == -1) {
results.setText(" Could Not Find Client!"); //need to fix it so then itll show the next client
} else {//here is the search was good then will be
//able to display the info of the client
txtClientNo.setText(Clnt.getClientNo());
txtFirstname.setText(Clnt.getFirstName());
txtSurname.setText(Clnt.getSurname());
txtClientAge.setText(Clnt.getAge());
}//end of the else bit that shos that next client
} // end of the btnnextclient
* the new btn PreviousClient button is clicked then *
* then do the bits required to *
* PreviousClient the client form the array *
if (obj == btnPreviousClient) {
int ClientLoc = ctArray.findLoc(txtClientNo.getText());
if (ClientLoc == -1) {
results.setText(" Could Not Find Client!"); //need to fix it so then itll show the previous client
} else {//here is the search was good then will be
//able to display the info of the client
txtClientNo.setText(Clnt.getClientNo());
txtFirstname.setText(Clnt.getFirstName());
txtSurname.setText(Clnt.getSurname());
txtClientAge.setText(Clnt.getAge());
}//end of the else bit that shows that previous client
}//end of the btnprevious client been clikd
* if new transaction button is clicked then *
* then do the bits required to *
* read data from text fields and set the transaction object val *
if ( obj == btnNewTranx) {
if (!txtTranxAmount.getText().equals("")) {
double TrnAmt = Double.parseDouble(txtTranxAmount.getText());
if (Acc instanceof Cheque) {
Cheq.setBalance(Cheq.getBalance() + TrnAmt );
} else if (Acc instanceof Cheque) {
Eft.setBalance(Cheq.getBalance() + TrnAmt );
} //end of the if it was eftcard
} //this will close the transaction bit if the client does enter an amount
* if display button is clicked then *
* display values from text fields and text area *
if (obj == btnPrintStatement) {
results.setText(" First Name: " + Clt.getFirstName());
results.append("\n Surname: " + Clt.getSurname());
results.append("\n Customer Number: " + Clt.getClientNo());
results.append("\n Customer Age: " + Clt.getAge());
if (Acc instanceof Cheque) {
Cheq = (Cheque) Acc;
results.append("\n \n Account Type: " + Cheq.getAccType());
results.append("\n Account Number: " + Cheq.getAccNo());
results.append("\n Account Balance: " + Cheq.getBalance());
results.append("\n Account Interest Rate: " + Cheq.getIntRate());
results.append("\n Branch Name: " + Brh.getBranchName() + " " + Brh.getBranchCode());
} else {
Eft = (EFTCard) Acc;
results.append("\n \n Account Type: " + Eft.getAccType());
results.append("\n Account Number: " + Eft.getAccNo());
results.append("\n Account Balance: " + Eft.getBalance());
results.append("\n Account Interest Rate: " + Eft.getIntRate());
results.append("\n Branch Name: " + Brh.getBranchName() + " " + Brh.getBranchCode());
}//end of if for displaying the correct Acc type
} // end of if for btnPrintStatement
* if clear button is clicked then *
* clear values from text fields and text area *
* reset other form components to default values *
if (obj == btnClear) {
txtFirstname.setText("");
txtSurname.setText("");
txtClientPh.setText("");
txtClientNo.setText("");
txtClientAge.setText("");
txtAccountNo.setText("");
txtAccountBalance.setText("");
txtInterestRate.setText("");
txtTranxAmount.setText("");
results.setText("");
availableBranches.select(0);
accountType.setSelectedCheckbox(EFTAccount);
} // end of if for clear button
} //end of actionPerformed method
} //end of applet
Sorry its so LONG. Thank you for your time
Jesika

You should really check the freejavahelp forums, I posted something for you there.

Similar Messages

  • What is the name of the folders which are your backup of Itunes library? I am recovering from a virus, have no workable desktop in Win XP, but can search and find files and folders. I would like to move these backup files to a new computer

    what is the name of the folders which are the backup of Itunes library? I am recovering from a virus, have no workable desktop in Win XP, but can search and find files and folders. I would like to move these backup files to a new computer, authorize it and sync with Iphone 3Gs and Ipod 5th gen.
    I

    I second the whole iTunes folder approach.
    If for some reason you have split the media folder from the library files then the media folder needs to restored to the same path it used to have while the library files can be copied into the music folder of your new profile.
    If in dobut, backup up the entire Documents and Settings folder before wiping the infected drive, but be selective about what you restore as many viruses drop active components capable of reinfecting the compuer in the temp folders and internet caches. It is much easier to backup more than you need than to discover after the fact that you no longer have access to some vital project you'd been storing in a folder on the desktop.
    tt2

  • Problem occurring when opening and saving files in AI SC5 with Windows 7

    Hi, I ‘am a Graphic Designer and first time working in UAE Windows 7 is basically the only OS here. My PC is:
    HP Elite 7000
    Intel® Core™ i5 CPU 2.67GHz
    4GB RAM
    32-bit
    Now to the problem, not that knowledgeable in IT stuff so here goes:
    1. Problem occurring when opening and saving files in AI SC5 with Windows 7. (You will actually see a “Not Responding” word coming out while opening and saving files, whether small or large files)
    2. Locked layers occasionally are moved accidentally.(Working on multiple layers is normal so we need to lock it specially the once on top. But there are times I still manage to select locked layers)
    3. After typing and locking the text, pressing “V” for the arrow key shortcut is still added to the text that is locked. (After typing I lock the text layer with my mouse and Press “V” to activate the arrow key… yes the arrow key is activated but the text is still typing the actual keyboard pressed)
    I’ve only use the brand new PC and installer for a month now. Not sure if this is compatibility issues or something else I’m not aware of.
    Thanks in advance to people that will reply.
    Cheers!!!

    Well I’m still wondering if it is compatibility issues because I’m also having problem with Photoshop CS5. These 3 are all bought at the same time (PC, Illustrator and Photoshop installers). The problem I’m having in Photoshop is not that too important, every time I Ctrl+O to view files, all PSD are shown in white paper like icons, no preview, and saving as well.
    Or I just purchased a corrupted or pirated installers… Adobe updates are done every time I’m prompted.

  • CS3 crashes when Opening and saving files - also runs slow

    Today, while using photoshop, it locked up on me & I had to force quit. It then wouldn't open a file either via Bridge or the open menu. I could create a new file, but it would hang while attempting to save.
    I downloaded and ran the FixVCUIFramework, and it allowed me to open and save 1 file, before it started not saving or opening again. Running the Fix again has no effect.
    I switched to another user account, and everything works fine - in fact PS runs much speedier in the 2nd user account than in my main account. I hadn't noticed how slow it had become in opening and saving.
    Any ideas of where to look in trying to repair my main account? I don't want to have to migrate everything over to the 2nd account. Bridge in the 2nd account doesn't allow me to open all my folders, so I'd prefer not to work totally with a new user account.
    PSCS3 10.0.1
    Mac 2GHZ dual 4.5 gig ram
    10 gig external scratch disk - PS running at 71%
    Mac OS X.4.11
    A day without Photoshop is like a day without sunshine ...
    Thanks

    A forced quit WILL create corruption.
    An Archive and Install of the OS will give you a fresh system in your regular account while preserving your settings. Should take you less than 45 minutes.
    But you may want to try deleting your Photoshop preferences and running the 10.4.11 update over your existing 10.4.11 system first. That may work too, and it would be faster.

  • Office 2013 applications cannot be made to show the "Documents" folder when opening and saving files

    (Windows Server 2012R2 and Windows 8.1 PRO)
    We are redirecting the user's "Documents" folder to the network (using Folder Redirection). The OS hides this fact however, and most applications simply see the "Documents" folder when opening or saving files, including Office 2003.
    Office 2013 however displays the actual path, which in this case is:
    \\sever1\redirect$\username\documents
    Even if you forcibly set the "Default local file location:"  in the Options Save area to the 'Documents' folder in, say, Word, Word immediately converts the local path to the network path.
    Is there anyway to get Office 2013 to follow the virtual path? All of other apps follow it and expose the users only to "Documents".
    Thank you so much.
    Dana

    There's nothing in my FAQ concerning screen savers, so I'm unsure why you decided to take that approach. From your description, it looks like you only tried a few of the suggestions before throwing in the towel. That's fine, it's your call.
    I don't have the problems you described with 10.4.7. Usually when folks have problems after an update, these are caused by either installing an update on an already-corrutped system or they've installed third-party applications or hardware that have been rendered incompatible by the update.
    Before installing software updates, you may wish to consider the advice in my "Installing Software Updates" FAQ. Taking the steps therein before installing an update often helps avert problems and gives you a fallback position in case trouble arises.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • How do I proceed with installation of PE_13 7z from a downloaded and saved file?

    I downloaded and saved PhotoshopElements_13_LS25_wind64.7z file using the provided dowload manager.
    The download manager did not provide instructions to install the software.
    What is my next step?
    RH

    It seems you have a zip file do you have a unzip file as well ?

  • Searching and impotring files

    Hi,
    Bought an ipod last week and have music files allover my computer, when i first installed itunes it gave me the option to search and import all music files already on my pc but i had to stop the process half way through, is it possible to start it up again?
    Thanks

    but now when I search for a specific file all versions of the file (client approved and not approved which are in separate folders within a specific job folder) are presented as thumb nails.
    If you want to search for a specific word you should use the Find command under the Edit menu and select the proper main folder and choose client approved and equals. Be sure to have also include non indexed files and including subfolders selected. Bridge needs time to index all the files so the first time you use 'include non indexed files' it may take a while.
    You could choose to create keywords or labels for approved files, it makes it easier to find and select.
    Also be aware that Bridge is not designed to work over a network and/or using a server so this might also causing some problems.

  • Using Automator and Applescript to search and move files to flash drive

    I've used applescript and automator to do simple tasks like watch folders and move files and rename files, but that is about the extent. I am wondering if it is possible to set up a automator service or app that will do several things.
    When a flash drive is plugged it, it will ask for a file to be searched for, then it will search a predetermined directory for files with the word or number in them and then it will copy the found files to the mounted flash drive.
    Any help would be greatly appriciated!
    Thanks!

    As a start, you can use launchd to run a script when a volume is mounted:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
              <key>Label</key>
              <string>com.tonyt.LaunchOnVolMount</string>
              <key>ProgramArguments</key>
              <array>
                        <string>LaunchOnVolMount.sh</string>
              </array>
              <key>QueueDirectories</key>
              <array/>
              <key>StartOnMount</key>
              <true/>
              <key>WatchPaths</key>
              <array/>
    </dict>
    </plist>
    You can then have the LaunchOnVolMount.sh script perform the tasks you need.
    You can incorporate Applescript within the Bash script with osascript:
    #!/bin/bash
    answer=$( osascript -e 'tell app "System Events" to display dialog "What file do you want to search for?" default answer "" ' )
    echo $answer
    I beleive that you can also call an Applescript from launchd

  • Problem with parameters to fix opening of old tabs and saving files when a new session is open

    Hello,
    Since 2 weeks I have a problem: I always fix my parameters to restore previous session with all my tabs and I choose that Firefox asks me where I want to save my downloaded files. Now each time I close Firefox and I reopen it, it is not taken into account, and 3 tabs are opened: Firefox, Google and Thank to install Zotero! I rechange it, but every time it opens these tabs and not my old tabs. The same for saving files. It goes back automatically to open start page and to save my file in Downloads. Even if I rechange, it comes back the same.
    I desinstalled CCleaner (I thought it could be that) but nothing changes!
    Please help. Thank you very much!
    Martha

    Here's what I would try:
    *Reset Firefox - this should fix the issue but it will change settings like where files are downloaded and what tabs open at startup back to their defaults.
    *Then change your download and session restore preferences back to how you like them.
    Here's how:
    #Go to Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    #Open the options window - Tools > Options > General
    #In the General panel set Firefox to open your tabs from last time and set Firefox to ask you where to save downloads.
    #Click OK
    That should do it. Let me know if this worked.
    Thanks,<br>
    Michael

  • Searching and viewing files

    The first few times I opened Bridge CS5 to search for and view files stored on a server it worked perfectly; specific pdf files were found from several hundred job folders and only the files in the folder that I named “client approved” were shown.
    I believe I may have cleared the cache because I have not been able to find the same files that I once previously found; yet the files are present on the server and have not moved. I have since “built and exported cache” for some brand folders but now when I search for a specific file all versions of the file (client approved and not approved which are in separate folders within a specific job folder) are presented as thumb nails. I would like for only the “client approved” files to be shown as thumb nails. How can I make this happen and work as it did the first few times I worked with Bridge?

    but now when I search for a specific file all versions of the file (client approved and not approved which are in separate folders within a specific job folder) are presented as thumb nails.
    If you want to search for a specific word you should use the Find command under the Edit menu and select the proper main folder and choose client approved and equals. Be sure to have also include non indexed files and including subfolders selected. Bridge needs time to index all the files so the first time you use 'include non indexed files' it may take a while.
    You could choose to create keywords or labels for approved files, it makes it easier to find and select.
    Also be aware that Bridge is not designed to work over a network and/or using a server so this might also causing some problems.

  • Scripting Applescript Editor and saving files

    I've created an Applescript that generates a smaller, simpler script.  I've gotten everything to work, but when I tell Applescript Editor to save the file, it doesn't work.  It doesn't error out, it acts like it finished properly, but nothing shows up in the location I told it to save.  Here's the snippet that's giving me problems:
    tell application "AppleScript Editor"
    activate
    make new document
    set contents of document 1 to fnlScrpt
    compile document 1
    save document 1 in "Macintosh HD:" as "application"
    close document 1 without saving
    end tell
    I'm going to define a more specific save location once I get it working, but for now it just saves to the top level.  It needs to save as an application, and close the script without saving it.  Any help is appreciated!

    Hi all,  I'm a little late to this thread in an attempt to get some scripts working in Lion.    Thanks for the help.  I noticed the way you set your globals, and the way you're having variables get passed on to recompiled scripts.  
    I take a different approach,  by writing my Applescript as text,  in quotation marks,  and then relying on fields getting filled in when the Applescript Editor is run, and the new script has the correct data.      I make one text entry called "QT_multiliner" and fill in variables using quotation marks and ampersands. 
    THIS FIRST SCRIPT is used to take variables given to it by a database,  and generate a custom applescript for any given record in the database.  
    set yyyymmdd to (((year of (current date)) * 10000) + ((month of (current date)) * 100) + (day of (current date))) as text
    set mmdd to (text items 5 through 8 of (yyyymmdd)) as text
    set qtPath to "/path/to/folder/" & mmdd & "/"
    set RenderPrefix to "filename_of_choice"
    set TGA_path to "/path/to/folder_with_files/" & mmdd & "/" & RenderPrefix & "/" as text
    set appletPath to "/path/to/folder/applet_name_" & RenderPrefix & ".app"
    set temp_doc to POSIX file appletPath
    --write the applet in Script Editor.  Variables will be filled in and compiled in Script Editor.
    set QT_multiliner to "tell application \"Finder\"
    set thePath to \"" & TGA_path & "\" as string
    activate
    make new Finder window
    set target of Finder window 1 to (POSIX file thePath)
    set theSequence to get first file of the front window as alias
    close window 1
    end tell
    set sequenceName to \"" & RenderPrefix & ".mov\"
    tell application id \"com.apple.quicktimeplayer\"
              activate
              open image sequence  theSequence  frames per second 23.98
              set savePath to \"" & qtPath & "/\" & sequenceName
              tell movie 1
                             with timeout of 2400 seconds
                                            export to  (POSIX file savePath) as QuickTime movie using settings alias \"path:to:settings:file\"
                             end timeout
                             close saving no
              end tell
              quit
    end tell"
    -- Write the script to its own applet 
    tell application id "com.apple.ScriptEditor2"
              set x to make new document
              set x to the front document
              set the text of document 1 to QT_multiliner
      compile document 1
              save document 1 as "application" in (temp_doc)
      quit
    end tell
    ...now,  when that is run,  the following applescript is generated with all of the variables filled in. 
    --This applet was saved by the previous script, and is saved as /path/to/folder/applet_name_filename_of_choice.app
    tell application "Finder"
              set thePath to "/path/to/folder_with_files/0112/filename_of_choice/" as string
      activate
      make new Finder window
              set target of Finder window 1 to (POSIX file thePath)
              set theSequence to get first file of the front window as alias
      close window 1
    end tell
    set sequenceName to "filename_of_choice.mov"
    tell application id "com.apple.quicktimeplayer"
      activate
      open image sequence theSequence frames per second 23.98
              set savePath to "/path/to/folder/0112//" & sequenceName
              tell document 1
                             with timeout of 2400 seconds
                                            export to (POSIX file savePath) as QuickTime movie using settings alias "path:to:settings:file"
                             end timeout
          close saving no
              end tell
      quit
    end tell
    I really liked Camelot's "script / end script" function,  it's better,  but I just couldn't get it to pipe variables through from one script to another.     Since I need to run this script on any one of dozens of computers,  I need the variables to be compiled and saved within each applet. 
    all the best,
    Vic

  • Open and saving files???

    When I try to open or save files, the pop up window wont display the existing files already on that folder. What is the problem?

    My apologies, it's not blue any more (it used to be), it's now white/grey (in 10.8). When you're in an application and click File - Save, or cmd-S, you should see the Save window, with the filename in the middle. The triangle is to the right of the filename. If the window is small, the triangle will be pointing downwards. Click it, and the window will expand and the triangle will point upwards.
    Note that, if you have iCloud Documents enabled, you may see "iCloud" under the filename. If that's the case, you're not actually looking at your computer, you're looking at your iCloud space and the expansion triangle won't work. Click "iCloud" to change to a location on your computer and the expansion triangle will be enabled.
    Matt

  • Creating and Saving File Links

    Hi, been searching the forums and internet for my answer but can't seem to find the answer.  I have a PDF that I am creating links to other PDFs on an FTP server.  When users clicks on the link, the files automatically open in the reader.  Since the files are pretty big, I would like the users to have the option to either save the file or open the file (that way they don't have to wait for the file to download before saving).  Right clicking on the link does not give me the option to save the file.  Is this a setting I need to use when creating the links to give the option to save or is there another keyboard command?  Thanks for any assistance.  I am using Acrobat Pro 8.1.3
    JT

    G'day JT,
    When using Acrobat 8 Professional -
    The right click context menu associated with an Acrobat web link contains:
    --| Open Weblink in Browser
    --| Append to Document
    --| Open Weblink as a New Document
    --| Copy Link Location
    Adobe Reader does not provide this.
    So, what is available will be a function of what the end-user has.
    For either Adobe Reader or Acrobat.
    Edit > Preferences > select the Category "Internet"
    In the Web Browser Options pane "Display PDF in browser" can be selected (default) or can be unticked.
    Selected => A PDF in web space is displayed in the browser.
    Unticked => A PDF in web space is downloaded and rendered by the PDF viewer identified to the OS.
    But, this is a User controlled setting.
    Looking about, you may come across "app.launchURL()".
    To quote from a post by Thom Parker over at the Acrobat User Community,
    "In Acrobat 7 the "app.launchURL()" function was added to the Acrobat JavaScript model. 
    This function has an input argument for forcing the web page to open in a new window. 
    If your users are on a later version it will work for them.  Look it up in the Acrobat JavaScript Reference."
    However, this would still open the target PDF - there'd be no "save target as..."
    It might be that to have a "save target as..." option you may have to provide an HTML file with links to the PDFs.
    Be well...

  • Downloaded and Saved Files Do Not Show On Desktop

    I've noticed just in the past two weeks that files such as email attachments, photos, or other files downloaded from Safari or Mail do not appear on the desktop where the default location is set. Also, this happens when I save a Word document or a document from another application (it's not application specific) and it's supposed to show up on the desktop. When I go to find them, they're not there. They don't show up in a separate Finder window either. In order to get them to show up, I have to do a spotlight search for them. Spotlight's file path for the file is always to the desktop where it's supposed to be. Once I click on it in Spotlight to see the filepath, then the file shows up on the desktop like it was supposed to. What in the world is going on?
    1) This did not start happening after an update.
    2) Not application specific - it happens no matter what I try to save to the desktop.
    3) It just started happening one day with no apparent reason.
    4) My hard drive sounds fine - no unusual noises.

    Sounds to me like you just need to Repair Permissions with Disk Utility then rebuild launch services database. Use the method described here:
    http://www.thexlab.com/faqs/resetlaunchservices.html
    This one solves lots of odd problems. And repairing permissions is just the standard first step any time you have a problem. Also, a simple restart can often fix things like this.
    Another method can be restarting in Safe Mode, right after the bong hold down the shift key until the login window appears which should say Safe Mode on it. (This automatically fixes a number of things, but if you have any font settings in Font Book you will need to redo them.) Then just restart normally.
    Kevin
    http://www.bearbyte.blogspot.com/

  • Can i back up my photos and saved files/ music using icloud?

    i don't have an external hard drive right now to back up my files before i upgrade to os x snow leopard.. i know i'm behind... so if anybody could help that would be great!!

    If you are upgrading TO snow leopard, then whichever version of OSX you are currently using, it is not compatible with icloud.  And besides, a mac cannot back up photos and music to icloud.  Few file formats can be saved there as well.  icloud is not your solution.
    If you are not using Time Machine to store backups to an external drive, then I don't know what to say.  You can't use Dropbox since it requires the files to be stored locally as well as in their cloud.  You have to get an external drive, smaller sizes are not that expensive.

Maybe you are looking for

  • Error stack size

    Hi, i have build a package framework which in exceptional situations uses an encapsulated raise_application_error method with the -add to error stack- option. In combination with -speaking- messages it seems as if i am now running against the error s

  • My new Canon MarkIII and CS2 are not compatible...

    Hi - I wish I could go into a camera shop or an Apple shop to get this sorted. But there are none where I live so I hope someone can help me. I have a legal version of CS2 and use a G5 mac. I'm a professional photographer and I want only to open my R

  • Basic Configuration Question

    I am in definite need of assistance. I have a MacBook. I have an Airport Express that I would like to use as m base station for wireless connection to the internet. I have a Motorola 2210 dsl modem. I think I have configured my Motorola 2210 dsl mode

  • Maximum number of datasources for an index.

    Hello,   Could someone comment on what is the maximum number of datasources allowed for an index-? Can we have 10 -15 datasources for a single index? I am not planning huge datasources ,each ds will be only a document in a FS rep. bcause this is the

  • Check boxes inside tree

    Is it possible to add check boxes inside Tree as elements. Can anyone please provide some sample code for that?