Sign in to follow this  
Followers 0
aharown

DOS window doesn't move

5 posts in this topic

I have a script that runs rasdial to connect to a dialup ISP.

That works fine, but my WinMove and WinSetTrans lines don't seem to work. Are "DOS" windows special?

Or maybe I've just keyed something wrong?

Here's what that part of the script looks like

CODE
run ("rasdial connectionname username#LCC@i.56k.cc pwd")

WinSetTrans ("C:\WINDOWS\system32\rasdial.exe", "", 100)

WinMove ("C:\WINDOWS\system32\rasdial.exe", "", 10,10,200,300)

Share this post


Link to post
Share on other sites



You need a WinWait line:

Run(@ComSpec & " /c " & 'pause', "")
WinWait("C:\WINDOWS\system32\cmd.exe")
WinMove("C:\WINDOWS\system32\cmd.exe", "", 100, 100)


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

You need a WinWait line:

Run(@ComSpec & " /c " & 'pause', "")
WinWait("C:\WINDOWS\system32\cmd.exe")
WinMove("C:\WINDOWS\system32\cmd.exe", "", 100, 100)
Haven't read up yet on compspec.

When I insert this code in the script, it creates a 2nd window, but both of them fail to move/resize. ... maybe my run rasdial line needs to go somewhere other than where it is? Here's how I have it...

CODE
run ("rasdial connname username#LCC@i.56k.cc pwd")

Run(@ComSpec & " /c " & 'pause', "")

WinWait("C:\WINDOWS\system32\cmd.exe")

WinMove("C:\WINDOWS\system32\cmd.exe", "", 100, 100)

WinSetTrans ("C:\WINDOWS\system32\rasdial.exe", "", 100)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Sorry, I did not mean for you to insert the code that I posted - just take note of where the WinWait is in that sample code. Your code should look more like this:

Run("rasdial connectionname username#LCC@i.56k.cc pwd")
WinWait("C:\WINDOWS\system32\rasdial.exe")
WinMove("C:\WINDOWS\system32\rasdial.exe", "", 10, 10, 200, 300)
Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Sorry, I did not mean for you to insert the code that I posted - just take note of where the WinWait is in that sample code. Your code should look more like this:

Run("rasdial connectionname username#LCC@i.56k.cc pwd")
WinWait("C:\WINDOWS\system32\rasdial.exe")
WinMove("C:\WINDOWS\system32\rasdial.exe", "", 10, 10, 200, 300)
Thanks. Got it now. I decided to do a run cmd first, then winwait and winmove then rasdial. This is working pretty well.

Share this post


Link to post
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
Sign in to follow this  
Followers 0