from different exes off course
i ve searched but nothing found sorry
Edited by mistakilla, 05 June 2008 - 10:31 PM.
Posted 05 June 2008 - 10:30 PM
Edited by mistakilla, 05 June 2008 - 10:31 PM.

I have a blog about programming but mostly about autoit and its in my language (turkish)Btw, feel free to visit it, i answer every comment
here: autoit
Posted 05 June 2008 - 10:34 PM
I want to get all open autoit windows on my computer, is there a way to do this ?
from different exes off course
i ve searched but nothing found sorry
Posted 05 June 2008 - 10:39 PM
The WinList() function gives you an array of all open windows and handlers. Unfortunately, nothing in AutoIt I know of actually can determine the "type" of program it is, only the name of the program. But maybe you can figure something out with WinList()

I have a blog about programming but mostly about autoit and its in my language (turkish)Btw, feel free to visit it, i answer every comment
here: autoit
Posted 05 June 2008 - 11:10 PM
You can always check the CLASS window:Unfortunately, nothing in AutoIt I know of actually can determine the "type" of program it is, only the name of the program
Edited by MrCreatoR, 05 June 2008 - 11:12 PM.
==========================================================
AutoIt Russian Community
Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program
UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating
)* === My topics === *
==========================================================AutoIt is simple, subtle, elegant. © AutoIt Team
Posted 06 June 2008 - 12:23 AM
ProcessList("processName.exe")?mm, is there also a way to do process like this ?
Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Posted 06 June 2008 - 12:27 AM
You need to be MUCH more specific when asking a question then.nop
i want to get a list of Auto-it v3 Processess running
Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Posted 06 June 2008 - 12:45 AM
You need to be MUCH more specific when asking a question then.
You have the list... go through the list, use WinGetProcess, that will return the PID, with that you can use _ProcessGetName
Edited by mistakilla, 06 June 2008 - 12:48 AM.

I have a blog about programming but mostly about autoit and its in my language (turkish)Btw, feel free to visit it, i answer every comment
here: autoit
Posted 06 June 2008 - 12:52 AM
Processes can be named anything, the idea of finding one by it's name purely other than AutoIt3.exe (or wrapper.exe) is not going to happen... so mscreator provided the stepping stone to finding autoit processes being ran.thanks for your help Smoke_n
but i dont have the list. i wrote things that i trying to do at the first post, and just want to do same with processess nvm its not important, you r looking tightalso i am not asking question, i am trying to form an opinion with help of you to straighten my au3script.
so, i want to recognize an Auto-it process from process name not from win title, there is also guiless auto it scripts around
Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Posted 06 June 2008 - 01:16 AM
$sAutoItProcList = _GetAutoItProcList() ConsoleWrite($sAutoItProcList) Func _GetAutoItProcList() Local $aProcList = ProcessList() Local $sRet_List = "", $sProc_Path = "" For $i = 1 To UBound($aProcList)-1 $sProc_Path = _ProcessGetPath($aProcList[$i][1]) If StringInStr(FileGetVersion($sProc_Path, "CompiledScript"), "AutoIt") Then $sRet_List &= $aProcList[$i][0] & @CRLF Next Return StringStripWS($sRet_List, 3) EndFunc Func _ProcessGetPath($vProcess) Local $iPID = ProcessExists($vProcess) If Not $iPID Then Return SetError(1, 0, -1) Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID) If Not IsArray($aProc) Or Not $aProc[0] Then Return SetError(2, 0, -1) Local $vStruct = DllStructCreate('int[1024]') Local $hPsapi_Dll = DllOpen('Psapi.dll') If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@SystemDir & '\Psapi.dll') If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@WindowsDir & '\Psapi.dll') If $hPsapi_Dll = -1 Then Return SetError(3, 0, '') DllCall($hPsapi_Dll, 'int', 'EnumProcessModules', _ 'hwnd', $aProc[0], _ 'ptr', DllStructGetPtr($vStruct), _ 'int', DllStructGetSize($vStruct), _ 'int_ptr', 0) Local $aRet = DllCall($hPsapi_Dll, 'int', 'GetModuleFileNameEx', _ 'hwnd', $aProc[0], _ 'int', DllStructGetData($vStruct, 1), _ 'str', '', _ 'int', 2048) DllClose($hPsapi_Dll) If Not IsArray($aRet) Or StringLen($aRet[3]) = 0 Then Return SetError(4, 0, '') Return $aRet[3] EndFunc
Edited by MrCreatoR, 06 June 2008 - 03:38 PM.
==========================================================
AutoIt Russian Community
Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program
UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating
)* === My topics === *
==========================================================AutoIt is simple, subtle, elegant. © AutoIt Team
Posted 06 June 2008 - 12:05 PM
Thanks again you are very smart! and you just gave me the ideaI think the only indication of AutoIt executable can be found in the file properties, e.g. «CompiledScript»...
AutoIt$sAutoItProcList = _GetAutoItProcList() ConsoleWrite($sAutoItProcList) Func _GetAutoItProcList() Local $aProcList = ProcessList() Local $sRet_List = "", $Proc_Path = "" For $i = 1 To UBound($aProcList)-1 $Proc_Path = _ProcessGetPath($aProcList[$i][1]) If StringInStr(FileGetVersion($Proc_Path, "CompiledScript"), "AutoIt") Then $sRet_List &= $aProcList[$i][0] & @CRLF Next Return $sRet_List EndFunc Func _ProcessGetPath($vProcess) Local $iPID = ProcessExists($vProcess) If Not $iPID Then Return SetError(1, 0, -1) Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID) If Not IsArray($aProc) Or Not $aProc[0] Then Return SetError(2, 0, -1) Local $vStruct = DllStructCreate('int[1024]') Local $hPsapi_Dll = DllOpen('Psapi.dll') If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@SystemDir & '\Psapi.dll') If $hPsapi_Dll = -1 Then $hPsapi_Dll = DllOpen(@WindowsDir & '\Psapi.dll') If $hPsapi_Dll = -1 Then Return SetError(3, 0, '') DllCall($hPsapi_Dll, 'int', 'EnumProcessModules', _ 'hwnd', $aProc[0], _ 'ptr', DllStructGetPtr($vStruct), _ 'int', DllStructGetSize($vStruct), _ 'int_ptr', 0) Local $aRet = DllCall($hPsapi_Dll, 'int', 'GetModuleFileNameEx', _ 'hwnd', $aProc[0], _ 'int', DllStructGetData($vStruct, 1), _ 'str', '', _ 'int', 2048) DllClose($hPsapi_Dll) If Not IsArray($aRet) Or StringLen($aRet[3]) = 0 Then Return SetError(4, 0, '') Return $aRet[3] EndFunc
Edited by mistakilla, 06 June 2008 - 12:07 PM.

I have a blog about programming but mostly about autoit and its in my language (turkish)Btw, feel free to visit it, i answer every comment
here: autoit
Posted 06 June 2008 - 07:11 PM
Posted 06 June 2008 - 07:14 PM
http://www.autoitscript.com/forum/index.ph...st&p=532202Yu can do it with WinList. too, just use AutoIt v3 as Classname:
CODE#include <Process.au3>
#include <Array.au3>
$Processes = _GetAutoItProcesses()
_ArrayDisplay($Processes)
;Parameters: [Optional:] $includemy -> include the Process of the executing Script
; Returns Array:
; [0][0] -> ProcessCount
; [$i][0] -> ProcessNmae
; [$i][1] -> PID
; Author: Prog@ndy
Func _GetAutoItProcesses($inlcudemy = True)
Local $aAutoItWinList = _GetAutoItWinList()
Local $Processes[1][2] = [[0]], $pid
For $i = 1 To $aAutoItWinList[0][0]
$pid = WinGetProcess($aAutoItWinList[$i][1])
If (Not $inlcudemy) And ($pid = @AutoItPID) Then ContinueLoop
$Processes[0][0] += 1
ReDim $Processes[$Processes[0][0]+1][2]
$Processes[$Processes[0][0]][1] = $pid
$Processes[$Processes[0][0]][0] = _ProcessGetName ( $Processes[$Processes[0][0]][1] )
Next
Return $Processes
EndFunc
Func _GetAutoItWinList()
Return WinList("[CLASS:AutoIt v3]")
EndFunc
Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Posted 06 June 2008 - 11:31 PM
Mixed them to one function, and changed the name/purpose a little: _ProcessListEx - UDFI think the only indication of AutoIt executable can be found in the file properties, e.g. «CompiledScript»...
==========================================================
AutoIt Russian Community
Projects: ATT - Application Translate Tool [new] | BlockIt - Block files & folders [new] | SIP - Selected Image Preview [new] | SISCABMAN - SciTE Abbreviations Manager [new] | AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program
UDFs: OnAutoItErrorRegister - Handle AutoIt critical errors [new] | AutoIt Syntax Highlight [new] | Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation DemoLike the examples/UDFs? Please rate the topic (up-right corner of the post header: Rating
)* === My topics === *
==========================================================AutoIt is simple, subtle, elegant. © AutoIt Team
0 members, 0 guests, 0 anonymous users