Sign in to follow this  
Followers 0
feldmaneyal

Return value to Dos command

6 posts in this topic

I need to get the process ID and pass it to another application

I was able to put the PID in a msgbox - but I need it in a command line

means that I would like to Run AI and get 0 if the process not exist or the PID if exist

$PID = ProcessExists("notepad.exe")

return ($PID)

In the dos level - get nothing.

Please advise,

Thx in advance.,

Eyal

Share this post


Link to post
Share on other sites



exit($PID)


Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs

Share this post


Link to post
Share on other sites

Hi, it doesnt work any other idea?

$PID = ProcessExists("notepad.exe")

exit($PID)

I run like c:\\pid.au3 or pid.exe

Get nothing on the dos prompt

thx

Share this post


Link to post
Share on other sites

you won't get anything on the dos prompt, you have to catch the errorlevel from dos if i remember correctly.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Any idea how to catch it? thx

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

read up on errorlevel in windows help if you plan to catch it by batch file

or read up on EnvGet in AutoIt help

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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
Sign in to follow this  
Followers 0