Jump to content

how to get handle with WinGetHandle()


Recommended Posts

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!!

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.

 

 

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

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

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

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...