| View previous topic :: View next topic |
| Author |
Message |
DJAnonimo
Joined: 10 Sep 2006 Posts: 157
|
Posted: Sun Feb 15, 2009 3:14 pm Post subject: Run and PID problem with IE |
|
|
Hi,
i try to get the pid of Internet explorer that i run with AHK.
Run, iexplore.exe, , , IEPID
Msgbox %IEPID%
IEPID variable is always empty
with notepad.exe works.
Whats the problem ?
Thank You |
|
| Back to top |
|
 |
RTFM Guest
|
Posted: Sun Feb 15, 2009 3:33 pm Post subject: |
|
|
| Quote: | | Whats the problem ? | That you didn't read the help file, which states ... | Quote: | | The variable will be made blank if the PID could not be determined, ... | ? |
|
| Back to top |
|
 |
DJAnonimo
Joined: 10 Sep 2006 Posts: 157
|
Posted: Sun Feb 15, 2009 3:39 pm Post subject: |
|
|
I use more than 2 years now i read the manual few times, so dont worry about that.
I just got this problem with Internet Explorer.
IEPID variable still blank. |
|
| Back to top |
|
 |
RTFM Guest
|
Posted: Sun Feb 15, 2009 3:54 pm Post subject: |
|
|
| What about WinGet's PID or WinExist("A") ? |
|
| Back to top |
|
 |
DJAnonimo
Joined: 10 Sep 2006 Posts: 157
|
Posted: Sun Feb 15, 2009 4:30 pm Post subject: |
|
|
| There can be more IE running i want PID of the one that launched with AHK. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Sun Feb 15, 2009 5:12 pm Post subject: |
|
|
you might want to explore using COM for IE otherwise it can get ver messy _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
RTFM Guest
|
Posted: Sun Feb 15, 2009 5:42 pm Post subject: |
|
|
| Quote: | | There can be more IE running | Well, I guess the IE session executed via Run will get the focus, and therefore could be identified with WinExist("A") quite easily |
|
| Back to top |
|
 |
Tuncay
Joined: 07 Nov 2006 Posts: 1886 Location: Germany
|
Posted: Sun Feb 15, 2009 5:58 pm Post subject: |
|
|
| The iexplore.exe must be a launcher or something, where the PID does not work. I tried it with the full path of internet explorer, with success. The full path on my computer is "C:\Programme\Internet Explorer\IEXPLORE.EXE". Then getting the pid from IE is working. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Sun Feb 15, 2009 6:01 pm Post subject: |
|
|
| RTFM wrote: | | Quote: | | There can be more IE running | Well, I guess the IE session executed via Run will get the focus, and therefore could be identified with WinExist("A") quite easily | and if tabs are enabled in IE and the new window opens as a tab instead of window its not just the title that changes but the available content _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
RTFM Guest
|
Posted: Sun Feb 15, 2009 6:12 pm Post subject: |
|
|
| Quote: | | The iexplore.exe must be a launcher or something | I had that in mind, but didn't tested it . Looks like once you start IE from the environment/path it won't deliver the PID, while with a given (static) path it succeeds.
| Quote: | | If Target is a local file and no path was specified with it, A_WorkingDir will be searched first. If no matching file is found there, the system will search for and launch the file if it is integrated ("known"), e.g. by being contained in one of the PATH folders. |
| Quote: | | The variable will be made blank if the PID could not be determined, which usually happens if a system verb, document, or shortcut is launched rather than a direct executable file |
|
|
| Back to top |
|
 |
DJAnonimo
Joined: 10 Sep 2006 Posts: 157
|
Posted: Sun Feb 15, 2009 6:35 pm Post subject: |
|
|
Oh yea, with full path works.
But strange is that notepad.exe dont need full path to get PID.
Thank You all |
|
| Back to top |
|
 |
|