MydreamIsScriptng Posted August 13, 2011 Share Posted August 13, 2011 I've open the Include Process.au3 and i found: $hDLL="Kernel32.dll" $aPriority = DllCall($hDLL, 'dword', 'GetPriorityClass', 'handle', $aProcessHandle[0]) Ok? and I've Searched in PE Explorer And I want To Call This Function: Function:SetPriorityClass Params:hProcess: THandle; dwPriorityClass: DWORD Result:BOOL How? Tell me ? I am so stupid please tell me because i am working to make special task manager and if u help me i will show the source ok? please! Link to comment Share on other sites More sharing options...
JohnOne Posted August 13, 2011 Share Posted August 13, 2011 Why use PE Explorer when you can look on msdn AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
MydreamIsScriptng Posted August 13, 2011 Author Share Posted August 13, 2011 (edited) Why use PE Explorer when you can look on msdn i think pe explorer is easier than msdn but please help me i tried to call but I failed #include "ProcessConstants.au3" Local $i_PID = ProcessExists("explorer.exe") ; an example process $aProcessHandle = DllCall("Kernel32.dll", 'handle', 'OpenProcess', 'dword', $PROCESS_QUERY_INFORMATION, 'bool', False, 'dword', $i_PID) $aPriority = DllCall("Kernel32.dll", 'bool', 'SetPriorityClass', 'handle', $aProcessHandle[0]) oh thanks thanks.. i found it on msdn but it's still failed man look please: Local $i_PID = ProcessExists("explorer.exe") ; an example process $aProcessHandle = DllCall("Kernel32.dll", 'handle', 'OpenProcess', 'dword', $PROCESS_QUERY_INFORMATION, 'bool', False, 'dword', $i_PID) $aPriority = DllCall("Kernel32.dll", 'bool', 'SetPriorityClass', 'handle', $aProcessHandle[0],'dword',0x00008000) I will kill myself man I'll be crazy how?????? Edited August 13, 2011 by MydreamIsScriptng Link to comment Share on other sites More sharing options...
JohnOne Posted August 13, 2011 Share Posted August 13, 2011 Well first off, it seems your PE Explorer didnt tell you "The handle must have the PROCESS_SET_INFORMATION access right" Or that its return if bool, etc... You should take a look, I'm no dll elf. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
MydreamIsScriptng Posted August 13, 2011 Author Share Posted August 13, 2011 (edited) Well first off, it seems your PE Explorer didnt tell you "The handle must have the PROCESS_SET_INFORMATION access right"Or that its return if bool, etc...You should take a look, I'm no dll elf.Please Fix it?How can i fix it? Edited August 13, 2011 by MydreamIsScriptng Link to comment Share on other sites More sharing options...
MydreamIsScriptng Posted August 13, 2011 Author Share Posted August 13, 2011 Well first off, it seems your PE Explorer didnt tell you "The handle must have the PROCESS_SET_INFORMATION access right"Or that its return if bool, etc...You should take a look, I'm no dll elf.YEAAAAAAAAAAAAAAAAAAAH It's done man thank U now i promise if u help me i will give u the source i will now give u the source but update it to be faster please see it in Attachment thank u thank u thank u Link to comment Share on other sites More sharing options...
JohnOne Posted August 13, 2011 Share Posted August 13, 2011 I do not want any source, I do not care about it. If I can help you I will, if you show your efforts I'm sure others will show you the way too. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
MydreamIsScriptng Posted August 13, 2011 Author Share Posted August 13, 2011 (edited) I do not want any source, I do not care about it. If I can help you I will, if you show your efforts I'm sure others will show you the way too. can u make my source working faster? please expandcollapse popup#include <GUIConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include <Process.au3> #include <ProgressConstants.au3> #include <GUIListView.au3> #include <ListviewConstants.au3> #include <Array.au3> #include <WINAPI.au3> $read = 1 $notnows = UBound(WinList()) - 1 Local $iExWindowStyle = BitOR($WS_EX_DLGMODALFRAME, $WS_EX_CLIENTEDGE) Local $iExListViewStyle = BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES, $LVS_EX_GRIDLINES) Global $a, $ListView1, $Form1_1, $pr, $i, $Progress1, $u, $p, $kill, $n, $pri, $path, $pid, $b, $bigpid, $ii, $aa, $now, $notnow, $ListView2,$read $notnow = UBound(WinList()) - 1 $now = UBound(WinList()) - 1 $Form1 = GUICreate("Process Manager", 359, 466, 347, 195) $str=DllStructCreate("int[999]","int:1000000") ;DllCall("uxtheme.dll", $str, "SetWindowTheme","hwnd",WinGetHandle("","#"),"hwnd") $File = GUICtrlCreateMenu("File") $Op = GUICtrlCreateMenu("Option") $Shutdownop = GUICtrlCreateMenu("Shutdown Option") $Tab1 = GUICtrlCreateTab(0, 0, 358, 396) GUICtrlSetResizing($ListView2, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT) GUICtrlCreateTabItem("Windows") $ra1 = GUICtrlCreateRadio("Don't Show Hidden Windows", 6, 415, 234, 12) $ra2 = GUICtrlCreateRadio("Show Hidden Windows (Not recommended)", 6, 430, 234, 12) $ListView2 = GUICtrlCreateListView("Tasks|Handel|Status", 1, 39, 354, 373) GUICtrlSendMsg(-1, 0x101E, 0, 100) GUICtrlSendMsg($ListView2, 0x101E, 1, -1) GUICtrlSendMsg(-1, 0x101E, 1, -1) $Button2 = GUICtrlCreateButton("End Task", 267, 417, 83, 26, 0) $2con = GUICtrlCreateContextMenu($ListView2) $2kill = GUICtrlCreateMenuItem("Close This Window", $2con) $2kill = GUICtrlCreateMenuItem("Kill This Window", $2con) $refre = GUICtrlCreateMenuItem("Refresh This List", $2con) $go2pro = GUICtrlCreateMenuItem("Go To Process", $2con) $emp = GUICtrlCreateMenuItem("", $2con) $max = GUICtrlCreateMenuItem("Maximize", $2con) $min = GUICtrlCreateMenuItem("Minimize", $2con) $minall = GUICtrlCreateMenuItem("Minimize All", $2con) $rest = GUICtrlCreateMenuItem("Restore", $2con) $emp = GUICtrlCreateMenuItem("", $2con) $t2hi = GUICtrlCreateMenuItem("Hide", $2con) $u2hi = GUICtrlCreateMenuItem("Unhide", $2con) $lock = GUICtrlCreateMenuItem("Lock", $2con) $ulock = GUICtrlCreateMenuItem("Unlock", $2con) $top = GUICtrlCreateMenuItem("Set top", $2con) $utop = GUICtrlCreateMenuItem("Unset top", $2con) GUICtrlCreateTabItem("Process") $ListView1 = GUICtrlCreateListView("Process|PID|Priotry", 1, 39, 354, 373, $iExWindowStyle) _GUICtrlListView_SetExtendedListViewStyle($ListView1, $iExListViewStyle) GUICtrlSendMsg(-1, 0x101E, 0, 350) GUICtrlSendMsg(-1, 0x101E, 1, 35) GUICtrlSendMsg(-1, 0x101E, 2, 350) ;GUICtrlSendMsg(-1, $LVS_SORTASCENDING, 0, 350) _GUICtrlListView_SortItems($ListView1, GUICtrlGetState($ListView1)) $Button1 = GUICtrlCreateButton("End Process", 267, 417, 83, 26, 0) $con = GUICtrlCreateContextMenu($ListView1) $kill = GUICtrlCreateMenuItem("Kill Process", $con) $ref = GUICtrlCreateMenuItem("Refresh This List", $con) $info = GUICtrlCreateMenuItem("Info", $con) ;$set = GUICtrlCreateMenuItem("Set Priority",$con) $sub = GUICtrlCreateMenu("Set Priority", $con) $ht = GUICtrlCreateMenuItem("Real Time", $sub) $htt = GUICtrlCreateMenuItem("", $sub) $h = GUICtrlCreateMenuItem("High", $sub) $an = GUICtrlCreateMenuItem("Above Normal", $sub) $n = GUICtrlCreateMenuItem("Normal", $sub) $b = GUICtrlCreateMenuItem("Below Normal", $sub) $l = GUICtrlCreateMenuItem("Low", $sub) GUICtrlSetOnEvent($kill, "_Kill") GUICtrlSetOnEvent($info, "_info") GUICtrlSetOnEvent($ht, "re") GUICtrlSetOnEvent($h, "high") GUICtrlSetOnEvent($an, "above") GUICtrlSetOnEvent($n, "normal") GUICtrlSetOnEvent($b, "below") GUICtrlSetOnEvent($l, "low") GUICtrlSetOnEvent($ref, "ref") GUICtrlSetOnEvent($refre, "refre") GUICtrlSetOnEvent($t2hi, "t2hi") GUICtrlSetOnEvent($u2hi, "u2hi") GUICtrlSetOnEvent($ra1, "ra1") GUICtrlSetOnEvent($ra2, "ra2") GUISetState(@SW_SHOW) Opt("GUIOnEventMode",1) ;;;;;;;; This Shit Process!!! For $i = 0 To 255 Step +2 WinSetTrans($Form1, "", $i) Sleep(3) Next _list() Local $pr = ProcessList() $u = UBound(ProcessList()) - 1 Global $i For $i = 1 To $pr[0][0] FileWrite(@ScriptDir & "\np.txt", $pr[$i][0] & "|") $pid = ProcessExists($pr[$i][0]) $pri = _ProcessGetPriority($pid) If $pri = -1 Then $pri = "2" EndIf If $pri = 0 Then $pri = "Low" EndIf If $pri = 1 Then $pri = "Below Normal" EndIf If $pri = 2 Then $pri = "Normal" EndIf If $pri = 3 Then $pri = "Above Normal" EndIf If $pri = 4 Then $pri = "High" EndIf If $pri = 5 Then $pri = "Real Time" EndIf GUICtrlCreateListViewItem($pr[$i][0] & "|" & ProcessExists($pr[$i][0]) & "|" & $pri, $ListView1) Next $p = UBound(ProcessList()) - 1 $u = UBound(ProcessList()) - 1 $prr = ProcessList() $u = UBound(ProcessList()) - 1 ;GUICtrlSetImage($ListView1, $path, 0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;AdlibRegister("CHK", 1000) Func CHK() $p = UBound(ProcessList()) - 1 ;MsgBox(0,"ppp",$p) ;MsgBox(0,"uuu",$u) If $p <> $u Then $u = UBound(ProcessList()) - 1 $p = UBound(ProcessList()) - 1 _GUICtrlListView_DeleteAllItems($ListView1) Local $pr = ProcessList() For $i = 1 To $pr[0][0] $pid = ProcessExists($pr[$i][0]) $pri = _ProcessGetPriority($pid) If $pri = -1 Then $pri = "2" EndIf If $pri = 0 Then $pri = "Low" EndIf If $pri = 1 Then $pri = "Below Normal" EndIf If $pri = 2 Then $pri = "Normal" EndIf If $pri = 3 Then $pri = "Above Normal" EndIf If $pri = 4 Then $pri = "High" EndIf If $pri = 5 Then $pri = "Real Time" EndIf GUICtrlCreateListViewItem($pr[$i][0] & "|" & ProcessExists($pr[$i][0]) & "|" & $pri, $ListView1) Next EndIf EndFunc ;==>CHK Func _update() Local $pr = ProcessList() $u = UBound(ProcessList()) - 1 FileDelete(@ScriptDir & "\np.txt") ;$u = $p _GUICtrlListView_DeleteAllItems($ListView1) Global $i For $i = 1 To $pr[0][0] FileWrite(@ScriptDir & "\np.txt", $pr[$i][0] & "|") $pid = ProcessExists($pr[$i][0]) $pri = _ProcessGetPriority($pid) If $pri = -1 Then $pri = "2" EndIf If $pri = 0 Then $pri = "Low" EndIf If $pri = 1 Then $pri = "Below Normal" EndIf If $pri = 2 Then $pri = "Normal" EndIf If $pri = 3 Then $pri = "Above Normal" EndIf If $pri = 4 Then $pri = "High" EndIf If $pri = 5 Then $pri = "Real Time" EndIf GUICtrlCreateListViewItem($pr[$i][0] & "|" & ProcessExists($pr[$i][0]) & "|" & $pri, $ListView1) Next EndFunc ;==>_update Func _TerminateProcess() $at = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($at, "|") For $i = 2 To UBound($b) - 1 GUICtrlSetData($Progress1, 90) Sleep(200) ;MsgBox(0,"",$a[$i]) GUICtrlSetData($Progress1, 100) Sleep(200) GUICtrlSetData($Progress1, 0) $Icon2 = @ScriptDir & "\ex.ico" $return=MsgBox(52,"Warning!!","Do you want to end The Process:" & _ProcessGetName($b[$i])) ;MsgBox(0,"",$return) If $return = 6 Then $return = 0 ProcessClose($b[$i]) If @error Then $Title = "Error" $Text = "Unable To Terminate Process" MsgBox(0,$Title,$Text) ExitLoop Else $p = UBound(ProcessList()) - 1 $u = UBound(ProcessList()) - 1 $del = _GUICtrlListView_FindInText($ListView1, $b[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) $u = UBound(ProcessList()) - 1 ExitLoop EndIf Else ExitLoop EndIf Next EndFunc ;==>_TerminateProcess GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents") Func SpecialEvents() Select Case @GUI_CtrlId = $GUI_EVENT_CLOSE ; MsgBox(0, "Close Pressed", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle) For $i = 255 To 0 Step -2 WinSetTrans(@GUI_WinHandle, "", $i) Sleep(6) Next FileDelete(@ScriptDir & "\np.txt") Exit Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE ; MsgBox(0, "Window Minimized", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle) Case @GUI_CtrlId = $GUI_EVENT_RESTORE ; MsgBox(0, "Window Restored", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle) EndSelect EndFunc ;==>SpecialEvents ;******************************* Func _Kill() _TerminateProcess() EndFunc ;==>_Kill Func re() $a = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $mesage = MsgBox(52, "Warning", "Changing The Process Priority to Real Time Maybe will freez the System" & @CRLF & " Do you want to Continue?") If $mesage = 6 Then $su = ProcessSetPriority($b[$i], 5) If $su = 0 Then MsgBox(16, "Error", "Unable To Change The Priority") ExitLoop EndIf $del = _GUICtrlListView_FindInText($ListView1, $b[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) GUICtrlCreateListViewItem(_ProcessGetName($b[$i]) & "|" & ProcessExists($b[$i]) & "|" & "Realtime", $ListView1) ExitLoop Else ExitLoop EndIf Next EndFunc ;==>re Func high() $a = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $mesage = MsgBox(52, "Warning", "Changing The Process Priority Maybe will causing Some Problems" & @CRLF & " Do you want to Continue?") If $mesage = 6 Then $su = ProcessSetPriority($b[$i], 4) If $su = 0 Then MsgBox(16, "Error", "Unable To Change The Priority") ExitLoop EndIf $del = _GUICtrlListView_FindInText($ListView1, $b[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) GUICtrlCreateListViewItem(_ProcessGetName($b[$i]) & "|" & ProcessExists($b[$i]) & "|" & "High", $ListView1) ExitLoop Else ExitLoop EndIf Next EndFunc ;==>high Func above() $a = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $mesage = MsgBox(52, "Warning", "Changing The Process Priority Maybe will causing Some Problems" & @CRLF & " Do you want to Continue?") If $mesage = 6 Then $su = ProcessSetPriority($b[$i], 3) If $su = 0 Then MsgBox(16, "Error", "Unable To Change The Priority") ExitLoop EndIf $del = _GUICtrlListView_FindInText($ListView1, $b[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) GUICtrlCreateListViewItem(_ProcessGetName($b[$i]) & "|" & ProcessExists($b[$i]) & "|" & "Above Normal", $ListView1) ExitLoop Else ExitLoop EndIf Next EndFunc ;==>above Func normal() $a = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $mesage = MsgBox(52, "Warning", "Changing The Process Priority Maybe will causing Some Problems" & @CRLF & " Do you want to Continue?") If $mesage = 6 Then $su = ProcessSetPriority($b[$i], 2) If $su = 0 Then MsgBox(16, "Error", "Unable To Change The Priority") ExitLoop EndIf $del = _GUICtrlListView_FindInText($ListView1, $b[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) GUICtrlCreateListViewItem(_ProcessGetName($b[$i]) & "|" & ProcessExists($b[$i]) & "|" & "Normal", $ListView1) ExitLoop Else ExitLoop EndIf Next EndFunc ;==>normal Func below() $a = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $mesage = MsgBox(52, "Warning", "Changing The Process Priority Maybe will causing Some Problems" & @CRLF & " Do you want to Continue?") If $mesage = 6 Then $su = ProcessSetPriority($b[$i], 1) If $su = 0 Then MsgBox(16, "Error", "Unable To Change The Priority") ExitLoop EndIf $del = _GUICtrlListView_FindInText($ListView1, $b[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) GUICtrlCreateListViewItem(_ProcessGetName($b[$i]) & "|" & ProcessExists($b[$i]) & "|" & "Below Normal", $ListView1) ExitLoop Else ExitLoop EndIf Next EndFunc ;==>below Func low() $a = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $mesage = MsgBox(52, "Warning", "Changing The Process Priority Maybe will causing Some Problems" & @CRLF & " Do you want to Continue?") If $mesage = 6 Then $su = ProcessSetPriority($b[$i], 0) If $su = 0 Then MsgBox(16, "Error", "Unable To Change The Priority") ExitLoop EndIf $del = _GUICtrlListView_FindInText($ListView1, $b[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) GUICtrlCreateListViewItem(_ProcessGetName($b[$i]) & "|" & ProcessExists($b[$i]) & "|" & "Low", $ListView1) $u = UBound(ProcessList()) - 1 $gui = _GUICtrlListView_SetItemSelected($ListView1, $b[$i], True) Send("{end}") ExitLoop Else ExitLoop EndIf Send("{end}") Next Send("{end}") EndFunc ;==>low Func _info() $a = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $pid = ProcessExists($b[$i]) ExitLoop Next $objWMIService = ObjGet("winmgmts:\\.\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE ProcessId = " & $pid, "WQL", 0x10 + 0x20) If IsObj($colItems) Then For $objItem In $colItems $path = $objItem.ExecutablePath ;MsgBox(0,"",$path) ;GUICtrlSetImage($ListView1, $path, 0) If $path = "" Then $path = "No valid path supplied" Next $a = GUICtrlRead(GUICtrlRead($ListView1)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 MsgBox(64, "Process Info", "Process Name:" & _ProcessGetName($b[$i]) & @CRLF & "Path:" & $path & @CRLF & "Priority :" & $pri) ExitLoop Next EndIf EndFunc ;==>_info Func IsVisible($handle) If BitAND(WinGetState($handle), 2) Then Return 1 ElseIf $read = 1 Then Return 0 Else Return 1 EndIf EndFunc ;==>IsVisible $notnow = UBound(WinList()) - 1 Func _list() _GUICtrlListView_BeginUpdate($ListView2) ;$notnow = UBound(WinList())-1 $now = UBound(WinList()) - 1 $var = WinList() For $i = 1 To $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" And IsVisible($var[$i][1]) Then $tit = WinGetHandle($var[$i][0], "") $sta = WinGetState($var[$i][0]) If BitAND($sta,2) Then $sta = "Visible Window" Else $sta = "Invisible Window" EndIf GUICtrlCreateListViewItem($var[$i][0] & "|" & $tit & "|" & $sta, $ListView2) EndIf Next _GUICtrlListView_EndUpdate($ListView2) EndFunc ;==>_list Func ref() _update() EndFunc ;==>ref Func refre() GUICtrlSetState($ListView2,@SW_HIDE) _GUICtrlListView_DeleteAllItems($ListView2) ; GUICtrlCreateListViewItem($var[$i][0] & "|"&$sta,$ListView2) _list() GUICtrlSetState($ListView2,@SW_SHOW) EndFunc ;==>refre Func ra1() $read=1 refre() EndFunc Func ra2() $read=2 refre() EndFunc Func t2hi() $a = GUICtrlRead(GUICtrlRead($ListView2)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $win=WinGetState($b[$i]) If BitAND($win,2) Then $sta = "Visible Window" Else $sta = "Invisible Window" EndIf ;MsgBox(0, "", $b[$i]) _WinAPI_ShowWindow($b[$i], @SW_HIDE) ExitLoop Next EndFunc ;==>t2hi Func u2hi() $a = GUICtrlRead(GUICtrlRead($ListView2)) $b = StringSplit($a, "|") For $i = 2 To UBound($b) - 1 $win=WinGetState($b[$i]) If BitAND($win,2) Then $sta = "Visible Window" Else $sta = "Invisible Window" EndIf _WinAPI_ShowWindow($b[$i], @SW_SHOW) ExitLoop Next EndFunc ;==>u2hi ;AdlibRegister("seew",1) Func see() ;MsgBox(16,"","") $list = ProcessList(_ProcessGetName(WinGetProcess("", ""))) For $i = 1 To $list[0][0] If @error Then ExitLoop $find = _GUICtrlListView_FindInText($ListView1, $list[$i][0]) If $find = -1 Then GUICtrlCreateListViewItem($list[$i][0] & "|" & ProcessExists($list[$i][0]) & "|" & $pri, $ListView1) FileWrite(@ScriptDir & "\np.txt", $list[$i][0] & "|") ExitLoop Else ExitLoop EndIf ; msgbox(0, $list[$i][0], $list[$i][1]) Next EndFunc ;==>see ;$notnow = UBound(WinList())-1 $now = UBound(WinList()) - 1 While 1 ;MsgBox(32,"","") $rey = FileRead(@ScriptDir & "\np.txt") $ay = StringSplit($rey, "|") For $i = 1 To UBound($ay) - 1 If Not ProcessExists($ay[$i]) Then $del = _GUICtrlListView_FindInText($ListView1, $ay[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) EndIf Next $res = FileRead(@ScriptDir & "\np.txt") $asa = StringSplit($res, "|") For $i = 1 To UBound($asa) - 1 If Not ProcessExists($asa[$i]) Then $del = _GUICtrlListView_FindInText($ListView1, $asa[$i]) _GUICtrlListView_DeleteItem($ListView1, $del) EndIf Next $re = FileRead(@ScriptDir & "\np.txt") $aa = StringSplit($re, "|") For $i = 1 To UBound($aa) - 1 $ex = ProcessExists($aa[$i]) If $ex = 0 Then Else $del = _GUICtrlListView_FindInText($ListView1, $aa[$i]) If $del = -1 Then GUICtrlCreateListViewItem($aa[$i] & "|" & ProcessExists($aa[$i]) & "|" & $pri, $ListView1) EndIf EndIf Next $pronow = UBound(ProcessList())-1 ;MsgBox(0,"",$u &"-"& $pronow) For $i = 0 To 500 Step +1 $u=_GUICtrlListView_GetItemText($ListView1, $i) If Not ProcessExists($u) Then $chk= _GUICtrlListView_FindInText($ListView1,$u) _GUICtrlListView_DeleteItem($ListView1, $chk) EndIf If $u= "" Then ExitLoop Next If $u <> $pronow Then $u = UBound(ProcessList())-1 FileDelete(@ScriptDir & "\np.txt") Local $prs = ProcessList() For $i = 1 To $prs[0][0] FileWrite(@ScriptDir & "\np.txt", $prs[$i][0] & "|") Next EndIf $now = UBound(WinList()) - 1 ;MsgBox(0,"",$notnows & "-" & $now) If $now <> $notnows Then ;MsgBox(0,"","notnows") $now = UBound(WinList()) - 1 $notnows = UBound(WinList()) - 1 refre() EndIf Sleep(1000) see() WEnd Edited August 13, 2011 by MydreamIsScriptng Link to comment Share on other sites More sharing options...
JohnOne Posted August 13, 2011 Share Posted August 13, 2011 Yes, Post it here. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
MydreamIsScriptng Posted August 13, 2011 Author Share Posted August 13, 2011 (edited) hey i create new function But some problem in my new function Func _ProcessGetWindow($iProcess,$iVisible) If IsNumber($iProcess) Then $iProcess=_ProcessGetName($iProcess) EndIf Local $Winlist=WinList() For $i = 1 To $Winlist[0][0] $iReturn=$Winlist[$i][0] $state= WinGetProcess($Winlist[$i][0],"") If $iProcess = _ProcessGetName($state) Then If $iVisible = True Then $sta =WinGetState($Winlist[$i][0]) If BitAND($sta,2) Then Return $Winlist[$i][0] EndIf ElseIf $iVisible = False Then Return $Winlist[$i][0] ;ahhh there is the problem he is return just one window and exit form the function how can i fix it EndIf EndIf Next EndFunc sweet function right? Edited August 13, 2011 by MydreamIsScriptng Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now