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

Author Topic: batchfile that surfs for ya?  (Read 7520 times)

0 Members and 1 Guest are viewing this topic.

redhawk

    Topic Starter


    Rookie
    batchfile that surfs for ya?
    « on: August 10, 2007, 02:28:21 AM »
    well as ive continue to look for a solution mention in this post

    http://www.computerhope.com/forum/index.php/topic,40000.0.html

    it came up to me, maby i can make a batch file that simply open new webb pages for me?

    i admit im a bit rusty at this. could not make it work as intended.

    this is the file

    surf.bat
    Code: [Select]
    start aft.url   /// starts url number one
    start lun.url  /// starts url number two
    start helgon.url ///starts url number three
    start surf.bat /// starts the script all over again in a new cmd prompt window
    exit ///closes current cmd prompt window

    aft.url etc is ordinary shortcut links in win xp and this seem to work!

    now the problem is that they all load realy quick. is there a way to put a "pause" between loading of a new link.

    second problem is that they all open in a new IE window.
    i want em to open in the same window as the current link.


    well hope u guys can help.

    cheers!

    ghostdog74



      Specialist

      Thanked: 27
      Re: batchfile that surfs for ya?
      « Reply #1 on: August 10, 2007, 03:29:02 AM »
      don't have a DOS one for you.
      Code: [Select]
      Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
      objExplorer.Navigate "URL1"
      objExplorer.ToolBar = 0
      objExplorer.StatusBar = 0
      objExplorer.Width=400
      objExplorer.Height = 200
      objExplorer.Left = 0
      objExplorer.Top = 0
      objExplorer.Visible = 1 
      Wscript.Sleep 2000
      objExplorer.Navigate "URL2" 

      redhawk

        Topic Starter


        Rookie
        Re: batchfile that surfs for ya?
        « Reply #2 on: August 13, 2007, 08:01:36 AM »
        thanx alot m8t!

        never used vb-scripts before  ;D

        well i tweaked it a litte. works like a sharm!

        surf.vbs looks like this

        Code: [Select]
        Set objExplorer = WScript.CreateObject("InternetExplorer.Application")
        objExplorer.Navigate "URL"
        objExplorer.ToolBar = 0
        objExplorer.StatusBar = 0
        objExplorer.Width = 500
        objExplorer.Height = 500
        objExplorer.Left = 0
        objExplorer.Top = 0
        objExplorer.Visible = 1

        For i=2 To 999

        Wscript.Sleep  10000
        objExplorer.Navigate "URL"
        Wscript.Sleep  10000
        objExplorer.Navigate "URL"
        Wscript.Sleep  10000
        objExplorer.Navigate "URL"
        Wscript.Sleep  10000
        objExplorer.Navigate "URL"
        Wscript.Sleep  10000
        objExplorer.Navigate "URL"

        Next

        onely one thing!

        when putin urls to pages using flash or any other plugins will make the script crash.
        so use simpel urls or have  flash etc installed.

        redhawk

          Topic Starter


          Rookie
          Re: batchfile that surfs for ya?
          « Reply #3 on: August 13, 2007, 08:17:24 AM »
          here is the whole thing if someone is intrested in a simpel network test script/batch  ::)



          [Saving disk space -  old attachment deleted by admin]