WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Window Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Activate an App without a Windowname

Keywords:  winexename  

Here's a script to activate an executable when you know the executable name but not the windowname.

App="notepad"	 ;app name without exe on the end.
List=winitemize()
count=itemcount(list,@tab)
for i= 1 to count
	this=itemextract(i, list, @tab)
	thisexe=winexename(this)
	thisexe=fileroot(thisexe)
	if stricmp(app, thisexe) == 0 
		winactivate(this)
		break
	endif			     
next

Article ID:   W14171
Filename:   Activate App without Windowname.txt
File Created: 1999:06:09:15:09:06
Last Updated: 1999:06:09:15:09:06