user45

how to get handle with WinGetHandle()

10 posts in this topic

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



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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

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

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

#6 ·  Posted (edited)

Ok, then show us a real life example that is giving you issues, so we can see what is going on.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

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

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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