Protheus Posted June 3, 2005 Share Posted June 3, 2005 Hello all, On our network we have several machines that are not on the domain - what I want to do is then when I send a software package to them it enters the network name in the run window and if a logon windows appears it fills in the logon information ortherwise it connect to the network drive. So i created this scritp so far: Send ("#r") Send ("\\gandalf\software$\Standard Applications\Acrobat Reader 7\Acrobat Reader 7.exe {ENTER}") If WinActive ("Connect to gandalf.msi.cell") Then MsgBox (64, "Test Networking", "Gandalf window is open") EndIf - So this opens the Run windows - Enters the network name and press enter - So as I am working offline I have to logon - so the logon windows comes up. But now the message (as a sort of test) is not coming up What is wrong so far ? Link to comment Share on other sites More sharing options...
buzz44 Posted June 3, 2005 Share Posted June 3, 2005 When in this type of problem, always look at what condition the If statment is testing... The window "Connect to gandalf.msi.cell" is not becoming active. qq Link to comment Share on other sites More sharing options...
MSLx Fanboy Posted June 3, 2005 Share Posted June 3, 2005 In other words try WinExist() for the test, and you can then call WinActivate() if the window exists Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate()) Link to comment Share on other sites More sharing options...
Protheus Posted June 3, 2005 Author Share Posted June 3, 2005 (edited) ARe you like able to add several lines of code in the Then statement like: If ........ Then do this do this also and do this afterwards EndIf Edited June 3, 2005 by Protheus Link to comment Share on other sites More sharing options...
buzz44 Posted June 3, 2005 Share Posted June 3, 2005 You can have as many lines as you want. qq Link to comment Share on other sites More sharing options...
Sunblood Posted June 3, 2005 Share Posted June 3, 2005 Make sure to add a delay or loop in case the window doesn't come up right away. Link to comment Share on other sites More sharing options...
closeupman Posted June 4, 2005 Share Posted June 4, 2005 ARe you like able to add several lines of code in the Then statement like:If ........ Then do this do this also and do this afterwardsEndIf<{POST_SNAPBACK}>Yes of course you can.I hope you aren't in the IT dept there lol Link to comment Share on other sites More sharing options...
HyperChao Posted June 4, 2005 Share Posted June 4, 2005 Why don't you use a WinWaitActive function with a timeout? If it does not appear, then you can assume the network's not working. Link to comment Share on other sites More sharing options...
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