Scripting question - how do you close an application

I got an excellent script by Bill James that opens a series of requests after having timed delays (see below). I would like to adapt the script to CLOSE an application that has been opened, but does not know how to do this. Any tips? Thank you

PJS

Script delay, Bill James (http://billsway.com/vbspage/)

SecondsToDelay = '5 '.
ProgramToRun = 'iexplore' [insert the full path]
Wscript.Sleep(SecondsToDelay * 1000)
PROG = Chr (34) & ProgramToRun & Chr (34)
CreateObject ("WScript.Shell"). Run (Prog)

SecondsToDelay = "10".
ProgramToRun = 'winword' [insert the full path]
Wscript.Sleep(SecondsToDelay * 1000)
PROG = Chr (34) & ProgramToRun & Chr (34)
CreateObject ("WScript.Shell"). Run (Prog)

Thank you. Will do.

PJS

Tags: Windows

Similar Questions

  • How do you open the application you downloaded? / Como abro app as de?

    Hello! I downloaded a program to edit videos, but how do you open the application you downloaded?

    Hola! It has descargado a programa en application pero como lo ahmed? solo of "Actualizado.

    Please refer to launch Adobe Creative Cloud apps

    Concerning

    Hervé Khare

  • You close the applications on your Apple Watch?

    When you open an application on your watch and you return home after using it, the app will automatically close on its own, or must you close an app Im just find that when my watch is not in use and its just sitting on my night stand his continue to die. It's about the apps. ?

    Hello

    None of your applications to close when you stop using their

    Make sure is power sector when you put the watch on the load

    And buttons to the top.

    See you soon

    Brian

  • How do I close the application currently running on the Tablet BlackBerry® Simulator.

    I'm new to blackberry Tablet

    I wasn't able to close the application and come to the home screen to check the new application.

    When I reboot and then I can able to see the home screen

    Can someone help me to go to the home screen when the application is running.

    Try to drag the mouse to the top of the bevel down/down (make sure that you start bevel).

    Once the application has been reduced in the center of the main screen you can drag it again to close it.

    . H

  • How to automatically close the application?

    When just by clicking on a PDF file and choosing to print, Adobe Acrobat (or reader) opens and then reduced to a minimum.  Is it possible to have self-closing?

    Hi js29109250,

    You cannot automatically close Adobe application.

    Whenever you print any file by right-clicking, it opens the default application for this file. There is no way the application closes automatically.

    Kind regards

    Meenakshi

  • Question how enable or disable an application such as Adobe Flash Player or a Norton Toolbar?

    Question

    How to enable or disable an application such as Adobe Flash Player or a Norton Toolbar?

    Hello

    Click the IE 9 gear icon in the upper right of the window and choose "Manage Add-ons." Select the toolbar and Extensions in the left pane, under Add-on Types, and scroll down to the entry for the Adobe flash player and the Norton toolbar. Choose one of these, then click Disable in the lower right.
    and the next time you start IE, a notice will appear at the bottom of the window to inform you that the particular plug-in is ready for use. Click on the button "do not allow".
    Thank you.
  • How offer you a Mac application that is in the App Store, but not in iTunes?

    I found a Mac application, I want to buy a gift that is only sold on the App Store. Help Apple says we can do through the iTunes Store, but the only version for iOS, not for the Mac. I don't see anyway to gift an app on the App Store, and so for this Mac application, No. way to gift there.

    Any ideas?

    Yes, it has no function of gift in the Mac App Store. You can use the iTunes app to buy a gift certificate e-mail for an amount close to the price of the app. Or you can buy and send an iTunes Gift Card available in many stores the.

    By the end of 2012 mini Mac, OS X El Capitan 10.11.2; Apple Watch, 38 mm silver AL, Watch OS 2.1; iPad 2 & iPhone 6 + iOS 9.2 air

  • How can you close a hotmail account?

    I have to close my hotmail account, please reply as soon as POSSIBLE!

    Hello

    The question you have posted is related to Hotmail and Windows Live Solution Center would be better suited. Please visit the link below to find a community that will provide the best support.

    http://www.windowslivehelp.com/product.aspx?ProductID=1

    Amrita M

    Microsoft Answers Support Engineer

  • New motherboard new OEM Win 7 but how do you reload old applications/data backup image.

    Hello

    I had my motherboard die so have succeeded him and tried to reload a disc image saved, but this failed. When I looked inside, I found that I cannot use my copy of Win 7 (OEM) as a new motherboard is considered a new PC. Boring, but I understand so I got a new OEM copy and loaded it very well and now the PC works fine.

    Now, I want to be able to restore my old applications and data, but the backup I includes the old OEM Win 7 if I restore it I have the same problem again.

    Any ideas?

    Michael

    If she cannot reload, you'll just reinstall your applications manually and restore your files. If you have used the Image of the system to save the old installation, you can mount the image as a .vhd and retrieve your personal files.

    Also noted that it is the motherboard that is dead. What hard drive? It should always be bootable although you change the motherboard.

    http://notebooks.com/2011/02/25/how-to-browse-and-copy-files-from-a-VHD-system-image-backup/

  • Once you are done with apps, how do you close them to return to your start screen?

    When I'm done with an app find it me difficult to go back to my home screen. I'll be back by clicking on it in the corner of the screen and then to get the application to display in the corner. I then right click on it so it shows close and that's how I do it. Is there another way to do that is faster and easier to do?

    NH

    Use the mouse.  Top of the screen > click to 'capture' > drag to the bottom of the screen > drop

  • How can I close the Application Adobe handler?

    The application manager is stuck on my dock and won't close/exit.

    When I update my Adobe software, that it stops and a notification says Adobe Application Manager should be close first.

    You can force quit of Activity Monitor.

    Close all open Adobe applications,

    Don't forget to put an end to all Adobe processes as creative cloud, CoreSync, AAMUpdater, Adobe Crash PDAPPdemon... .etc

    Applications > utilities > activity monitor.


    Then again the cloud creative app and try to update.

  • How do you open Dreamweaver application once you have downloaded the application?

    I have just joined creative Cloud for the first time and downloaded the Dreamweaver application.  When I open the creative cloud application, it only gives me the possibility of opening the Dreamweaver application.  When I click on the link, it takes me to the download page.

    Exactly how you launch the Dreamweaver application to start working on web pages?

    Thank you

    Mary

    Once downloaded and installed, it will be in your Applications folder or programs, depending on your operating system just like any other program.

    You don't throw them the application of cloud.

  • Newbie script question: how to change a story in a particular style

    I am new to scripting and I'm getting to know the built-in script FindChangeByList. (I use InDesign CS4 for Windows.) I use the excellent script to find tapes of changes by Martin Fisher (modified by Kasyan Servetsky). It works brilliantly, but I have a question. I want to add a string of FindChangeList who take an object any selection or history and put it all in a style particular (the real name of my style is "Body2.TextIndent"). This should be the best thing to do, but as a newbie, I'm puzzled. The only thing I could come up with was to find 'any character' and replace it with the style I wanted, so something like this:

    text {"findWhat: ' ^?} "} {appliedParagraphStyle:"Body2.TextIndent", changeConditionsMode:1919250519} {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, wholeWord:false, caseSensitive:false} //Transform the history in the Body2.TextIndent style

    This does not work, but it's very, very slow. I guess the program must change all the characters of the style I want, that's why it takes so long. Is there a faster and more efficient way to write this? Yet once, I'm just trying to turn the story into a particular style. Obviously, this could be done in two clicks in correct InDesign, but I want to integrate this into the syntax FindChangeByList.

    Thank you!

    P.S. is there a difference in the use of FindChangeByList in the Javascript version compared to the version of Visual Basic? I took the version of Visual Basic to chance and that's what I use.  (I use the script to find tapes of change to develop my strings, as I indicated above.)

    Of course, this could be done in two clicks in correct InDesign, but I want to integrate this into the syntax FindChangeByList..)

    Why do you want to use FindChange for this? It is horribly inefficient. Whence this requirement? Or you just want to tell you want to do in a script, not that it must be a FindChange script?

    The paradigm of right in the scripts here is the same that interactively - set the appliedParagraphStyle for each of the selected paragraphs, a loop on those paragraphs. Do not do operate at the level of the character and do not use FindChange.

  • How do you close firefox by double clicking on the top left corner?

    as you know how you can do it in other programs? When I do in firefox is just minimize the window instead of closing.

    Hello, Bluehippo, by default, the title bar windows with features you mentioned is hidden by firefox. in order to activate the title bar, mode customization of firefox and then check on the lower left: controls, buttons, and Toolbars Customize Firefox

  • I forgot the answers to security questions how can you help me

    و

    You must ask security team account Apple to reset your security questions. To contact them, click here and choose a method; If this page does not list one for your country or if you are unable to call, complete and submit this form.

    (142826)

Maybe you are looking for

  • How to disable drag and search, it open too many unwanted tabs.

    I used my cursor when reading Web pages. Whether it is a good thing or not, I have no intention to change. I guess that I am not only to have this habit. The problem is that in the Firefox browser, all drag accidental selected content (image or text)

  • Laptop does not go beyond the the BIOS splash screen

    Hi, I have one of these laptops the DV6000 feared. He died a few weeks ago (powers to the top, but nothing on the screen) and this weekend I did the heat gun reflow. In any case, which seemed to be "fixed." Now, here's the problem. When I turn, I see

  • HP Photosmart 3310 all-in-one print additional pages

    I have this printer connected to my Mac Book Pro for a Mountain Lion to 10.8.5. The printer is connected via USB. What began to happen recently, it is that whenever I have send anything to the printer, it prints - but then about 30-60 seconds later,

  • carrier current adapters

    I am trying to connect to carrier current adapters in my house. the first will be with my new computer with windows 7 in the basement, the second being with my old computer running windows xp on the top floor of a 3-storey house. I'm trying to connec

  • Message of paper jam paper on PC but not paper jam printer

    When I go to print, printer status box rpet 'paper jam' and it will not be printed, but there is no jam of Pope.  I have connected the printer to other computers and laptops, I have, and the printer works fine, then, of course, that there NO paper ja