Jump to content
Sign in to follow this  
Guest robertdavies.net

help starting

Recommended Posts

Guest robertdavies.net

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

Share this post


Link to post
Share on other sites

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.

:lmao:

Share this post


Link to post
Share on other sites
Guest robertdavies.net

Thanks heaps guys :-)

Great product I look forward to automating a whole bunch of stuff on my pc! Maybe even building little applications :-)

Share this post


Link to post
Share on other sites

or something like

$input= InputBox ("Test", "Enter some text:")
Run ("notepad.exe")
WinWait ("Untitled - Notepad")
Send ($input)

:lmao:

good luck


FootbaG

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...