Jump to content

Controlling multiple process


 Share

Recommended Posts

i making hider tools but its working with 1 process perfectly but not 2 process.

i want manage sro_client.exe multiple. how?

this my codes.

Func add()
    $winlist = WinList("SRO_Client")
    _GUICtrlListClear ($thelist)
    For $1 = 1 To $winlist[0][0]
        If $winlist[$1][0] = "" Then
;;
        Else
            _GUICtrlListAddItem ($thelist, $winlist[$1][0])
        EndIf
    Next
;;
EndFunc;==>add

Case $AButton5
            If GUICtrlRead($thelist) = "" Then
                MsgBox(0, "Error", "Please select SRO_Client.")
            Else
                WinSetState(GUICtrlRead($thelist), "", @SW_MINIMIZE)
            EndIf
Link to comment
Share on other sites

you are saying you want to manage multiple processes, but this info tells us nothing, try to be more spesific so others can understand what you are trying to make.

My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

i making hider tools but its working with 1 process perfectly but not 2 process.

i want manage sro_client.exe multiple. how?

this my codes.

Func add()
    $winlist = WinList("SRO_Client")
    _GUICtrlListClear ($thelist)
    For $1 = 1 To $winlist[0][0]
        If $winlist[$1][0] = "" Then
;;
        Else
            _GUICtrlListAddItem ($thelist, $winlist[$1][0])
        EndIf
    Next
;;
EndFunc;==>add

Case $AButton5
            If GUICtrlRead($thelist) = "" Then
                MsgBox(0, "Error", "Please select SRO_Client.")
            Else
                WinSetState(GUICtrlRead($thelist), "", @SW_MINIMIZE)
            EndIf
If you try to minimise a window using it's title and there is more than one window with that title then you cannot be sure which window you are controlling. You need to use the second element in the array returned by WInList because the handles will be unique for each window.

So maybe this will work if you change

_GUICtrlListAddItem ($thelist, $winlist[$1][0])

to

_GUICtrlListAddItem ($thelist, $winlist[$1][1])

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

_GUICtrlListAddItem ($thelist, $winlist[$1][0])

to

_GUICtrlListAddItem ($thelist, $winlist[$1][1])

not running ^^

Posted Image

Try

_GUICtrlListAddItem ($thelist, Hex($winlist[$1][1],8))

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

not working

i have 2 sro_client.exe on task manager.

their title's are SRO_Client same...

but i cant manage them (resize hide etc...)

only i can manage 1 SRO_Client

It doesn't matter if there is more than one window with the same title if you use handles.

Try this

#include <GUIConstants.au3>

GUICreate("My GUI")  
GUISetState(@SW_SHOW)      
$listview = GUICtrlCreateListView("          title         |     No. |         HWND       ", 10, 10, 300, 300)
$but1 = GUICtrlCreateButton("Minimize the selected window", 50, 330, 180, 22)
$but2 = GUICtrlCreateButton("Maximize the selected window", 50, 360, 180, 22)

$var = WinList()
;add only windows with titles to the listview
For $i = 1 To $var[0][0]
    If $var[$i][0] <> '' Then GUICtrlCreateListViewItem($var[$i][0] & '|' & $i & '|' & Hex($var[$i][1]), $listview)
Next


; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    If $msg = $but1 Or $msg = $but2 Then
        $ans = GUICtrlRead(GUICtrlRead($listview))
        Local $sel = StringSplit($ans, '|')
        If IsArray($sel) Then
            If $msg = $but1 Then
                WinSetState($var[$sel[2]][1], "", @SW_MINIMIZE)
            Else
                WinSetState($var[$sel[2]][1], "", @SW_MAXIMIZE)
            EndIf
        EndIf
    EndIf
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...