Sign in to follow this  
Followers 0
slyaussie

Copy Text From Notepad, Input To Program Dialog

9 posts in this topic

#1 ·  Posted (edited)

:"> Can someone please explain to me how to input text from Clipboard into a "send" function or similar....Is it possible???

..I am New to Writing code, but spend countless hours (drifting into days on this 1!!!) searching forums and googling. :D

Basically I have a paid version of OutPost Pro Firewall, and it has a crazy 120 Charactor or so Registration code!!!!!!!!!!!!!!!!!!!!!!!!! :D

I am trying to create a silent Script that enters everything i need, and have had great success with everything except accurately copying the notepad file of the code I saved upon payment to the enter Code dialog box.

Please, how do i accurately copy the text from a notepad file, and input it in to another dialog window??????????????? :)

..I can open the box, and Input text using the send command, however even though i copy/paste the Huge number into AuotIT script send command,...it always comes up as incorrect.........................However if i copy/paste via normal methods........all is ok......(The code IS CASE sensitive)

..My question is, is there any way to Copy the text from Notepad, copy it to clipboard, and enter it to Dialog Window accurately???

I realise maybe i need to enter relevant commands to Change the CAse of the Code cause it;'s case sensitive.....however i figured if i could execute a simple Copy/paste command.....it would do the same thing....

PRETTY PLEASE can anyone please halp me!!!!!!!!!!!!!!!!!!!! :">

I've spent Countless hours rolling into DAYS and Now into WEEKS tring to find this out.

I can manage everything from opening the Dialog boxes, ( "!n" ), and similar commads, and Other AutoIT window info related ControlClick commands, and have several scripts working as silent installs...but SERIOUSLY would appreciate some help here from you Guru's if you would be so grateful.

..I hate asking for help but after several weeks of no results (my ISP does suck at the moment tho....slow searches put you off fast!!)

Please help me!!!!!

You guys ROCK....Wish to be on the same Intellectual level someday...I do learn fast...and AM SO totally into the AutoIT Language and wat to to everything possible with it!!!!!!

Edited by slyaussie

Share this post


Link to post
Share on other sites



Look into the functions ClipPut() and ClipGet().

They should help you out.


----[ SandyD ]---

Share this post


Link to post
Share on other sites

Hey thank you kindly for the reply, but i am still confused very much!!!

I realise i am probably (more than likely) missing something and have studied ClipPut and ClipGet a lot but still fail to understand????

..I am an automation service technician, which only involves PLC's, and can understand them and program them from scratch....but this computer code is still messing me up!!!

Really hoping some1 can post a piece of code that will allow me to input what's in the clipboard to another window accurately duplicating case-sensitive letters and numbers to another window..

Seriously appreciate any ideas,,,,I'm sure there's a way........

Share this post


Link to post
Share on other sites

Ok..well i am obviously very newbie here...but this works a charm via my batch command after first reboot up till copying text from notepad file........................

..How do i enter text into another window copied from what i just done???????????

; First active window after reboot, configure.au3 launched via batch cmd to execute the following:

WinActivate ( "Startup Configuration Wizard" , "What's New" )

Send ("!n")

WinWaitActive ( "Startup Configuration Wizard" , "" )

sleep (1000)

send ( "{SPACE}" )

Send ("!n")

WinWaitActive ( "Startup Configuration Wizard" , "Enable Anti-Spyware " )

sleep (200)

ControlClick ( "Startup Configuration Wizard" , "&Run system scan after completing the wizard" , "Button2" )

sleep (200)

Send ("f")

sleep (500)

Run ("C:\Program Files\Agnitum\Outpost Firewall\Outpost.exe")

sleep (1000)

send ( "{ALT}" )

send ( "h" )

send ( "r" )

WinWaitActive ( "Outpost Firewall Pro Registration" , "" )

send ( "k" )

WinWaitActive ( "Enter Key" , "" )

; Open Notepad and the Serial Number

run ( "notepad.exe" )

sleep (1000)

send ( "!f" )

sleep (200)

send ( "o" )

WinWaitActive ( "Open" )

sleep (500)

send ( "C:\Test Programs\Outpost Pro\Outpost Pro Serial.txt" )

sleep (200)

send ( "{TAB}" )

send ( "{TAB}" )

send ( "o" )

; wait for notepad to open, then select serial File and copy serial

WinWaitActive ( "Outpost Pro Serial - Notepad" )

send ( "!e" )

send ( "a" )

; Activate Serial Enter Dialog Box and paste key

WinWaitActive ( "Enter Key" )

sleep (500)

What the hell to enter now!!!!!!!!!!!!!!!!!!!!!!!!!!

send ("WTF-please help me" )

PLEASE somebody must know!!!!

I know i am dumb!!!! lol

Share this post


Link to post
Share on other sites

Use the Window Info Tool that comes with AutoIt to find out the control ID and then use ControlSend.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

@slyaussie

Maybe this can help you.

Look in my signature for "Read data from Any Windows Edit Control"

click on it and copy the code to run.

BEFORE running the code open Notepad and put some text in there.

Then see what happens if you run the code.

Enjoy !!

ptrex

Share this post


Link to post
Share on other sites

@slyaussie

Maybe this can help you.

Look in my signature for "Read data from Any Windows Edit Control"

click on it and copy the code to run.

BEFORE running the code open Notepad and put some text in there.

Then see what happens if you run the code.

Enjoy !!

ptrex

Thank you very muchly! I shall give it a go!

Appreciate the help more than you know! :)

Share this post


Link to post
Share on other sites

hows about.. you cut out the all the extra work, replace the part where the script is opening notepad, and replace it with:

SEND("enterthereallybigserialkeyheretobesenttotheprogam")

this way, it will all be contained within the script !!!

Share this post


Link to post
Share on other sites

hows about.. you cut out the all the extra work, replace the part where the script is opening notepad, and replace it with:

SEND("enterthereallybigserialkeyheretobesenttotheprogam")

this way, it will all be contained within the script !!!

^^Yes well Sounds good in practice, and is how I usually do it....However something must be getting lost in Translation...cause even copying and pasting the serial into the AutoIT Script send Function...It says it's Invalid!!??!! :whistle:

If i copy/paste what i have set to input via AutoIT using Send (""), it accepts it!! I'm using a Controlclick command to click the register Button, so it's not as if a Keyboard shortcut is being added to my code when I activate register function. :)

.. I Ran that Script ptrex, and It seems to do a great job determining whats written in notepad....however I'm still stumped as to how to get it to input the data into another dialog box???? :">

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  
Followers 0