aharown Posted December 19, 2006 Posted December 19, 2006 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 CODErun ("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)
herewasplato Posted December 19, 2006 Posted December 19, 2006 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]
aharown Posted December 19, 2006 Author Posted December 19, 2006 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... CODErun ("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)
herewasplato Posted December 19, 2006 Posted December 19, 2006 (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 December 19, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
aharown Posted December 21, 2006 Author Posted December 21, 2006 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now