jronex Posted May 19, 2006 Posted May 19, 2006 (edited) I'm trying to send either a mouse click or a key command in order to close a window and i'm not having any luck; TIA .. thanks in advance here is the section of code that this problem occurs; the point of this program is to automate sap installations for an application roll out. Run("\\sapcrdev\Depot\Mobile notes\OSS 716052\Note716052-sp04-to-SP07.cmd","\\sapcrdev\Depot\Mobile notes\OSS 716052\") WinWaitActive("SAP Mobile Upgrade Deployer - Note716052-SP04-To-SP07.mup"); send("{ENTER}") WinWaitActive("SAP Client Upgrade","OK") ControlClick("SAP Client Upgrade","OK",2) ;phase2 -Copying and upgrading MsgBox(0,"***************", "COPYING sfabof.dll,TLFacades.dll" , 5) FileCopy("\\sapcrdev\Depot\Mobile notes\OSS 738761\*.dll","C:\Program Files\SAP\Mobile\bin") MsgBox(0,"*****************", "REGISTERING sfabof.dll,TLFacades.dll" , 5) Run("\\sapcrdev\Depot\Mobile notes\OSS 738761\sfabof.cmd","\\sapcrdev\Depot\Mobile notes\OSS 738761") ControlClick("Regsvr32","OK",2) Run("\\sapcrdev\Depot\Mobile notes\OSS 738761\TLFacades.cmd","\\sapcrdev\Depot\Mobile notes\OSS 738761") ControlClick("Regsvr32","OK",2) DirCreate("D:\Service Orders") Edited May 19, 2006 by jronex
Valuater Posted May 19, 2006 Posted May 19, 2006 (edited) welcome to the forums are you sure about the ... control ID? are you using au3info.exe to get the info? ALSO... Autoit is very, very fast so after a run statement use WinWaitActive, or something similar 8) Edited May 19, 2006 by Valuater
jronex Posted May 19, 2006 Author Posted May 19, 2006 Thanks I think the software is great! still testing it out but so far it's working for meControl ID is right but my problem comes at this first point of the code here:Run("\\sapcrdev\Depot\Mobile notes\OSS 716052\Note716052-sp04-to-SP07.cmd","\\sapcrdev\Depot\Mobile notes\OSS 716052\")WinWaitActive("SAP Mobile Upgrade Deployer - Note716052-SP04-To-SP07.mup");send("{ENTER}")'i'm trying to send the enter command to accept the active window screen and i'm guessing it is not accepting enter to close the window; so i'm thinking about using control click , so i use the autoinfo to see all the information on window and i do see anything listed 'contro under mouse' section . welcome to the forumsare you sure about the ...control ID?are you using au3info.exe to get the info?ALSO...Autoit is very, very fastso after a run statement use WinWaitActive, or something similar8)
Valuater Posted May 19, 2006 Posted May 19, 2006 if this is a "seperate" message box... maybe Run("\\sapcrdev\Depot\Mobile notes\OSS 716052\Note716052-sp04-to-SP07.cmd","\\sapcrdev\Depot\Mobile notes\OSS 716052\") Sleep(1000); waits 1 second Send("{TAB}") Send("{ENTER}") please use code tags for posting [ code] ; no space ; paste code [/ code] ; no space 8)
jronex Posted May 19, 2006 Author Posted May 19, 2006 Thanks Valuater!, that may have done the trick. One more question is there a way i can use double quotes in the run command, I have a UNC with spaces. I side step this using a batch file but would like to run it directly from my script. i.e. This is what I thought would work but it does not , my initial thoughts were using some escape char; anyway i want to use a quote within the UNC to call a program. ; Run(""\\sapcrdev\Depot\Mobile notes\OSS 716052 1234\Note716052-sp04-to-SP07.cmd"","\\sapcrdev\Depot\Mobile notes\OSS 716052\") thanks again for you help ,
Valuater Posted May 19, 2006 Posted May 19, 2006 (edited) try this Run('"\\sapcrdev\Depot\Mobile notes\OSS 716052 1234\Note716052-sp04-to-SP07.cmd"',"\\sapcrdev\Depot\Mobile notes\OSS 716052\") or... Run("\\sapcrdev\Depot\Mobile notes\OSS 716052 1234\Note716052-sp04-to-SP07.cmd","\\sapcrdev\Depot\Mobile notes\OSS 716052\") **** I cant test it 8) Edited May 19, 2006 by Valuater
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