AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Run and PID problem with IE

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
DJAnonimo



Joined: 10 Sep 2006
Posts: 157

PostPosted: Sun Feb 15, 2009 3:14 pm    Post subject: Run and PID problem with IE Reply with quote

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 Sad

with notepad.exe works.

Whats the problem ?

Thank You
Back to top
View user's profile Send private message MSN Messenger
RTFM
Guest





PostPosted: Sun Feb 15, 2009 3:33 pm    Post subject: Reply with quote

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

PostPosted: Sun Feb 15, 2009 3:39 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
RTFM
Guest





PostPosted: Sun Feb 15, 2009 3:54 pm    Post subject: Reply with quote

What about WinGet's PID or WinExist("A") ?
Back to top
DJAnonimo



Joined: 10 Sep 2006
Posts: 157

PostPosted: Sun Feb 15, 2009 4:30 pm    Post subject: Reply with quote

There can be more IE running i want PID of the one that launched with AHK.
Back to top
View user's profile Send private message MSN Messenger
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Sun Feb 15, 2009 5:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
RTFM
Guest





PostPosted: Sun Feb 15, 2009 5:42 pm    Post subject: Reply with quote

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

PostPosted: Sun Feb 15, 2009 5:58 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Sun Feb 15, 2009 6:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
RTFM
Guest





PostPosted: Sun Feb 15, 2009 6:12 pm    Post subject: Reply with quote

Quote:
The iexplore.exe must be a launcher or something
I had that in mind, but didn't tested it Rolling Eyes. 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

PostPosted: Sun Feb 15, 2009 6:35 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group