Jump to content

Recommended Posts

Posted

Hello

I have so far only worked with Autoit on a basic level as that have been enough for my needs.

 

Im working with a program (PSDiag) thats resisting me trying to auto it.

In this case i try but cant check if the program is open or activate it to perform any actions.

Have tried the basics and even tested with HwdWrapper and REGEXPCLASS that over my head it seems.

I have not included any code as its now a mess of not working attempts, i have a feeling its easy when you know how it should be done.

Added a Window info as that's what i think can help, if any more is required please tell me and i will try to provide

 

image.png.22a95ae7455c0384ddf733b90201d94b.png

Hope anyone can help

/Joshen

 

Posted

What exactly do you want to "AutoIT" on it?
If you want to WinActivate it:

WinActivate("[CLASS:HwndWrapper]", "")

If you want to WinGetProcess it:

$a_ProcessList = ProcessList("PSDiag.exe")
$a_WinList = WinList() ;WinGetProcess could be a nice addition to each WinList() results.
Dim $a_ProcessGetWin[1][4] = [[0, 0, 0, 0]]
For $i = 1 To $a_ProcessList[0][0] ;In the processlist
    For $j = 1 To $a_WinList[0][0] ;In the winList
        If WinGetProcess($a_WinList[$j][1]) = $a_ProcessList[$i][1] Then ;AddWin
            $a_ProcessGetWin[0][0] += 1
            ReDim $a_ProcessGetWin[$a_ProcessGetWin[0][0] + 1][UBound($a_ProcessGetWin, 2)]
            $a_ProcessGetWin[$a_ProcessGetWin[0][0]][0] = $a_ProcessList[$i][0]
            $a_ProcessGetWin[$a_ProcessGetWin[0][0]][1] = $a_ProcessList[$i][1]
            $a_ProcessGetWin[$a_ProcessGetWin[0][0]][2] = $a_WinList[$j][0]
            $a_ProcessGetWin[$a_ProcessGetWin[0][0]][3] = $a_WinList[$j][1]
        EndIf
    Next
Next

;$a_ProcessGetWin has you covered
#include <Array.au3>
_ArrayDisplay($a_ProcessGetWin, "$a_ProcessGetWin")

 

Posted

I knew it!

Wonder what i did wrong. 

Is there any good place that show how all this works in detail as i apparently dont understand it, (thats obvious), the help sections didn't do it for me

A big thanks, now i can get into hacking this thing again

 

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
  • Recently Browsing   0 members

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