$Hprocess

02/13/2010 09:58 SaM.ThE.MaN#1
Hi,
i know how to get PID of a process,but i would like to know how to handle a process,this is what i have done but it is not working,
Quote:
Func Start1()
ToolTip('Non-PK Map Fog Leveler Enabled". To pause press "Pause"',0,0)
$pid1=WinGetProcess("[ACTIVE]","#327701")
$pid2=WinGetProcess("[ACTIVE]","Button69")
MsgBox(4096, "PID is", $pid1)
$hprocess = $pid1
$hprocess = $pid2
$pid1 = ControlClick("[Conquer] Raiding Clans", "", "Right", 1, 182, 22)
$pid1 = ControlClick("[Conquer] Raiding Clans", "", "Left", 1, 573, 381)
Sleep(1000)
$pid1 = ControlClick("[Conquer] Raiding Clans", "", "Right", 1, 573, 381)
$pid2 = ControlClick("[Conquer] Raiding Clans", "", "Right", 1, 182, 22)
Sleep(6000)
$pid1 = ControlClick("[Conquer] Raiding Clans", "", "Left", 1, 426, 383)
Sleep(1000)
$pid1 = ControlClick("[Conquer] Raiding Clans", "", "Right", 1, 426, 383)
$pid2 = ControlClick("[Conquer] Raiding Clans", "", "Right", 1, 182, 22)
Sleep(6000)
EndFunc
Can som1 tell me how to use Process id and get handle of process .ty
02/13/2010 12:31 | Moep |#2
Code:
$hwnd = WinGetHandle ( "title" [, "text"] )
$pid = WinGetProcess ( "title" [, "text"] )
02/13/2010 15:02 SaM.ThE.MaN#3
Oh really,even i know that,but HOW TO USE,now ur gonna say u wont tell me
02/13/2010 16:35 | Moep |#4
u just save the handle in the variable, then use it at the place u needed.

f.e.:

Code:
$hwnd = WinGetHandle ( "[Conquer] Raiding Clans")
ControlClick($hwnd, "", "Right", 1, 182, 22)
ControlClick($hwnd, "", "Left", 1, 573, 381)
02/13/2010 18:42 SaM.ThE.MaN#5
So ,do i still need to get the pid?
02/13/2010 19:30 | Moep |#6
depends on the functions u use.
pid idnetify your process, so the value represent the whole process/programm.
hwnd are a handle to the window themself and to the elements who are at the window.
But, if u need a controlcklick relativ to the whole windwo, its enough to write only the title of the Window u getting from WindowInfoTool, autoit doing the rest for u ;)
02/14/2010 09:01 SaM.ThE.MaN#7
its no use,i cannot get handle of conquer raiding clans,IT just doesnt work.are you sure you know anything about autoit,cause ur never able to help me
02/14/2010 11:12 | Moep |#8
Autoit, wtf is this?
02/14/2010 11:29 Xereon#9
Quote:
Originally Posted by | Moep | View Post
Autoit, wtf is this?
O`relly? You don`t know it? ^^


PS: Kommt sofort in meine Sig :D
02/14/2010 12:47 | Moep |#10
hey, aber der quote von sam is auch gut :D
02/14/2010 15:37 SaM.ThE.MaN#11
-.- u know that i understand wt u saying right?
02/14/2010 19:02 | Moep |#12
Quote:
Originally Posted by SaM.ThE.MaN View Post
-.- u know that i understand wt u saying right?
scheinbar ja nicht, denn sonst würdest du nicht soviele fragen stellen...
02/14/2010 20:08 SaM.ThE.MaN#13
^.-