Jump to content

beginner help please


Recommended Posts

Hello!

I'm hoping you guys can help me. I wrote a batch file that will open a new tab in firefox and open a certain website. It does this every 20 minutes scheduled by Scheduled Tasks in windows. It works fine except as it runs the open tabs keep piling up as I intend to run this script for 8 hour intervals. I'd like to get autoit to perform the same tasks but also send a ctrl+w to close each open tab it creates a few seconds after it creates it.

START firefox.exe "http://www.autoitscript.com"
ping 127.0.0.1 -n 5 > nul 2>&1
START firefox.exe "http://www.google.com"

I imagine this is a simple process but I have no idea where to start.

Thanks for any assistance you can give!

Link to comment
Share on other sites

Hello!

I'm hoping you guys can help me. I wrote a batch file that will open a new tab in firefox and open a certain website. It does this every 20 minutes scheduled by Scheduled Tasks in windows. It works fine except as it runs the open tabs keep piling up as I intend to run this script for 8 hour intervals. I'd like to get autoit to perform the same tasks but also send a ctrl+w to close each open tab it creates a few seconds after it creates it.

START firefox.exe "http://www.autoitscript.com"
ping 127.0.0.1 -n 5 > nul 2>&1
START firefox.exe "http://www.google.com"

I imagine this is a simple process but I have no idea where to start.

Thanks for any assistance you can give!

Thanks for your help on this and I apologize for the delay in my response!

This script works great for my needs but I have an additional need now.

I'd also like to add another variable, a for loop.

I have a text file named C:\Backup\invite.txt with a bunch of numbers in it. I want a loop to read this file substituting the numbers in this file in a web address.

Here is the batch version I wrote:

SET BROWSER=firefox.exe
for /f %%A in (C:\Backup\invite.txt) DO (START %BROWSER% -new-tab "http://www.website.com/send_invite?user_code=%%A"
ping 127.0.0.1 -n 2 > nul 2>&1)

Thanks again!

Edited by thrlride
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...