yehia Posted January 2, 2009 Share Posted January 2, 2009 well i was trying to make a script to get the text from msn chat window but found out that MSN is using a windowless control named "DirectUIHWND1" so this script totally failed: While 1 $b = ControlGetHandle("[CLASS:IMWindowClass]","","DirectUIHWND1") WinActivate("[CLASS:IMWindowClass]","") $a = GUICtrlRead($b,1) If $a <> "0" Then MsgBox(0,"",$a) EndIf ;ControlSend("- Conversation", "", "DirectUIHWND1", $Gesprek&"{ENTER}{ESC}") WEnd if there is any way to get the text in the chat window? and since IE uses windowless controlls too can IE funcs be helpful in this case? My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
yehia Posted January 2, 2009 Author Share Posted January 2, 2009 in other way what i wanna do is starting a counter when the other person sends a msg and renew the counter when he sends a new one unfortunately it cant be done due to the windowless func any help is appreciated My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
FireFox Posted January 2, 2009 Share Posted January 2, 2009 @yehia Activate the window and try : Send("^a") Send("^c") Msgbox(64, '', "text : " & ClipGet()) And for count message you can count + 1 when the window exists then close it and when another or it reappears count +1 etc.. Cheers, FireFox. Link to comment Share on other sites More sharing options...
Zedna Posted January 2, 2009 Share Posted January 2, 2009 I think DirectUIHWND ClassName represents embeded IE control. So you should use IE UDF in this case probably. Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
FireFox Posted January 2, 2009 Share Posted January 2, 2009 @Zedna I dont see why you are suggesting IE udf for a msn window Can you explain it to me im stupid Cheers, FireFox. Link to comment Share on other sites More sharing options...
Zedna Posted January 2, 2009 Share Posted January 2, 2009 @ZednaI dont see why you are suggesting IE udf for a msn window Can you explain it to me im stupid Cheers, FireFox.I don't know/use MSN window in any way. I have never seen it.I just saw DirectUIHWND ClassName mentioned in above post. Resources UDF Â ResourcesEx UDF Â AutoIt Forum Search Link to comment Share on other sites More sharing options...
FireFox Posted January 2, 2009 Share Posted January 2, 2009 @Zedna Ha... ok thanks for explaination Cheers, FireFox. Link to comment Share on other sites More sharing options...
yehia Posted January 3, 2009 Author Share Posted January 3, 2009 thats what i expected y didnt they just created there own windowless controls? anyway this makes my job easier but i've never used the IE udfs can anyone point meh and btw i was checking the IE controls after u said the DirectUIHWND is related to IE and i found it can someone point me, maybe i write a new MSN.au3 cos the old one never works now and btw i saw an article about something called accessibility in VB that makes a user able to handle a windowless control, can autoit do this? My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
FireFox Posted January 3, 2009 Share Posted January 3, 2009 @yehia you want to get text of wlm window (windows live messenger) right ? If you tried my example you would have this : If Not WinExists("[CLASS:IMWindowClass]") Then MsgBox(64, "WLM get text", "Any IM window exists !") Else WinActivate("[CLASS:IMWindowClass]") WinWaitActive("[CLASS:IMWindowClass]", '', 3) $IMwgp = WinGetPos("[CLASS:IMWindowClass]", '') MouseClick("left", $IMwgp[0] + 75, $IMwgp[1] + 190, 1, 0) Send("^a") Sleep(250) Send("^c") MsgBox(64, "WLM get text", ClipGet()) EndIf And works fine ! Cheers, FireFox. Link to comment Share on other sites More sharing options...
yehia Posted January 3, 2009 Author Share Posted January 3, 2009 thanks alot but this highlights the text, copies to clip board and moves mouse to click the win too :/ i want to retrieve the text from the control without at least moving the mouse My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
FireFox Posted January 3, 2009 Share Posted January 3, 2009 @yehia Dont try to bump your topic by deleting your old post and reply with the same thing, and its not the first time if you continue I will have to advert mods... Cheers, FireFox. Link to comment Share on other sites More sharing options...
yehia Posted January 3, 2009 Author Share Posted January 3, 2009 (edited) its not the smart thing to do but its the same as posting a bump word but in a clean way without making my topic looks messy Dim $oldclip, $counter1 If Not WinExists("[CLASS:IMWindowClass]") Then MsgBox(64, "WLM get text", "Any IM window exists !") Else Do If WinActive("[CLASS:IMWindowClass]") Then Sleep(250) ;WinWaitActive("[CLASS:IMWindowClass]", '', 3) ; "[CLASS:IMWindowClass]")SciTEWindow $IMwgp = WinGetPos("[CLASS:IMWindowClass]", '') ;MouseClick("left", $IMwgp[0] + 75, $IMwgp[1] + 230, 1, 0) ControlClick("[CLASS:IMWindowClass]","","DirectUIHWND", "left",1,$IMwgp[0],$IMwgp[1] + 230) Send("^a") Sleep(100) Send("^c") $clip = ClipGet() If $oldclip <> $clip Then $counter = TimerDiff($counter1) ToolTip($counter/1000) $counter1 = TimerInit() EndIf $oldclip = $clip Sleep(1000) EndIf Until 1 = 5 EndIf thats how i got so far but it keeps coping what i type in the edit control since both of them r the same control can we get around this? Edited January 3, 2009 by yehia My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
FireFox Posted January 3, 2009 Share Posted January 3, 2009 (edited) @yehia Ok its the better way to bump your topic but not before 24hours of your last reply ... Edit : Instead of doing that for get text, try to enable history and read text from it... Cheers, FireFox. Edited January 3, 2009 by FireFox Link to comment Share on other sites More sharing options...
yehia Posted January 3, 2009 Author Share Posted January 3, 2009 well tried that too but it didnt work :/ My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
yehia Posted January 4, 2009 Author Share Posted January 4, 2009 this is my script now expandcollapse popupHotKeySet("{F1}", "Getit") HotKeySet("{F4}", "Stopit") Dim $oldclip, $counter1 ToolTip("F1 to start, F4 to stop",0,0, "Ma3lomat L NANA") Do Until 1 = 5 Func Getit() If Not WinExists("[CLASS:IMWindowClass]") Then MsgBox(64, "WLM get text", "Any IM window exists !") Else If Not WinActive("[CLASS:IMWindowClass]") Then WinSetState("[CLASS:IMWindowClass]","",@SW_HIDE) sleep(100) WinSetState("[CLASS:IMWindowClass]","",@SW_SHOW) WinActivate("[CLASS:IMWindowClass]") ; "[CLASS:IMWindowClass]")SciTEWindow EndIf Do $IMwgp = WinGetPos("[CLASS:IMWindowClass]", '') If WinExists("[CLASS:IMWindowClass]") Then ControlClick("[CLASS:IMWindowClass]", "", "DirectUIHWND1", "left", 1, $IMwgp[0] + 25, $IMwgp[1] + 200) EndIf Send("^a") Sleep(100) Send("^c") $clip = ClipGet() If $oldclip <> $clip Then $counter = TimerDiff($counter1) $no = Round($counter / 1000, 1) ToolTip(""&$no&" Sec") $counter1 = TimerInit() $oldclip = $clip EndIf Until 1 = 5 EndIf EndFunc Func Stopit() Do Until 1 = 5 EndFunc still its too lame :/ if there is anyway i can type or enter text :/ im still getting info about windowless controls should i continue or did anyone tried it and got nothing so i would just discard it ... My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
yehia Posted January 5, 2009 Author Share Posted January 5, 2009 i found this topic http://www.autoitscript.com/forum/index.ph...e+Accessibilityabout MSAA can this help in handling windowless controls? My Scripts:IE New UDFsElastic images moving under mouse (with a happy valentine's example)_FileRemoveLine Link to comment Share on other sites More sharing options...
corgano Posted May 15, 2009 Share Posted May 15, 2009 Sorry for bumping this topic, but I am also looking for a more efficient means of reading and writeing text into a DirectUIHWND control 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
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