Applescript to start, stop and repeat background screensaver

HI.
I am very neww to applescript.
Please help me fix this applescript?
I get the error:
"Can’t make current application into type string."
This is my applescript
repeat
  do shell script
                    "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSav erEngine.app/Contents/MacOS/ScreenSaverEngine -background &> /dev/null &"
                    delay 300
                    tell application "ScreenSaverEngine" to quit
  delay 1
end repeat
Much appreciated!

Got it! Obivously a rookie mistake
repeat
          do shell script "/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.a pp/Contents/MacOS/ScreenSaverEngine -background &> /dev/null &"
          delay 300
          tell application "ScreenSaverEngine" to quit
  delay 1
end repeat

Similar Messages

  • Start, stop and restart while loops

    Hi, my qustion is i have 2 example a and example b. Example b lets u start counting up in seconds when u want to. as long as the toggle switchs are in correct position. it also lets u start, stop and restart if need be. i want to be able to that with example a, but for some reason the while loop always sets of running independent of what position the the toggle switch. Any help greatly appreciated.
    Thanks Stuart
    Attachments:
    examplealib.llb ‏202 KB
    exampleb.vi ‏25 KB

    An example as the attachment.
    Attachments:
    switch.vi ‏23 KB

  • Shell script to start, stop and restart a JAR

    Hi everyone,
    Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can indicate a method or parameter? Thanks!
    this JAR inculdes a class with main method like this:
    public class Client(){
      public Client(String name){
      public void stopClient(){
      public static void main(String[] args){
         new Client("/tmp/text.log");
    }

    Does anyone have idea to write a shell script to
    start, stop and restart a JAR under linux? That part isn't really clear.
    Start would be java -jar myjar.jar.
    Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
    Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication.

  • Shell script to start, stop and restart a JAR under linux

    Hi everyone,
    Does anyone have idea to write a shell script to start, stop and restart a JAR under linux? it can also indicate a method or parameter? Thanks!
    this JAR inculdes a class with main method like this:
    public class Client(){
    public Client(String name){
    public void stopClient(){
    public static void main(String[] args){
    new Client("/tmp/text.log");
    }

    Does anyone have idea to write a shell script to
    start, stop and restart a JAR under linux? That part isn't really clear.
    Start would be java -jar myjar.jar.
    Stop could either be kill, which kills the whole process; kill -TSTP, which suspends the process, or some application-specific communication such as sending something over a port; or putting something into a file or something.
    Restart could just be the same as start (if stop is just kill); kill -CONT, if stop was kill -TSTP; or some other app-specific communication.

  • How to start, stop and restart task

    Hello Everyone,
    Need advice on what is the correct way to start, stop and restart a Java task?
    I have tried with Executors.newCachedThreadPool() or fixedThreadPool() however I was only able to submit the task once. My program crashed when i tried to resubmit the task again after a shutdownnow command()

    Tasks are designed to be run once. If you want restart functionality, use a service:
    http://docs.oracle.com/javafx/2/api/javafx/concurrent/Service.html
    The sample service I posted in the following thread demonstrates how to do this:
    Multithreading
    Use of Executors is not necessary as a Service encapsulates the execution thread management (though you can set your own executor on the service if you really needed it). All you need to do is make use of the service start, cancel, restart and reset methods as required. If you do use the cancel method, then you need to make sure that your service is properly interrupt aware for the cancel to function as you expect.

  • DVD Start/Stop and Subclips

    Question: In my browser I have double clicked a clip, it opens in the viewer, I then go to >View>DVD start/stop and the markers are inserted. Once I go back to the browser and highlight the markers and go to Modify>make subclips, FCP will only convert about 27 or 28 of the markers to subclips, when there is actually over 100 markers. Is there a maxium limit on the number of markers that can be converted or that will appear in the browser list? Hope I am clear.
    G5-1.8GHz-2GB DDR SDRAM- 250 ATA HD just upgraded to FCP 5.1
    Thanks,
    Mary
    Power Mac G5   Mac OS X (10.4.8)  

    I've done it both ways, not sure which is easier.
    HDV capture creates individual clips (individual media files) based on the detected start/stop and uses a name you specify at the initiation of the capture appending a sequence number to the end of the name for each new clip. S/S detect always uses the name "Segment". Like the Segment clips, HDV clips are in natural order, as you say. I'm guessing that the file system is smart enough to consider the entire number at the end of a name, but sorts character by charcter if the number is in the middle of the name.
    Just seems a little short sighted to use different naming conventions for essentially the same function, especially when it causes the files to be out of order.

  • How start, stop and access BAM?

    Hi,
    I have installed BAM and now I do not know how to start and stop the application. Also I am not able to access to the home page.
    I installed BAM by double clicking the setup.exe file. After following all the installation steps, a new folder has been created in my C drive (C:\OracleBAM). Inside that folder, there is another one called ClientForBAM. Should I have other folder besides the client? Inside the ClientForBAM there are lots of folders.
    In the Windows Start menu I have a new group called Oracle_ClientForBAM32100. From there, I can access to:
    - Configuration and Migration Tools
    - Desarrollo de Aplicaciones (sql plus)
    - Herramientas de Configuracion y de Migracion (Net manager)
    - Herramientas de Gestion Integradas (Wallet Manager)
    - Oracle Instalation Products
    So, there is no menu option to start, stop or access to BAM. I've read documentation about this and saw that the home url was: http://simge-eai-dev:8081/oraclebam (my host is simge-eai-dev, and my port 8081) But when I type that url in my browser I get the following error:
    Error HTTP 404 - No se encontró el archivo o directorio. (file or directory not found)
    Servicios de Internet Information Server (IIS)
    I looked at the logs and I found this in the sqlnet.log
    Fatal NI connect error 12514, connecting to:
    DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=simge-eai-dev)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SIMGE)(CID=(PROGRAM=C:\oracle\product\10.2.0\db_1\bin\nmupm.exe)(HOST=SIMGE-EAI-DEV)(USER=SYSTEM))))
    This in the operf10.log
    2/18/2008 15:2:27 UPI_CONNECT failure: error 28000 Hostname SOASUITE Username SYSTEM =(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle10)(ARGV0=oracle10orcl)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))')))(CONNECT_DATA=(SID=ORCL)))
    Can anybody help me with this? How can I know if the BAM is running or not?
    Thanks in advance,
    Zaloa

    Finally I found out what was happening.
    Only the client was installed because in order to install the whole thing, it is necessary to execute the setup file twice.
    The first time, the client is installed and the second time, the server.
    Regards,
    Zaloa

  • Start Stop and Run button.

    hello,
    I have one question, I want one button which can be run/start/stop button. I can't compile the program with "Run when open", because I need the user enter a string and a configuration, however after the user enter a configuration, I want that a START button, and when the user want press the same button to STOP all the program. All without pressing the "Run button (white arrow)". So the sequence it will be:
    1- open the ".exe"
    2- configure the variables such as: file name, file path, comments.....
    3- press START button, and the system will start acquisition.
    4- press STOP button and the program stopped and save all the data in a file.
    It is that possible? Could anyone help me with it? Or send me and example?
    Best regards,
    Anna.  

    Hi,
    You can do something like this.
    Compile it with "Run when open".
    Best regards
    Matej
    CLAD using LV 8.2, 2010 and 2012
    R&D Laboratories
    Domel d.o.o.
    www.domel.com
    Attachments:
    StartStopAndRun.vi ‏13 KB

  • Adding music to flash problem mp3 to long not stop and repeating

    i added a music file to the stage, the movie clip is only about 35secs long. the music is like 3mins long.
    anyway my problem is that the movie clip stops and music continues playing. and the movie clip and music start playing again
    while the first music is still playing. and it sounds as if it continuing to do this.
    how do i stop the music when the movie clips end.
    is there some actionscript code that will stop this.

    kglad meant that you set the sound sync to Stream instead of Event. To do that select the frame where you added the sound, then in your properties inspector you will see Sound, Effect, Sync. Choose Stream in the Sync drop down box.

  • How do I start, stop and restart a sequence with a periodic input?

    Hi,
    I have written some code that will monitor my com port (rs-232) continuously for an ASCII character (in this case a 'P'). When the P is received, I want a sequence structure to start working. The P will only appear once for a short while, but the sequence should carry on running until it finishes all the frames. On the next time a P appears on my monitor, I want to either stop the sequence structure regardless of which frame its in and restart the sequence from the beginning again or to run the sequence from the start again if it has already completed all the frames.
    What sort of structure do I need to do this, are there any examples?
    James

    James,
    Indiana is correct, my take on this is similiar.
    If you have a 3 element sequence structure for example which runs if 'P' is returned from your COMs thread, you will need to query a variable in each element of the sequence in order to suspend execution of the next/remaining elements in the sequence if this event occurs. You can do this by reading the variable that your COMs thread sets using a case structure in each element of your sequence. In order to re-run your sequence if 'P' is returned during the execution you can simply set the suspend variable and ensure the code is in a while loop to recall the code.
    See the attached example code/screen shot:
    This is however not an elegant solution and the best way would probably be using the events structure and a user event to queue the P events. This is available in 6.1 but I believe its the professional package. See also my implementation using this method, again attached below:
    Hope this helps,
    Kind Regards
    Steven Bird
    Applications Engineer
    National Instruments
    Attachments:
    Example.JPG ‏194 KB

  • Shell script for start stop and restart standard

    Hi,
    I'd like to know if there's a standard template for shellscript for a kind of stop|start|restart execution of a server or stub.
    If you have any link or some info that explain how to do that nicely it would be nice!
    Thank you

    There's plenty of live examples in /etc/rc.d

  • Edit Cluster Start-stop- and Monitor-Scripts via Bash?

    Hi,
    is there a way to edit (and sync!) the Cluster-Scripts via CLI?
    Regards
    Bernd

    The short answer is no. The scripts are stored in eDir, and NCS keeps revisions of them internally. The best place to edit them is iManager. Alternatively, you can directly change the eDir attributes for those scripts while cluster is down.
    That said, everything that iManager does comes in through a file interface. If you goal is to script resource modification, you can always access the file interface directly.
    Regards,
    Changju
    Originally Posted by toblerone
    Hi,
    is there a way to edit (and sync!) the Cluster-Scripts via CLI?
    Regards
    Bernd

  • Start/Stop Buttons and infinite loop exit

    I am trying to make a GUI with a Start/Stop and an Exit button. Initially the button will have the label "Start". When i push it, its label should become "Stop" and an infinite loop function will begin. I want the loop to run until i press the Stop or Exit button.
    The problem is that when the loop starts i can't press neither of the buttons. The "Start" button changes its label into "Stop" only if i make the loop finite and it ends.
    Here is the source:
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    public class StartStopButtons extends JFrame{
        Component visualComponent = null;
        JPanel panel = null;
        JLabel statusBar = null;
         public StartStopButtons() {
              setSize(160, 70);
              getContentPane().setLayout(new BorderLayout());
            panel = new JPanel();
            panel.setLayout(new BorderLayout());
            getContentPane().add(panel, BorderLayout.CENTER);
            final JPanel panel_1 = new JPanel();
            panel.add(panel_1, BorderLayout.CENTER);
            final JButton startButton = new JButton();
            startButton.addActionListener(new ActionListener() {
                 public void actionPerformed(final ActionEvent e) {
                    String action = e.getActionCommand();
                    if (action.equals("Start")) {
                         System.out.println("Start Loop");
                         startButton.setText("Stop");
                         myLoop ();
                    if (action.equals("Stop")) {
                         System.out.println("Stop Loop");
                         System.exit(0);
            startButton.setText("Start");
            panel_1.add(startButton);
            final JButton exitButton = new JButton();
            exitButton.addActionListener(new ActionListener() {
                 public void actionPerformed(final ActionEvent e) {
                    String action = e.getActionCommand();
                    if (action.equals("Exit")) {
                        System.exit(0);
            panel_1.add(exitButton);
            exitButton.setText("Exit");
         public void myLoop() {
              for (int i = 0; ; i++)
                   System.out.println(i);
         public static void main(String[] args) {
              StartStopButtons ssB = new StartStopButtons();
              ssB.setVisible(true);
    }

    I works just fine. Here is the source and thanks for the help.
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.UIManager;
    public class StartStopButtons extends JFrame implements ActionListener, Runnable{
        Component visualComponent = null;
        JPanel panel = null;
        JLabel statusBar = null;
        Thread thread;
        JButton startButton;
         public StartStopButtons() {
            try {
                UIManager.setLookAndFeel(
                    UIManager.getSystemLookAndFeelClassName());
            } catch(Exception e) {}
              setSize(160, 70);
              getContentPane().setLayout(new BorderLayout());
            panel = new JPanel();
            panel.setLayout(new BorderLayout());
            getContentPane().add(panel, BorderLayout.CENTER);
            final JPanel panel_1 = new JPanel();
            panel.add(panel_1, BorderLayout.CENTER);
            startButton = new JButton();
            startButton.addActionListener(this);
            startButton.setText("Start");
            panel_1.add(startButton);
            final JButton exitButton = new JButton();
            exitButton.addActionListener(new ActionListener() {
                 public void actionPerformed(final ActionEvent e) {
                    String action = e.getActionCommand();
                    if (action.equals("Exit")) {
                        System.exit(0);
            panel_1.add(exitButton);
            exitButton.setText("Exit");
         public void actionPerformed(ActionEvent e) {
              String action = e.getActionCommand();
              if (action.equals("Start")) {
                   startButton.setText("Stop");
                   thread = new Thread( this );
                   thread.start();
              if (action.equals("Stop")) {
                System.exit(0);
         public void run() {
              myLoop();
         public void myLoop() {
              for (int i = 0; ; i++)
                   System.out.println(i);
         public static void main(String[] args) {
              StartStopButtons ssB = new StartStopButtons();
              ssB.setVisible(true);
    }

  • Player stops and starts intermitently

    My player just suddenly started stopping and starting unwantedly. Player lives in a hard case with rubber coating. Never dropped, or any issue of the
    sort. I have alot invested in this device, help needed please.

    Try:
    - Reset the iOS device. Nothing will be lost      
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings                            
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                               
    iOS: Back up and restore your iOS device with iCloud or iTunes
    - Restore to factory settings/new iOS device.                       
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
      Apple Retail Store - Genius Bar                              

  • How to make an effect stop and start again?

    How do I make an effect start stop and than start again?
    I'm trying to blur faces (I finally figured out how to do that---copy the video to a 2nd layer and use the mosiac and crop effects) but how do I make the effect only appear when the face is in the screen as multiple times throughout the video clip the subjects face goes off camera.  In the effect controls window it doesn't give me an option to add a blank keyframe.
    Any advice on how to have this effect start/stop multiple times in one clip??
    Thanks

    If the effect isn't keyable, try keyframing the transparency of the copy with the effects on it.

Maybe you are looking for