Guest robertdavies.net Posted February 21, 2005 Share Posted February 21, 2005 Hi All, Im looking through the forum. I cant find any small piece of code that does something simple which is... Get input from a textarea type field (after pressing button). Then open application eg notepad, and get the original input and place it in word. I think after that then it will be easier to fiddle with functions etc and teach myself. Just basically want a kick start. Thanks if any of you can help me Rob Link to comment Share on other sites More sharing options...
trids Posted February 21, 2005 Share Posted February 21, 2005 There are some links over here Link to comment Share on other sites More sharing options...
MHz Posted February 21, 2005 Share Posted February 21, 2005 A little example for you. MsgBox(32, 'Ready...', 'Text transfer example' & @LF & 'from 1 edit control, to another'); Run('notepad.exe'); Run notepad. WinWait('Untitled'); Wait for window to appear. ControlSetText('Untitled','', 'Edit1', 'Hello world' & @CRLF ); Send text to notepad. Sleep(2000); A pause. So you can see the text. $all = ControlGetText('Untitled', '', 'Edit1'); Now get text from notepad, and store in $all variable. WinClose('Untitled'); Close notepad Run('notepad.exe'); Start new instance of notepad. WinWait('Untitled'); Wait for window to appear. ControlSetText('Untitled', '', 'Edit1', 'Text from other notepad window = ' & $all); Send text to notepad. ; Result should 'Text from other notepad window = Hello world', in the 2nd notepad instance. Link to comment Share on other sites More sharing options...
Guest robertdavies.net Posted February 21, 2005 Share Posted February 21, 2005 Thanks heaps guys :-) Great product I look forward to automating a whole bunch of stuff on my pc! Maybe even building little applications :-) Link to comment Share on other sites More sharing options...
layer Posted February 21, 2005 Share Posted February 21, 2005 or something like $input= InputBox ("Test", "Enter some text:") Run ("notepad.exe") WinWait ("Untitled - Notepad") Send ($input) good luck FootbaG 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