Jump to content

Sending Controlclick


Recommended Posts

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 by jronex
Link to comment
Share on other sites

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

Thanks I think the software is great! still testing it out but so far it's working for me

Control 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 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)

Link to comment
Share on other sites

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)

NEWHeader1.png

Link to comment
Share on other sites

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 , :)

Link to comment
Share on other sites

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 by Valuater

NEWHeader1.png

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...