Sign in to follow this  
Followers 0
Aassdd

WinGetProcess problem

4 posts in this topic

I have this code:

Local $title = WinGetTitle("[Active]")
        Local $process = WinGetProcess($title)
        Local $msgbox = MsgBox(3 + 32, "Process priority", "Change priority of " & $title & " [" & $process & "] to realtime?")
        If $msgbox = 6 Then
            ProcessSetPriority($process, 5)
        ElseIf $msgbox = 7 Then
            ProcessSetPriority($process, 4)
        EndIf

It works very good but in the MsgBox, instead of (e.g) notepad.exe (at $process text) it shows some random numbers. Not only for notepad, for any program.

Why?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

@Aassdd...The random number you are talking about is the PID...You need to use the function _ProcessGetName ( $iPID) to get the process name.

Edited by DjDeep00

Share this post


Link to post
Share on other sites

Oh sorry, didn't know. Thank you.

Can anyone help here? http://www.autoitscript.com/forum/index.php?showtopic=66246

:) nice offer

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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