AutoHotkey Community

It is currently May 26th, 2012, 6:23 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: February 15th, 2009, 4:14 pm 
Offline

Joined: September 10th, 2006, 1:41 pm
Posts: 157
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 4:33 pm 
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, ...
?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 4:39 pm 
Offline

Joined: September 10th, 2006, 1:41 pm
Posts: 157
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 4:54 pm 
What about WinGet's PID or WinExist("A") ?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 5:30 pm 
Offline

Joined: September 10th, 2006, 1:41 pm
Posts: 157
There can be more IE running i want PID of the one that launched with AHK.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 6:12 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
you might want to explore using COM for IE otherwise it can get ver messy

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 6:42 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 6:58 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 7:01 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
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

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 7:12 pm 
Quote:
The iexplore.exe must be a launcher or something
I had that in mind, but didn't tested it :roll:. 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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 15th, 2009, 7:35 pm 
Offline

Joined: September 10th, 2006, 1:41 pm
Posts: 157
Oh yea, with full path works.
But strange is that notepad.exe dont need full path to get PID.

Thank You all


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: batto, rbrtryn, SKAN and 57 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group