WinGetProcess needs the correct window name/handle, are you sure the window name is [Conquer Online] ?
Try this just for a test.
Code:
$hWnd = WinGetHandle("[Conquer Online]")
If WinExists($hWnd) Then
$vPID = WinGetProcess($hWnd)
MsgBox(0, "", $vPID)
Else
MsgBox(0, "", "Window not found")
EndIf
Using your code outputs a PID for a process called "SciTE.exe" regardless of what text you put in "WinGetHandle("HERE")".
Edit: Using "$pid = WinGetProcess("[Conquer2.0]")" or even "$pid = WinGetProcess("[Conquer Online: Raiding Clans]")" worked flawlessly in the past. I think maybe "[Conquer Online]" is what is showing up in the taskbar and the actual process name is different. Why can't they just keep the name the same?
$hWnd = "[Conquer Online]"
If WinExists($hWnd) Then
$vPID = WinGetProcess($hWnd)
MsgBox(0, "", $vPID)
Else
MsgBox(0, "", "Window not found")
EndIf
This one worked like a charm. Now the only issue is "[Conquer Online]" isn't the process name. That said is there anyway one can get the exact name of a process using knowing the PID number.
$vPID = 1111 ; your PID here
$vRet = _PIDGetProcessName($vPID)
MsgBox(0,"",$vRet)
Func _PIDGetProcessName($vPID)
$aProcesslist = ProcessList()
For $i = 1 To $aProcesslist[0][0]
If $aProcesslist[$i][1] = $vPID Then Return $aProcesslist[$i][0]
Next
EndFunc ;==>_PIDGetProcess
; returns = 0 (pid does not exist)
$vPID = 1111 ; your PID here
$vRet = _PIDGetProcessName($vPID)
MsgBox(0,"",$vRet)
Func _PIDGetProcessName($vPID)
$aProcesslist = ProcessList()
For $i = 1 To $aProcesslist[0][0]
If $aProcesslist[$i][1] = $vPID Then Return $aProcesslist[$i][0]
Next
EndFunc ;==>_PIDGetProcess
; returns = 0 (pid does not exist)
Returns "Conquer.exe". Tried making "Conquer.exe" the name in your code above to find the PID and comes back as before "window not found".
I know it isn't. I want to find the window name of a running Conquer client. "[Conquer Online]" doesn't want to work so need to discover what that actual window name is.
$vPID = 3560
MsgBox(0, "", _ProcessGetWin($vPID))
Func _ProcessGetWin($vPID)
$aWinlist = WinList()
For $i = 1 To $aWinlist[0][0]
If $vPID = WinGetProcess($aWinlist[$i][0]) Then Return $aWinlist[$i][0]
Next
EndFunc ;==>_ProcessGetWin
When I use the PID of the Conquer client it returns "0" but any other application is returns the proper window name. I might just end up needing to enter the PID and recompiling my script on an as-needed basis. Pretty much all I'm making is an auto-hp script that pots at a given health and automatically dose the XP skill for me.
It's a "Conquer Clicky" rip-off but programmed as a macro to pot and do xp skills. I could just use Joek's but his doesn't currently auto-pot and I've been sent to botjail twice with his macro. So kinda want to play it safe and use something I know wont land me in the slammer.
[AutoIt]Process-Hiding Tool 03/15/2013 - Coding Releases - 25 Replies Nun, ich hatte Langeweile... Außerdem weiß ich nicht, wo ichs reinstellen soll, deswegen einfach mal hier.
Hier mal ein kleines Tool, das einfach nur einen Prozess versteckt. Dabei habe ich dann noch ein paar kleine Funktionen rein gebaut. Dabei handelt es sich um folgendes:
Im Kontextmenü lässt sich die Option "Run and Hide..." auswählen. Wenn man diese Option anklickt, wird dieser Prozess gestartet und automatisch danach sofort versteckt, sodass ihn kein Prozess Explorer oder der...
Mit Process Explorer /Process Hacker Hs umgehen 05/22/2010 - General Gaming Discussion - 1 Replies Ich habe hier im Forum gelesen, das man mit Process Explorer bzw. Process Hacker das HS umgehen kann. Leider ist mir irgendwie schleierhaft wie das gehen soll. Vllt erbarmt sich jemand und erklärt es (:, da man den sogenannten Bypasser nur noch las Premium Dings Da bei Upload.to runterladen kann :rolleyes:
C# how to pause a process/freeze process 12/08/2008 - CO2 Programming - 2 Replies ya so i was semi bored and after little bit of looking around i didnt find to many examples of how to do this so attached is a demo project to show you how.
basically it comes down to calling ResumeThread() and SuspendThread() (API functions) on all the threads of a process...simple enough
http://img388.imageshack.us/img388/9762/exampleil 6.png
please note when you enter the process name there's no ".exe" to the end
Warning: this isn't idiot proof
.
.