Jump to content

CommZ3

Members
  • Posts

    8
  • Joined

  • Last visited

CommZ3's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Can this script be used to return the coordinates of a specific word in an image please?
  2. On further examination Windows Task Manager shows both PID 12724 and 5880 as beloning to microsoft edge exe file, which is strange as I only have 1 microsoft edge window open for testing purposes.
  3. $i = WinGetProcess("Youtube - Microsoft Edge") Consolewrite($i) I first used this script(1)^ to get the PID, and confirmed PID with following script(2): $wintitleProcess = _WinGetByPID(12724) MsgBox(0,"my Name",$wintitleProcess) ;Smoke_N's WinGetByPID Func _WinGetByPID($iPID, $nArray = 1);0 will return 1 base array; leaving it 1 will return the first visible window it finds If IsString($iPID) Then $iPID = ProcessExists($iPID) Local $aWList = WinList(), $sHold For $iCC = 1 To $aWList[0][0] If WinGetProcess($aWList[$iCC][1]) = $iPID And _ BitAND(WinGetState($aWList[$iCC][1]), 2) Then If $nArray Then Return $aWList[$iCC][0] $sHold &= $aWList[$iCC][0] & Chr(1) EndIf Next If $sHold Then Return StringSplit(StringTrimRight($sHold, 1), Chr(1)) Return SetError(1, 0, 0) EndFunc Func terminate() exit EndFunc Script (2) shows that particular window as being PID 12724, while the sound detection script returns PID as 5880. When I input 5880 into script(2), the MsgBox returns 0. When I input 12724 into script (2), the MsgBox returns "Youtube - Microsoft Edge" (correctly)
  4. thank you once again. I have spent the last 2 hours 😅 trying to edit the above script so that it returns or consolewrite the PID, however I seem to be getting either 0 or an incorrect number (not the actual PID of the window). The following seems to be the relevant snippet of code from the code you linked above. $oIAudioSessionControl2.GetProcessId($ProcessID) $oIAudioMeterInformation = ObjCreateInterface($pIAudioSessionControl2, $sIID_IAudioMeterInformation, $sTagIAudioMeterInformation) $oIAudioSessionControl2.AddRef $oIAudioMeterInformation.GetPeakValue($fPeakValue) If $fPeakValue > 0 Then ReDim $aApp[UBound($aApp) + 1][2] $aApp[UBound($aApp) - 1][0] = _ProcessGetName($ProcessID) ConsoleWrite($ProcessID) ; --------------------------------------------------- I added this line which is returning wrong PID $aApp[UBound($aApp) - 1][1] = $fPeakValue EndIf
  5. Thank you for your reply, however using the above code to get the process does not seem to be enough for my purpose.. for example it returns "chrome.exe" , but I am usually running other chrome windows, I wonder if there is a way to get the specific window please
  6. Hi all, Is there a script/command that enables autoit to detect which window made a sound? (any sound) I am interested for example when browser window with email, receives new email -> makes its normal sound -> autoit WinActive that window browser window with timer running ->makes beep when timer ends ->autoit winactive that window so I can reset timer Thank you
  7. Hi, Im a beginner in autoit. I would like to get a particular value from a table (for example a specific value in Column "B" and Row "3") in internet explorer and save it for later use. So far I have been experimenting on _IETableWriteToArray but it seems to be getting the whole table. How do I get a specific value in a specific row and column? Thank you
×
×
  • Create New...