Jump to content

Recommended Posts

Posted

I am able to start a Teamcenter IE login screen and login. After logging in it starts a Teamcenter.exe window which I want to control. I can't use the mouse because the window moves around. I am a newbie. Can someone tell me how to caputure control of it and then close it?

Thanks,

Bob

Posted (edited)

Welcome to the forum.

Is this a virus like program ?

http://processchecker.com/file/Teamcenter.exe.html

Can you do a sreenshot ?

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

You should have googled the name, from what I can see it's not a virus.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

  • 2 weeks later...
Posted (edited)

Teamcenter is a PDM product that we use. I need to create testing scripts for regression testing. I can log in using an SSO session and IE, but can't seem to take over the window that opens, Here is my code;

Run('C:Siemenstc83_4tierportalportal.bat')
;Sleep(5000)
WinWaitActive("Teamcenter Login - Windows Internet Explorer", "", 20)
Send("Username and Password")
WinWaitActive("https://tcweb01p.fnal.gov:7002/?loginPort=51997&tssv=1.3.2 - Teamcenter Security Agent - Windows Internet Explorer","",20)
;Sleep(15000)
;Send("{ALTDOWN}{TAB}{TAB}{ALTUP}")
WinWaitActive("teamcenter","",20)
Sleep(5000)
Send("{ALTDOWN}f{ALTUP}x")
WinWaitActive("Exit","",2)
Send("y")
 
It works up until I try to make the teamcenter window active. The window header is actually "My Teamcenter - Teamcenter 8". I want to make that window active so that I can run tests. After the last Sleep(5000) the rest of the Autiit script is just to log off of Teamcenter. When I run the script it;
a) runs C:Siemenstc83_4tierportalportal.bat
B) opens an IE window and asks for a Username and Password
c) I send it 
d) The Teamcenter window opens, but I can't do anything inside the window
 
Thanks for any and all help,
Bob
Edited by andree
Posted (edited)

andree,

It may be that you are waiting for the windows to become active (WinWaitActive) but not activating the window first or the window becomes inactive if another window gets focus.  Look at WinWait then WinActivate in Help.

Example using your original script, not tested.

Run('C:\Siemens\tc83_4tier\portal\portal.bat')
;Sleep(5000)
WinWait("Teamcenter Login - Windows Internet Explorer")
WinActivate("Teamcenter Login - Windows Internet Explorer")
;WinWaitActive("Teamcenter Login - Windows Internet Explorer", "", 20)
Send("Username and Password")
WinWait("https://tcweb01p.fnal.gov:7002/?loginPort=51997&tssv=1.3.2 - Teamcenter Security Agent - Windows Internet Explorer")
WinActivate("https://tcweb01p.fnal.gov:7002/?loginPort=51997&tssv=1.3.2 - Teamcenter Security Agent - Windows Internet Explorer")
;WinWaitActive("https://tcweb01p.fnal.gov:7002/?loginPort=51997&tssv=1.3.2 - Teamcenter Security Agent - Windows Internet Explorer","",20)
;Sleep(15000)
;Send("{ALTDOWN}{TAB}{TAB}{ALTUP}")
WinWait("teamcenter")
WinActivate("teamcenter")
;WinWaitActive("teamcenter","",20)
Sleep(5000)
Send("{ALTDOWN}f{ALTUP}x")
WinWait("Exit") ; as long as another window title does not contain "Exit"
WinActivate("Exit")
;WinWaitActive("Exit","",2)
Send("y")

EDIT: Also take a look at ControlSend in Help.  The window does not have to be active.  From help -- ControlSend() works in a similar way to Send() but it can send key strokes directly to a window/control, rather than just to the active window.

Edited by ZombieKillz

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
  • Recently Browsing   0 members

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