Getting Powerpoint to close running presentation, and open another?

Background: Using a Mac Mini (10.4.8) to drive a Digital Signage display. Apache/PHP/MySQL serves a web interface that runs Python scripts that send serial commands (Via Keyspan USB-Serial) to control the display. All that works. There's also a way to upload Powerpoint files to the system, and Powerpoint is always running to provide display content. I'm using folder actions and Applescript to provoke the display of the content once it's uploaded. This is where I get into trouble:
I was just opening the file (a Powerpoint Slideshow) and that works the first time. But the next time I do it, it opens another hidden window, so it looks like the content never updates.
So I'm trying to tell application Microsoft Powerpoint to stop the slideshow and close the file, then re-open the file. This part I can't figure out. I can't get Powerpoint to do anything.
I've been using Macs for years and can do PHP/MySQL and Python, but the sad fact is I don't know jack about Applescript. I've also just realized I don't have my existing code handy to post. It's on a computer behind a firewall at work. Sorry, I'll post my code tomorrow.
In the meantime, if someone wanted to wanted to crank out some psuedo-code for me, almost anything would probably help me understand what I'm doing wrong.
Thanks,
Mac Mini   Mac OS X (10.4.8)  

OK, now I'm even more confused.
Telling Powerpoint to stop the show and close open documents works. If I make a script that's just:
on adding folder items to this_folder after receiving added_items
try
tell application "Finder"
open document file "display.pps" of folder "Powerpoint" of folder "Shared" of folder "Users" of startup disk
end tell
end try
end adding folder items to
...that also works to open the file like I want.
BUT... If I put both the Powerpoint commands and Finder commands in the same script, Powerpoint will close the file like it's supposed to, but the file never opens in the finder.
So, why won't the 2nd part work when it's after the first part in the same script, but it will work when it's all by itself?
Thanks for any advice or help,

Similar Messages

  • Close one vi and open another

    Hi
    Is it possible to open another vi when I click a button and close the current vi.
    thanks 

    Here, try this. Enter the path to the VI you want to launch and run the program. When you press the button, the VI you specified will be launched and the program will be closed.
    Mike...
    Message Edited by mikeporter on 07-02-2007 07:43 PM
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    launch on click.vi ‏19 KB

  • Close current gui and open another?

    how can i close the current gui and then open another? what would be a suitable way to so? so far i do it using the following code but it does not close the current window and it takes a couple of seconds to load the other gui screen..
       private void btn_registerActionPerformed(java.awt.event.ActionEvent evt) {                                            
             Register Register_gui = new Register();
             Register_gui.setTitle("Login");
             Register_gui.setSize(467, 460);
             Register_gui.getSize();
             Register_gui.setVisible(true);// TODO add your handling code here:
             new Login().setVisible(false);
        }     

    Instead of new Login().setVisible(false); use dispose();This assumes that the event handler is a member of the frame you want to close. If not, you'll have to provide the handler with a reference.

  • How come my safari windows disappear when I close my laptop and open again? The safari windows I wanted to keep running for the next time I open my laptop disappeared. Why? Help me.

    How come my safari windows disappear when I close my laptop and open again? The safari windows I wanted to keep running for the next time I open my laptop disappeared. Why? Help me.

    Important note, do NOT sleep your macbook Air with headphones attached until this is resolved.
    Ive done a good best of testing on same to confirm not to do that
    also if you have the APP "BOOM" installed........ remove it

  • When I close Firefox and open another instance of it to look at a new site I get a pop up window telling me Firefox hasn't shutdown yet.

    When I close Firefox and open another instance of it to look at a new site I get a pop up window telling me Firefox hasn't shutdown yet. I am aware of tabs, but I prefer to just open new windows.
    Do I really need a pop up window telling me that I just closed Firefox? Is there a way to disable it in options? I can't even use Buzof program to auto click for me. I've never had this issue with any other browser and I find it incredibly annoying.

    I am not clear what you mean by:
    ''the program will only alow 1 website for each time I boot my machine,''
    Are you talking about Firefox or something else in the above statement. Firefox will, or should allow you to open quite a few tabs at startup if you wish, although it will be faster the fewer that you do open.
    When you say
    ''I close it the program does not completely close ''
    Again what is happening, what error messages if any do you see, and what exactly makes you think Firefox is not closing properly.
    Presumably you have already clicked on the blue links in my first post and read those articles.

  • Close the current UI and open another one

    Hello everyone,
    I've got the following code and I want to close the current window and open another one. When i use "System.exit(1);" it closes everything when I use "this.dispose()" it doesn't close anything what could I try to get this to work? any suggestions?
    the code is:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    //public class Equip_or_Job implements ActionListener {
    public class Equip_or_Job extends Frame implements ActionListener {
        JFrame dFrame;
        JPanel jePanel;
        JButton choice;
        JComboBox jeqid = new JComboBox();
        public Equip_or_Job() {
            //Create and set up the window.
            dFrame = new JFrame("Work with Jobid or Equipid");
            dFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the panel.
            jePanel = new JPanel(new GridLayout(2, 1));
            dFrame.getContentPane().setLayout(new BorderLayout());
            //Add the widgets.
            addWidgets();
            //Set the default button.
            dFrame.getRootPane().setDefaultButton(choice);
            //Add the panel to the window.
            dFrame.getContentPane().add(jePanel, BorderLayout.CENTER);
            //Display the window.
            dFrame.pack();
            dFrame.setVisible(true);
    Create and add the widgets.
        private void addWidgets() {
             //Create widgets.
              jeqid.addItem("Chose by Job");
              jeqid.addItem("Chose by Equipment");
              choice = new JButton("Chose");
                //Listen to events from the Convert button.
                choice.addActionListener(this);
              jePanel.add(jeqid);
              jePanel.add(choice);
        public void actionPerformed(ActionEvent event) {
              String sel = (String) jeqid.getSelectedItem();
            if("Chose by Job".equals(sel)){
                   InsertNewDates inj = new InsertNewDates();
                   //System.exit(1);
                   dispose();
              else if("Chose by Equipment".equals(sel)){
                   InsertNewDates ineq = new InsertNewDates();
                   //System.exit(1);
                   dispose();
    Create the GUI and show it.  For thread safety,
    this method should be invoked from the
    event-dispatching thread.
        private static void createAndShowGUI() {
            //Make sure we have nice window decorations.
            try {
                   UIManager.setLookAndFeel(
                        UIManager.getCrossPlatformLookAndFeelClassName());
              catch (Exception e) { }
            Equip_or_Job eorj = new Equip_or_Job();
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    thanks in advance :o)

    I'm not exactly sure what you want to do, but...:
    dFrame.setVisible(false) hides the current Frame and the application is still running
    Best reagrds, Marco

  • Every time i close my macbook and open it the airplay icon disappears from both the menu bar and itunes

    every time i close my macbook and open it the airplay icon disappears from both the menu bar and itunes or i get an error when i try to use it
    do you know why and how to solve this problem?

    Hi Colin,
    A couple of things you can try:
    Open System Preferences and click on Network. Click on the small gear icon below the list of connections and select Set Service Order. Move your AirPort connection up to the top of the list so it will be first in line when your computer searches for connections. (It's probably looking for ethernet connections first..the normal default..and finding none, it then looks for wireless. This takes time.
    Click on your AirPort connection again to highlight it and then click Advanced in the lower right of the pane. Make sure your wireless network is at the top of the list. Delete other networks that you don't need.
    Finally, make sure there is a check mark in the box next to "Remember any network this computer has joined".
    See if one of these actions will help.

  • My Macbook Pro (OSX 10.6.7 2.26 GHz Intel Core 2 Duo) has started misbehaving on me. When I'm working, the cursor will start spontaneously moving to the left in a straight line, and randomly right clicking on things.  If I close the computer and open it b

    my Macbook Pro (OSX 10.6.7 2.26 GHz Intel Core 2 Duo) has started misbehaving on me. When I'm working, the cursor will start spontaneously moving to the in a straight line, and randomly right clicking on things.
    If I close the computer and open it back up, it sometimes stops for a little while, then will spontaneously start again. Any help would be truly appreciated. Thanks!

    See this knowledge base article. Also, you might want to update to 10.6.8 (don't know that that will fix your problem, but it's the latest version of Snow Leopard).
    Clinton

  • When I switch between networks firefox is not working. I will have to close the browser and open it again!?

    Hi,
    I love firefox!!! I wanted it to be perfect all the time, one issue I come across with it recently is: When I switch between networks (say connecting to myoffice network through VPN when firefox is already open) firefox is not working. I will have to close the browser and open it again to make it work! could you please fix this.
    Thanks.
    Raja Pattamsetty

    If an option or preference settings not being saved after you restart firefox see:
    [http://kb.mozillazine.org/Preferences_not_saved Preferences not saved]
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • Why do my animated themes only work the first time I open the window? Every one that I have tried stops animating if I close the window and open a new one.

    The headline pretty much sums up my problem. Basically, I picked a few different animated themes to try out in the Add-Ons section to personalize my browser window. They look great initially, and in the window that is open when I actually enable the theme. However, if I close that window and open a new one, the theme is stationary and no longer animates.

    Sorry......I was just too impulsive. ( Maybe because it was 4 AM at Taiwan, and I was still trying to solve the problem= = )
    Although to install the add-on "Personas Shuffler" can solve the problem to me, I don't think it was the BEST solution. This evening, I read why the add-on "Personas Shuffler" was made, and found that the BEST solution is:
    1. Open a new tab, and type "about:config" at the URL bar, then search for "lightweightthemes" with the filter.
    2. Change the values of "lightweightThemes.persisted.footerURL" and "lightweightThemes.persisted.headerURL" from true to false( by double click on them).
    3. After doing so, restart Firefox and you will see it works! You don't have to install any add-on.

  • My device some times untel i update to ios7 when i open the device donot open untile i close all device and open agein and when i make call  i recive massege and the device donot close by itselfe

    My device some times untel i update to ios7 when i open the device donot open untile i close all device and open agein and when i make call  i recive massege and the device donot close by itselfe

    LadySarah
    You cannot upgrade from v6 to v7 without purchasing iLife 08.
    Can you give more details about your crashing issue. Make of camera etc.,
    You can start with the troubleshooting basics:
    1. Repair Permissions using Disk Utility
    2. Delete the com.apple.iPhoto.plist file from the home / library / preferences folder. You'll need to reset your User options afterwards.
    3. Create a new account (systempreferences -> accounts), create an iPhoto library there and see if the problem is repeated. If it is, then a re-install of the app might be indicated. If it's not, then it's likely the app is okay and the problem is something in the main account.
    Regards
    TD
    Regards
    TD

  • Closing one GUI and opening another?

    Hi guys,
    (I didnt really know which forum to post this in, so apologies in advance if this is the wrong one).
    I have created a login screen for a system, LoginScreen.java, which accepts a username and password and checks these on the server for validity. This all works fine.
    Once an account is accepted as valid I would like for the login screen to close, and the actual main GUI, Client.java, to open.
    Can anyone tell me the code for doing this? (closing one GUI and opening another).
    Please ask if you need more information on my code.
    Many thanks!

    You can make the Client.java as your main program then just call the LoginScreen.java.
    import javax.swing.*;
    public class Client extends JFrame {
    public static void main (String[] args) {                     
         Login log = new Login();
         log.show();     
    // Here you can put validation if the user is valid before displaying the main GUI
    // If valid user
         Client clt = new Client();
    clt.show();     
    // } else {
    // System.exit(0);
    public Client() {
         super("Client Java");
         setSize(400, 300);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    class Login extends JFrame {
    public Login() {
         super("Login Java");
         setSize(200, 300);
    }

  • How can I give a name to excel sheet and open another one?

    Hello!
    I use CSVWriter for writing in excel file.
    I have 2 questions:
    1.     How can I give a name to a Sheet in excel file?
    2.     How can I save the first Sheet and open another one with a different name?
    Thanks!

    This is the equivalent in Apache POI which may or may not help. I've never used CSVWriter.
    HSSFSheet sheet1 = workbook.createSheet("sheet1Name");
    HSSFSheet sheet2 = workbook.createSheet("sheet2Name");Then you can use either sheet object to write your contents. Look at the documentation for CSVWriter that pertains to sheets as it should tell you how.

  • How to exit from a WebDynpro ABAP application and open another url

    Hi Friends,
    How to exit from a WebDynpro ABAP application and open another url like (www.yahoo.com) in the same window of the WD4 application on click of a Button?
    Regards,
    Xavier

    Hi,
    First of all you should create outbound plug in the window you are trying to exit with plufg type "Exit"
    Then create method handler in the view with this code
            data lo_view_cntr type ref to if_wd_view_controller.
            data lo_win_cntr type ref to if_wd_window_controller.
            data: l_parameter_list type wdr_event_parameter_list,
                  l_parameter type wdr_event_parameter,
                  l_val type ref to data,
                  l_val_url type REF TO data.
            field-symbols: <fs> type any,
                           <fs_url> type any.
            lo_view_cntr  = wd_this->wd_get_api( ).
            lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).
            CREATE DATA l_val type c.
            CREATE DATA l_val_url type string.
            ASSIGN l_val->* to <fs>.
            ASSIGN l_val_url->* to <fs_url>.
            <fs> = 'X'.
            <fs_url> = 'http://your-link.com'.     
            l_parameter-name = 'URL'.
            l_parameter-value = l_val_url.
            INSERT l_parameter INTO TABLE l_parameter_list.
            lo_win_cntr->if_wd_view_controller~fire_plug( EXPORTING plug_name = 'EXIT_PLUG'
                                                                    parameters = l_parameter_list ).
          You can easily change this logic to exit application instead of redirecting to the site
           just changing to
           l_parameter-name = 'CLOSE_WINDOW'.

  • How to minimize a window and open another app

    How to minimize window and open another app

    There is no "minimize". You can bring up the recent applications by double tapping the Home button. A single tap of the Home button will take you back to the Home screen.

Maybe you are looking for