Jump to content

How to switch between 2 application that has the same name

Recommended Posts

Hello Guys

i have an issue to auto change between 2 same Tasks that has the same name

is there a way how to change the name of one of the running application

or is there a unique identification for each Task(application) running

or if any one knows a script 2 run this 2 tasks one after the other

just as an example

this is my running script:


Thank you in advance for your help

My Best Regards


Share this post

Link to post
Share on other sites

You can use WinList() to see all current windows with title and handle.
Like jguinch already stated, the handle would be an unique identifier and can be used with WinSetTitle to change the window title.

Share this post

Link to post
Share on other sites

can any one share with me the script please


sorry i dont understand much in scripting but im trying to understand i just could not see what you mean by using WinList or WinGetHandle


i would appreciate you efforts guys


Thxx a lot



Share this post

Link to post
Share on other sites

Study the Help file entry for WinList, where you use that to get a list of all current windows running (many will be hidden ones used by the system). You then filter that list, so that only windows with Mozilla Firefox: IBM Edition are returned. Then use WinGetHandle on those to get a unique ID for each.

Basically, as you loop through the window titles, you test for the title text you are after in the window name. Assign each found to its own unique variable, then use that for your handle call, etc.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.


What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)


Share this post

Link to post
Share on other sites

; Example will switch between all windows in list
Func Example()
    Local $aWinList = WinList("New Tab - Mozilla Firefox: IBM Edition") ; include title of window

    For $i = 1 To $aWinList[0][0] ; loop through all windows with that title
        WinActivate($aWinList[$i][1]) ; Activate a window
        Sleep(2000) ; Wait 2 seconds
EndFunc   ;==>Example

You should be able to get started from that, post your efforts with any further questions.

Share this post

Link to post
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

  • Create New...