Selecting a tab in another program
Posted: 05 Jun 2017, 11:12
Hello all,
First post here but I have a lot of experience with other message boards (for Excel, IBM Cognos TM1, ...)
I want to automate a tedious task in IBM Cogos TM1, Turbo Integrator. I can automate almost everything but I am stuck with 1 thing.
A little background
The editor for Turbo Integrator (shown on the picture) is really crap. It's the most basic editor one can imagine.
So I want to copy/paste existing code from Turbo Integrator to Notepad++. I have a language add-on for TM1 in Notepad++.
I also need to remove those 2 lines with #####Generated statements#####
To be able to copy/paste back from Notepad++ to Turbo Integrator, I have a second script.
When copying from Turbo Integrator to Notepad++ I add the Window title of the Turbo Integrator window as the first line in Notepad++. That way, I know which window to use when transferring back the code.
Problem case
However, the Turbo Integrator process has 4 tabs (Prolog, Metadata, Data, Epilog).
If I'm working in Notepad++ and I change the focus in Turbo Integrator to 1 of the other tabs, my AHK script will overwrite code in the wrong tab !
This is a big problem because I might loose 5 to hundreds of lines of coding.
I used the AU3_Spy.exe tool to inspect the tab names (Prolog, Metadata, Data, Epilog).
Until now I could not get the name of the ACTIVE tab (Prolog, Metadata, Data, Epilog).
The spy does not give other information, except for the relative mouse position. (I can use AHK to send a left-click on a relative position if that's useful)
Does anyone a way to know how to retrieve that information: Prolog, Metadata, Data, Epilog ? Just as plain text.
Or any other way such that I can copy back code in the correct tab. I can activate the correct tab first with a single left-click.
Thanks a lot, it's the last step that is missing from my AHK script that saves a LOT of time !
Wim
Former MS Excel Most Valuable Professional
First post here but I have a lot of experience with other message boards (for Excel, IBM Cognos TM1, ...)
I want to automate a tedious task in IBM Cogos TM1, Turbo Integrator. I can automate almost everything but I am stuck with 1 thing.
A little background
The editor for Turbo Integrator (shown on the picture) is really crap. It's the most basic editor one can imagine.
So I want to copy/paste existing code from Turbo Integrator to Notepad++. I have a language add-on for TM1 in Notepad++.
I also need to remove those 2 lines with #####Generated statements#####
To be able to copy/paste back from Notepad++ to Turbo Integrator, I have a second script.
When copying from Turbo Integrator to Notepad++ I add the Window title of the Turbo Integrator window as the first line in Notepad++. That way, I know which window to use when transferring back the code.
Problem case
However, the Turbo Integrator process has 4 tabs (Prolog, Metadata, Data, Epilog).
If I'm working in Notepad++ and I change the focus in Turbo Integrator to 1 of the other tabs, my AHK script will overwrite code in the wrong tab !
This is a big problem because I might loose 5 to hundreds of lines of coding.
I used the AU3_Spy.exe tool to inspect the tab names (Prolog, Metadata, Data, Epilog).
Until now I could not get the name of the ACTIVE tab (Prolog, Metadata, Data, Epilog).
The spy does not give other information, except for the relative mouse position. (I can use AHK to send a left-click on a relative position if that's useful)
Does anyone a way to know how to retrieve that information: Prolog, Metadata, Data, Epilog ? Just as plain text.
Or any other way such that I can copy back code in the correct tab. I can activate the correct tab first with a single left-click.
Thanks a lot, it's the last step that is missing from my AHK script that saves a LOT of time !
Wim
Former MS Excel Most Valuable Professional