McGod Posted June 21, 2006 Posted June 21, 2006 Because the program I'm dealing with has it's name change alot. Could I use the PID from the Run command to get the window name? IE: $pid=Run ( "notepad.exe" ) Getwindowname ( $pid ) Func Getwindowname ( $pid ) ;; ;; ;; EndFunc What would go in the ;; [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u]
w0uter Posted June 21, 2006 Posted June 21, 2006 try and see if it has the same classname. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
McGod Posted June 21, 2006 Author Posted June 21, 2006 Yea it does, could i just use that? [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u]
w0uter Posted June 21, 2006 Posted June 21, 2006 I bet you can look it up in the helpfile yourself. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
Helge Posted June 21, 2006 Posted June 21, 2006 Check out my http://www.autoitscript.com/fileman/users/Helge/udfs.htm#processgethwnd, which does exactly what you want !
McGod Posted June 21, 2006 Author Posted June 21, 2006 I used AutoItSetOption("WinTitleMatchMode", 4) $windowname = WinGetTitle("ClassName=Diablo II","") And I now have the hwnd, pid, process name and window title. TY you can close [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u]
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