Jump to content

User account causing script errors?


 Share

Recommended Posts

Hello all,

I've received great help from the forum community before, so I'm hoping for a repeat. :) I have a series of compiled scripts that do the following: launch MS Access database, execute macros, provide mid-process credentials, and launch the following database for a rinse-and-repeat. I've used my credentials for the scripts, and after some adjustments everything runs just as intended. I've got dozens of good runs under my belt on my profile with my credentials. However, when my coworker attempts to run the scripts on his profile, the scripts only get through the login step. When the macros finish and the database closes, the script just hangs. It's still running and unpaused, but it's not handing off like it's supposed to. I can post script if anyone would like to see it, but I wonder if anybody has any idea why this script would work for one user and not another. For the record, we also created a duplicate script using his credentials instead of mine, and had the exact same problem. Any ideas? 

Thanks in advance!

Link to comment
Share on other sites

Send ( "{LWin}" )
Sleep ( 2000 )
Send ("Network Drive:\Folder\Database.accdb /x Macro")
Sleep ( 2000 )
Send ( "{ENTER}" )
WinWaitActive ( "Oracle Login" )
Send ( "Username" )
Send ( "{TAB}" )
Send ( "Password" )
Sleep ( 2000 )
ControlClick ( "Click OK" ) <-This works, but after this it stops.
WinWaitClose ( "Database Window" )
Send ( "{LWin}" )
Sleep ( 2000 )
Send ("Network Drive:\Folder\Database.accdb /x Macro")
Sleep ( 2000 )
Send ( "{ENTER}" )
WinWaitActive ( "Oracle Login" )
Send ("Username")
Send ("{Tab}")
Send ( "Password" )
Sleep ( 2000 )
ControlClick ( "Click OK" )
WinWaitClose ( "Database Window" )
Send ( "{LWin}" )
Sleep ( 2000 )
Send ("Network Drive:\Folder\Database.accdb /x Macro")
Sleep ( 2000 )
Send ( "{ENTER}" )
WinWaitActive ( "Oracle Login" )
Send ("Username")
Send ("{Tab}")
Send ( "Password" )
Sleep ( 2000 )
ControlClick ( "Click OK" )
WinWaitClose ( "Database Window" )
Send ( "{LWIN}" )
Run ( "Network Drive:\Folder\Folder\Next Script.exe" ) ; Stage 2 Launch
Exit

So that's one of the scripts, and the others are very similar variations of it. Very basic stuff, as you can see. All of the files are on a network drive, so the paths would be the same. I know his credentials are good, and we are not aware of any rights issues. We never get warnings or notifications, just a hung script. I highlighted the last step that I know works. You think the WinWaitCloses could be screwing things up?

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

×
×
  • Create New...