Tankbuster 3 Posted November 16, 2010 (edited) As always: I searched the forum, read a lot of posts but somehow it looks I'm stuck....I will describe my issue, so you may post me a link to old stuff/posts or help me out right here. I wrote for my self pleasure a Window Arranger (a app that stores the location and size of certain windows and on try command it moves the windows to their stored position). Up to last version I stored the Name=Window Title and position in a INI. And now I thought it would be nice to add new Windows to the INI. (this is working no problem).So I extended the script with a AddFunction. This is also working, BUT currently I head for the TITLE of the active window. (WinGetPos("[TITLE:" & $titleAdd & "]"))But testing the issue, I thought of: What if I want to store the position of eg. firefox but the title is different (of course), than my TitelMatch won't work. As a additional aproach I want to head for the class of a window (so either Class or Title matches)In my scenario I want now either the TITLE OR the CLASS stored. But I cant' figure out how to get the CLASS of a active window.help file: WinGetTitle("[active]") returns the active window's titleso i there a function like:WinGetClass("[active]") returns the active window's class?I added the code of my function, just to show the search lines. But I think my question is clear (at least for myself....muhahaha ).I fear that the solution is just too obvious. Do I missed something in the helpfile?Autoit Used: 3.3.6.1Func AddWindow() Local $titleAdd = WinGetTitle("[active]") Local $result = MsgBox(32 + 4, "EMU Arranger:", "Add this title?" & @CRLF & $titleAdd) If $result = 6 Then Local $winsave_para = WinGetPos("[TITLE:" & $titleAdd & "]") IniWrite($IniFileName, $titleAdd, "WINDOW", "" & $winsave_para[0] & "," & $winsave_para[1] & "," & $winsave_para[2] & "," & $winsave_para[3] & "") EndIf HotKeySet("^!a") ReadWindowsPos() EndFunc ;==>AddWindow Edited November 16, 2010 by Tankbuster Share this post Link to post Share on other sites
JohnOne 1,603 Posted November 16, 2010 (edited) I dont think there is a native function for that, and I havent seen a udf either. Have you thought of using the wintitlematchmode option? EDIT: WinGetClassList might help. Edited November 16, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
KaFu 295 Posted November 16, 2010 _WinAPI_EnumWindows() returns window class. OS: Win10-1909 - 64bit - German, AutoIt Version: 3.3.14.5, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2019-Dec-21) BIC - Batch-Image-Cropper (2019-Dec-11) COP - Color Picker (2009-May-21) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2019-Dec-07) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Share this post Link to post Share on other sites
Tankbuster 3 Posted November 16, 2010 Thank you, of course it was to obvious. And to add to my own shame, if I had used the help file search function" window class name" (not the forum search) I would have found it with the first search......slap me for that, sorry to bother you with this post. But thank you (all) very much ! Share this post Link to post Share on other sites