Moderators SmOke_N Posted June 24, 2005 Moderators Posted June 24, 2005 At my wits end, and I know the answer is right under my nose:From AutoInfo:>>>>>>>>>>>> Window Details <<<<<<<<<<<<<Title: The Window Title That Changes Class: Abcd:200000:15:21102:0:8061d (8061d changes each time I log on; the rest is constant for Class)>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size:Control ID:ClassNameNN:Text:I'm trying to get the title name of the window, I was trying to use:$Title = WinGetTitle(Classname="Abcd:200000:15:21102:0:8061d")This works obviously, but again the last 5 digits change each time I log on, so it will only work in one instance.How can I get a short version of ClassName= to work (yes I know it says must be "exact")? Anyone made a work around for this yet? 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.
GaryFrost Posted June 24, 2005 Posted June 24, 2005 If it's the active window you can use $Title = WinGetTitle("") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Moderators SmOke_N Posted June 24, 2005 Author Moderators Posted June 24, 2005 If it's the active window you can use $Title = WinGetTitle("")<{POST_SNAPBACK}>Yeh, I'm afraid I may have to revert to that. I wanted it to look more specific in case the users had other windows up rather than having to click on the window for "last" active.Thanks though Gary 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.
Moderators SmOke_N Posted June 24, 2005 Author Moderators Posted June 24, 2005 Sad , thought Gary or Burrup would of gotten the one by now, if could be "gotten" (what a phrase). 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.
Moderators SmOke_N Posted June 26, 2005 Author Moderators Posted June 26, 2005 <BUMP> Anyone have any ideas other than: $Title = WinGetTitle("") ?? Sorry, but still banging my head against the wall here. 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.
Valuater Posted June 26, 2005 Posted June 26, 2005 (edited) <BUMP>Anyone have any ideas other than: $Title = WinGetTitle("") ??Sorry, but still banging my head against the wall here.<{POST_SNAPBACK}>not sure... but this might shed some lighthttp://www.autoitscript.com/forum/index.ph...id=86125&st=0hope it helps8) Edited June 26, 2005 by Valuater
Moderators SmOke_N Posted June 26, 2005 Author Moderators Posted June 26, 2005 Thanks Valuater, but: If you noticed the first post in my question there is no Control ID. I have a "Class" Abcd:'whatever'&'end numbers', using "classname=Abcd:'whatever'", but the 'end numbers are always differnt. Looking for a way to only get the first few "letters" or "numbers" of the "Class". That's all I need to recognize that specific window regardless of the ' end numbers' all the time. 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.
buzz44 Posted June 26, 2005 Posted June 26, 2005 (edited) Sad , thought Gary or Burrup would of gotten the one by now, if could be "gotten" (what a phrase).<{POST_SNAPBACK}>Didn't know I was a part of this lol.After reading over the topic and poking at MSDN a tiny bit, and a look in the help file, try this...$WinList = WinList() For $I = 0 To $WinList[0][0] $Class = WinGetClassName($WinList[$I][1]) If StringLeft($Class, 23) = "Abcd:200000:15:21102:0:" Then $Title = WinGetTitle($WinList[$I][1]) Msgbox(0,"Title", $Title) EndIf Next Func WinGetClassName($hwnd) Local $ret = DllCall("user32.dll","int","GetClassName","hwnd", $hwnd,"str","") If Not @error Then Return $ret[2] EndFuncEdit: Changed function name. Edited June 26, 2005 by Burrup qq
Moderators SmOke_N Posted June 27, 2005 Author Moderators Posted June 27, 2005 Ok, I just got to try this: Um... Great Job >>>>> Thanks!! See why I said thought you or Gary would of whooped it already??? LOL 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.
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