Jump to content

WinFlash'ing certain PIDs


Recommended Posts

Hello :]

I'm stuck with a little problem today. I want to WinFlash a certain process, in case there are two of the same window titles.

Say I have 2 calc.exe's open, they both have the same window title, and the only thing that is different about them is the Process ID. Since WinFlash will only flash the title of a process, it will only ever flash the one that has been activated after the other. I'd rather select which one I want to flash by using the PID.

Yes, I have already gotten the list of PIDs with all titles matching 'Calculator'.

Thanks in advance.

Link to comment
Share on other sites

Take a look at the following:

http://www.autoitscript.com/forum/index.php?showtopic=102785&st=0&p=728949&hl=PROCESS%20GET%20WINDOW&fromsearch=1&#entry728949

WinGetProcess() in the help file.

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

Take a look at the following:

http://www.autoitscript.com/forum/index.php?showtopic=102785&st=0&p=728949&hl=PROCESS%20GET%20WINDOW&fromsearch=1&#entry728949

WinGetProcess() in the help file.

Err.. I think you misinterpreted what I want to do.

Link to comment
Share on other sites

Err.. I think you misinterpreted what I want to do.

I'm thinking you want to flash a window by PID. AFIAK it cant be done directly but you could use the function from the link I posted get the window handle from a PID and then WinFlash that.

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

I'm thinking you want to flash a window by PID. AFIAK it cant be done directly but you could use the function from the link I posted get the window handle from a PID and then WinFlash that.

Well that is correct, but unfortunately it was no help as using WinFlash you must specify a direct Window Title.

Don't worry about it though, it's definitely not essential to what I am doing. I just thought it would be a nifty feature.

Thanks for your help though.

Link to comment
Share on other sites

Well that is correct, but unfortunately it was no help as using WinFlash you must specify a direct Window Title.

Don't worry about it though, it's definitely not essential to what I am doing. I just thought it would be a nifty feature.

Thanks for your help though.

I made you a small function to do what you want. :)

Func _FlashPID($hPID,$iFlashes=4,$iDelay=500)
    $avList=WinList ()
    For $iCounter=1 to $avList[0][0]
        If BitAnd(WinGetState($avList[$iCounter][1]),2) and WinGetProcess($avList[$iCounter][1])=$hPID then WinFlash($avList[$iCounter][1],default,$iFlashes,$iDelay)
    Next
EndFunc
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...