corgano Posted May 11, 2009 Share Posted May 11, 2009 I need to find a wat to get the text of a richedit control and a way to set the text of a richedit controll. All i have to do this from is a control ID, and controlgethandle($ID) does not work on richedit controlls How do I do this? (the control ID is 1000) 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Authenticity Posted May 11, 2009 Share Posted May 11, 2009 Opt('SendKeyDelay', 0) ShellExecute('wordpad') WinWaitActive('[CLASS:WordPadClass]') $hwnd = ControlGetHandle('[CLASS:WordPadClass]', '', '[CLASS:RICHEDIT50W]') ControlSend('', '', $hwnd, 'AutoIt-1-2-3') MsgBox(0x40, 'Info', 'Control handle: ' & $hwnd & @LF & 'Control text: ' & ControlGetText('', '', $hwnd)) Link to comment Share on other sites More sharing options...
corgano Posted May 11, 2009 Author Share Posted May 11, 2009 Opt('SendKeyDelay', 0) ShellExecute('wordpad') WinWaitActive('[CLASS:WordPadClass]') $hwnd = ControlGetHandle('[CLASS:WordPadClass]', '', '[CLASS:RICHEDIT50W]') ControlSend('', '', $hwnd, 'AutoIt-1-2-3') MsgBox(0x40, 'Info', 'Control handle: ' & $hwnd & @LF & 'Control text: ' & ControlGetText('', '', $hwnd)) TY, that indeed works, but i am trying to get the text of a richedit controll in a chat window (gameranger). How would i modify this code? 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Zedna Posted May 11, 2009 Share Posted May 11, 2009 Look at GUIRichEdit UDFhttp://www.autoitscript.com/forum/index.ph...amp;hl=richedit Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
corgano Posted May 11, 2009 Author Share Posted May 11, 2009 Look at GUIRichEdit UDFhttp://www.autoitscript.com/forum/index.ph...amp;hl=richeditthat udf did not work at all. i got the example to work though. 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Zedna Posted May 12, 2009 Share Posted May 12, 2009 that udf did not work at all. i got the example to work though.So post small reproducing script. Resources UDF ResourcesEx UDF AutoIt Forum Search 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