Jump to content

Rasdial - username w/nonstandard characters


aharown
 Share

Recommended Posts

I'm an almost total newbie... this is my fourth script, none m/more than half a dozen lines.

Anyway, trying to get dialed up to a particular connection using rasdial but I get "unable to parse line" ... I assume this is because the username has some unfortunate characters in it (why, I don't know).

Here's the username: name#LCC@i.56k.cc

Is there anyway I can get those "#" and "@" characters to fly?

Maybe it's time to get a new ISP. :P

Oh, one other thing you may be able to help with.

I want to dialup, get connected, then wait maybe 10 seconds, then run the browser.

What's the easiest way to make AutoIt wait for the connection, then countdown 10 seconds?

I guess I know how to sleep(10000) but not sure how to tell it to watch for the connection... I don't really have any windows open at that point if I do this w/rasdial, do I?

Edited by aharown
Link to comment
Share on other sites

Post your script. Are you using Send() or Run() or DllCall() or something else?

Well... maybe that's the problem. I just have it as

rasdial...

Here's the script so far

; ----------------------------------------------------------------------------

;

; AutoIt Version: 3.1.0

; Author:

; Script Function:

; Dialup, get connect, then start Firefox.

;

; ----------------------------------------------------------------------------

; Script Start

; Start dialup connection w/rasdial

;

rasdial iconn name#LCC@i.56k.cc password

;

;pause 10 seconds

sleep(10000)

Run ("C:\Program Files\Mozilla Firefox\Firefox.exe")

Edited by aharown
Link to comment
Share on other sites

Well... maybe that's the problem. I just have it as

rasdial...

Here's the script so far

; ----------------------------------------------------------------------------

;

...

OK, I fixed the rasdial line. Now it's run(rasdial connection name pwd)

Tested and works.

Tips on best way to pause the script until connection is successful then sleep a while?

Edited by aharown
Link to comment
Share on other sites

Tips on best way to pause the script until connection is successful then sleep a while?

Maybe test @IPAddress1 in While loop until it gets valid

or InetGet() / InetGetSize() in loop while it will be successfull

or DllCall() & RASEnumConnections & RASGetConnectStatus --> see rnahelpxp.dpr from my AutoDial project (in my signature)

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