Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: HELP with a Batch File  (Read 2611 times)

0 Members and 1 Guest are viewing this topic.

tacsuma

    Topic Starter


    Starter

    HELP with a Batch File
    « on: June 22, 2010, 05:17:56 AM »
    Hi all :-)

    I am trying to write a batch file to do the following hereunder:

    I want the batch file to open a webpage. As soon as the webpage opens a prompt appears on the screen; the prompt requires someone to choose between 3 options - OPEN, SAVE or CANCEL. I need the batch file to choose  the 'SAVE' button and to save the file in a particular folder on the C drive.

    The above NEEDS to be done by the batch file since the computer will be unattended.  It also needs to be done between 12 am and 6am as this is the only timeframe that my internet service provider lets me download an unlimited number of items for Free.

    Any help would be much appreciated.

    tacsuma

      Topic Starter


      Starter

      Re: HELP with a Batch File
      « Reply #1 on: June 22, 2010, 05:24:34 AM »
      Just to make things clearer, the Prompt which appears on the screen when the webpage opens happens automatically. I need to figure out a way to make the Batch choose between the options presented in the prompt ie. OPEN, SAVE and CLOSE.

      I want to be able to download at least 1 file every hour between 12am and 6am.  But since I will be unable to use the pc while I sleep, I need a batch file to do that for me  8)

      I know the part of how to open Internet Explorer through a batch command but the rest is something I need the help with!!

      Sidewinder



        Guru

        Thanked: 139
      • Experience: Familiar
      • OS: Windows 10
      Re: HELP with a Batch File
      « Reply #2 on: June 22, 2010, 06:23:11 AM »
      I know the part of how to open Internet Explorer through a batch command but the rest is something I need the help with!!

      Opening an IE page is about the only thing you can do with a batch file. IE has an object model which can be scripted by any COM aware script language (VBScript comes to mind).

      I'm not understanding the purpose of the prompt. The web page can be programmed using the web controls already on the page. Think of the script as an automated user sitting at the keyboard.

      Coding a web page is very specific. There is no generic solution. Please post the web page address so we can see what we're up against.

       8)
      The true sign of intelligence is not knowledge but imagination.

      -- Albert Einstein

      tacsuma

        Topic Starter


        Starter

        Re: HELP with a Batch File
        « Reply #3 on: June 22, 2010, 06:53:11 AM »
        Dear Sidewinder,

        I sent you a private message.

        Let me know,

        tacsuma

        tacsuma

          Topic Starter


          Starter

          Re: HELP with a Batch File
          « Reply #4 on: June 22, 2010, 08:08:49 AM »
          Sidewinder,

          I really appreciate you taking the time to read my pm. I did not post the link here in case someone else clicked the link before you had the chance to see what I was on about.

          I will continue here.

          You told me I need to write a script which sends keystrokes to the popup. I will try to do that  :)

          What I want to do is to gather the links to the files I want to download, and automate the process of downloading each of them. The issue is not from where I gather these links; its more HOW I am going to tell the pc to download them automatically (without missing on my beauty sleep).

          With your input, I'm almost about to figure that out though  :P

          ghostdog74



            Specialist

            Thanked: 27
            Re: HELP with a Batch File
            « Reply #5 on: June 23, 2010, 09:04:47 AM »
            depends on how the web page you are visiting is done, click on the "save" button, and watch how the url looks like. Then
            download wget for windows and try simply

            Code: [Select]
            c:\test> wget <url>

            PS. You may have to watch the HTTP headers to see how the url for saving looks like