Search found 33 matches

by logan9
10 Aug 2022, 18:22
Forum: Ask for Help (v1)
Topic: How to use Callback with a Class function into SetWinEventHook? Topic is solved
Replies: 3
Views: 729

How to use Callback with a Class function into SetWinEventHook? Topic is solved

The script below works 'correctly' as long the callback function WinProcCallback is outside of a class this works: hook1 := Hook.SetWinEventHook("EVENT_SYSTEM_FOREGROUND", "EVENT_SYSTEM_FOREGROUND", 0 , "WinProcCallback" ; <------ the function is not inside of a class , 0, 0, "WINEVENT_OUTOFCONTEXT"...
by logan9
02 Jun 2022, 13:07
Forum: Ask for Help (v1)
Topic: Getting CPU and GPU temps with OpenHardwareMonitorLib
Replies: 14
Views: 3280

Re: Getting CPU and GPU temps with OpenHardwareMonitorLib

Loop { x := ps.RunScript(psCode) x := "" sleep, 100 } Return f2:: PID := DllCall("GetCurrentProcessId") for objItem in ComObjGet("winmgmts:").ExecQuery("SELECT * FROM Win32_Process") { try { if (objItem.ProcessID = PID) { hProcess := DllCall("OpenProcess", "uint", 0x001F0FFF, "int", 0, "uint", objI...
by logan9
01 Jun 2022, 07:25
Forum: Ask for Help (v1)
Topic: Getting CPU and GPU temps with OpenHardwareMonitorLib
Replies: 14
Views: 3280

Re: Getting CPU and GPU temps with OpenHardwareMonitorLib

To invoke PowerShell via CLR You can try like this. (May be need run as admin). Thank you Malcev, your example did work on my side. What's the difference from this method and the function CMDRet() I was looking into task manager and I could see it does not launch an instance of powershell.exe ? Do ...
by logan9
28 May 2022, 16:34
Forum: Ask for Help (v1)
Topic: external process: get working directory (current directory)
Replies: 19
Views: 3842

Re: external process: get working directory (current directory)

For the Calculator.exe process: Current Directory: C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.2103.8.0_x64__8wekyb3d8bbwe\ Dll Path: C:\Program Files\WindowsApps\Microsoft.WindowsCalculator_10.2103.8.0_x64__8wekyb3d8bbwe;C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.4_2.42007.90...
by logan9
28 May 2022, 15:56
Forum: Ask for Help (v1)
Topic: external process: get working directory (current directory)
Replies: 19
Views: 3842

Re: external process: get working directory (current directory)

What's your win version?
I don't have skype, could you try with Microsoft edge?
C:\Program Files (x86)\Microsoft\Edge\Application
Spoiler
by logan9
28 May 2022, 15:39
Forum: Ask for Help (v1)
Topic: external process: get working directory (current directory)
Replies: 19
Views: 3842

Re: external process: get working directory (current directory)

This is all in one: WinGet, PID, PID, ahk_exe explorer.exe Info := GetProcessInfo(PID) MsgBox, % "Current Directory: " . Info.currentDir . "`n`n" . "Dll Path: " . Info.DllPath . "`n`n" . "Image Path: " . Info.ImagePath . "`n" . "Command Line: " . Info.CMD . "`n" . "Window Title: " . Info.WindowTitl...
by logan9
28 May 2022, 12:28
Forum: Ask for Help (v1)
Topic: external process: get working directory (current directory)
Replies: 19
Views: 3842

Re: external process: get working directory (current directory)

thank you!! when the process contains multiple windows, with this API is possible to get the wintitle of all windows?

iirc using wingettitle, If you script contain multiple guis, it get the title of the last active/focused window
by logan9
28 May 2022, 09:54
Forum: Ask for Help (v1)
Topic: external process: get working directory (current directory)
Replies: 19
Views: 3842

Re: external process: get working directory (current directory)

Yep, but most items are undocumented. your code is a bit hard for me to understand, I thought I would need just to increment a count in some of these ReadProcessMemory call to get the values of these next items UNICODE_STRING WindowTitle; is the same title you get by calling ahk "Wingettitle"? if s...
by logan9
28 May 2022, 06:57
Forum: Ask for Help (v1)
Topic: external process: get working directory (current directory)
Replies: 19
Views: 3842

Re: external process: get working directory (current directory)

Sometime I wrote the function to get process' comandline. It reads CommandLine from RTL_USER_PROCESS_PARAMETERS structure. Also RUPP contains process' current directory. IsAdminChecking(), SetDebugPrivilege() ; only for system processes on Windows 10 (and on Windows 8, maybe), else may by commented...
by logan9
26 May 2022, 08:07
Forum: Ask for Help (v1)
Topic: Getting CPU and GPU temps with OpenHardwareMonitorLib
Replies: 14
Views: 3280

Re: Getting CPU and GPU temps with OpenHardwareMonitorLib

in the link of your previous answer, there's a link to StackOverflow https://stackoverflow.com/questions/45736193/how-can-we-get-a-cpu-temperature-through-wmi this is not direct CPU temp but somewhere on the MB: stackoverflow.com/a/17083409/1747983 – Tilo Oct 24, 2018 at 20:00 and To get the exact t...
by logan9
26 May 2022, 07:42
Forum: Ask for Help (v1)
Topic: Getting CPU and GPU temps with OpenHardwareMonitorLib
Replies: 14
Views: 3280

Re: Getting CPU and GPU temps with OpenHardwareMonitorLib

viewtopic.php?p=230533#p230533 (CPU temperature) the value returned by this, is not the CPU temperature viewtopic.php?f=83&t=94947 (GPU temperature, AHK 2.x) im using v1, also OpenHardwareMonitor can return a lot more info indepent of AMD/NVIDIA and not only CPU/GPU Example # CPU - Intel Core i9-99...
by logan9
26 May 2022, 06:26
Forum: Ask for Help (v1)
Topic: Getting CPU and GPU temps with OpenHardwareMonitorLib
Replies: 14
Views: 3280

Getting CPU and GPU temps with OpenHardwareMonitorLib

While searching for a method to get CPU and GPU temps I have found the openhardwaremonitor.lib I build a Powershell script and with the help of SKAN RunCMD function I have been able to retrieve the CPU and GPU, temp: script = ( Add-Type -Path "C:\Users\Downloads\OpenHardwareMonitorLib.dll" $Comp = N...
by logan9
17 May 2022, 06:39
Forum: Tutorials (v1)
Topic: FindText tutorial
Replies: 98
Views: 66271

Re: FindText tutorial

would like to ask if could you get a bit deep in the capture modes? i see that you added a description of the methods in step 5) Capture modes if you could add some examples like images/captured text plus the best capture mode to them, and also more description of what these values mean: gray: *144$...
by logan9
15 May 2022, 16:38
Forum: Ask for Help (v1)
Topic: How to add new items in a obj after calling SetCapacity?
Replies: 1
Views: 229

How to add new items in a obj after calling SetCapacity?

After calling SetCapacity on a obj obj := {} obj.SetCapacity(200000) How to input new items in a single line like this: obj := {1: "a", 2: "b", 3: "c"} If i set obj := it creates a new obj, removing the SetCapacity Theres no other way to add new values to the 'expanded' obj, than adding one by one? ...
by logan9
09 May 2022, 17:03
Forum: Ask for Help (v1)
Topic: Why ControlFocus remove focus from Gui?
Replies: 5
Views: 568

Re: Why ControlFocus remove focus from Gui?

Theres no way to create/launch a new gui on a different thread in the same script?
by logan9
09 May 2022, 11:19
Forum: Ask for Help (v1)
Topic: Why ControlFocus remove focus from Gui?
Replies: 5
Views: 568

Re: Why ControlFocus remove focus from Gui?

Hello lexikos :thumbup: I have been trying to automate a specific window, sending clicks when it's in the background and without activating it, using PostMessage with the help of spy++ I could see that the window receives the msgs however the click doesn't get fired unless the window is focused I fo...
by logan9
08 May 2022, 21:32
Forum: Ask for Help (v1)
Topic: Why ControlFocus remove focus from Gui?
Replies: 5
Views: 568

Why ControlFocus remove focus from Gui?

Why when i call ControlFocus it remove the focus from the AHK GUI ? if i have any other window active it don't steal the focus as it does with the GUI Example: Gui, Color, 0 Gui, Show, w400 h200 Return F2:: WinGet, hwnd, Id, ahk_exe notepad.exe ControlFocus,, ahk_id %hwnd% Return Im reading the AHK ...
by logan9
23 Apr 2022, 12:50
Forum: Ask for Help (v1)
Topic: Click Through GUI
Replies: 1
Views: 447

Click Through GUI

How to detect when a control is clicked or hovered when using E0x20 WS_EX_TRANSPARENT ? WM_LBUTTONDOWN and WM_MOUSEMOVE never get fired. Theres another way to set a GUI background click-trought than using this style or WinSet, Transcolor/Transparent ? OnMessage(0x201, "WM_LBUTTONDOWN") OnMessage(0x2...

Go to advanced search