Jump to content
user45

how to get handle with WinGetHandle()

Recommended Posts

user45

Hi,

I am trying to call a .exe application using the WinGetHandle( ) and assign it to variable $h:

$h = WinGetHandle( "myapp.exe")

or,

$h = WinGetHandle("myapp")

the application is installed inside c:\program files but the WinGetHandle seems not working. However notepad works. Can anybody help me in this?

 

thanks!!

Share this post


Link to post
Share on other sites
Jos

define what you mean with "call a .exe"?
Is the programma already running and the Window existing? If so, What is the exact Window title? 

Look at the helpfile on how these Functions and parameters should be used.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
user45

I mean any .exe application is not working- firefox.exe, nitro.exe, MineSweeper.exe and so on. the title are firefox, nitro, minesweeper etc. I have read that wingethandle can match titles and the title i gave should be ok. notepad is working as I have already said.

I have looked into the helpfile, couldn't get it done and therefore I am asking here.

 

 

Share this post


Link to post
Share on other sites
Jos

Well you seem to contradict yourself there. ;) 

WinGetHandle() gets the Handle of a WINDOW, not a program file name!
So look for the correct Window Title and use that in the parameter as described in the Helpfile.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
user45

NewZip - WinZip Pro, firefox anything with correct title should work with the above code right? or there might be some issue with windows 7 and WinGetHandle()

Share this post


Link to post
Share on other sites
Jos

Yes, but your code isn't really telling me what issue you have....  so what is the problem when running the code you have shown? 
Does it hang or what else?

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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

×