Jump to content

Auto Reconnect


Fabre
 Share

Recommended Posts

I am trying to make a script to reconnect internet when my connection is dropped.

WHILE WinExists ("État de IOL Broadband")
Sleep(1000)
wend
run ("dial.bat", "G:\autoDial")

how do i get it to go back to start instead of closing when it run the dial.bat?

Link to comment
Share on other sites

Just wondering: Why do you use a batch file?

If you need AutoIt to run a shortcut to your internet connection, you could try something like:

Run(@comspec & " /c " & "C:\shortcutToDialUp.lnk", "", @SW_HIDE)
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

I have that .bat in startup menu to launch connection on windows startup

rasdial "IOL Broadband" login password

I don't understand

Run(@comspec & " /c " & "C:\shortcutToDialUp.lnk", "", @SW_HIDE)

wouldn't something like this work aswell?

Run("Raccourci vers IOL Broadband.lnk", "C:\Documents and Settings\All Users\Bureau")
Link to comment
Share on other sites

You can only use Run/RunWait on an executable file (exe, batch, com, et cetera). You have to pass any other file type through the command interpreter in order to launch the default application associated with that particular link/file type.

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...