mokitooo Posted January 27, 2011 Share Posted January 27, 2011 Hello again. I want to "copy and past" thousands of names that I got saves in a notepad to another place. I wanna know if there is anyway to copy them one by one. For example if I got 3 names: Mike John Charlie I'd like to have a script that copies one name, the one that I indicate to it. Thanks. Link to comment Share on other sites More sharing options...
kylomas Posted January 27, 2011 Share Posted January 27, 2011 (edited) mokitooo, Sure, bunch of ways to do it. You have not defined a couple things you will need to start: - how to identify the name to move - gui or batch - is this a running instance of notepad or the .txt file Define these + write some code = get some help!!! kylomas Edited January 27, 2011 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
mokitooo Posted January 28, 2011 Author Share Posted January 28, 2011 mokitooo, Sure, bunch of ways to do it. You have not defined a couple things you will need to start: - how to identify the name to move - gui or batch - is this a running instance of notepad or the .txt file Define these + write some code = get some help!!! kylomas First of all, the way to identify the names (which are thousands and separated as seen on the example (one name per a txt line)), should be like this: The first round (or the first time)(notice that the program is overall an automatic clicking of the mouse (and some send's..) that repeats infinitely) it should take the 1st line name, then at the second round (or the first repeat), it should take the second line name, and so infinitely. Here I give you the whole script which is not so large. I still needing to add the func that repeats all the process, anyway i'll mark you where the "copy" or "take the name" process should go, and also where I'll "past" or "send it". expandcollapse popupWinActivate("A WINDOW") sleep(500) MouseClick("left", 499, 397,1) Sleep(6100) $var = PixelGetColor(634,295) if $var = 8496036 Then sleep(500) MouseClick("left", 692,544,1) sleep(500) MouseClick("left", 881,690,1) sleep(500) MouseClick("left", 627,556,1) sleep(500) ------------HERE I MUST "SEND" OR "COPY" THE NAME------------------ sleep(500) MouseClick("left",633,581,2) sleep(1500) Send( "mokito13") Else _DoSomethingElse() EndIf $var_1 = PixelGetColor(638,579) if $var_1 = 0 Then sleep(2000) Send("{ENTER}") sleep(5000) Else _DoCacota() EndIf MouseClick("left", 686,552,1) sleep(2500) $var_2 = PixelGetColor(702,676) if $var_2 = 9862528 Then sleep(1000) MouseClick("left",639, 860, 3) Else _DoCacota2() EndIf $var_3 = PixelGetColor(980,710) if not $var_3 = 7233606 Then ----------- HERE I MUST "TAKE" OR "COPY" THE NAME FOR THE NEXT SCRIPT REPEAT --------------- Exit Else _doCacota3() EndIf Func _DoCacota() MouseClick(627,556,1) Sleep(1000) Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Send("{BS}") Sleep(1000) MouseClick("left", 633,581,2) Send("mokito13") $var_1 = PixelGetColor(638,579) if $var_1 = 0 Then sleep(2000) Send("{ENTER}") sleep(5000) Else _DoCacota() EndIf EndFunc Func _DoCacota2() MouseClick("left",686,552) sleep(2500) if $var_2 = 9862528 Then sleep(1000) MouseClick("left",639, 860, 3) Else _DoCacota2() EndIf EndFunc Func _doCacota3() MouseClick("left",639, 860, 1) $var_3 = PixelGetColor(980,710) if not $var_3 = 7233606 Then Exit Else _doCacota3() Endif EndFunc Func _DoSomethingElse() sleep(1000) MouseClick("left", 499, 397,1) Sleep(6000) $var = PixelGetColor(634,295) if $var = 8496036 Then sleep(1000) MouseClick("left", 692,544,1) sleep(2000) MouseClick("left", 881,690,1) sleep(2000) MouseClick("left",673,557,1) sleep(2000) MouseClick("left", 627,556,1) sleep(2000) Send("mokitooo") sleep(1000) MouseClick("left",633,581,2) sleep(1000) Send( "mokito13") sleep(2000) Send("{ENTER}") sleep(5000) MouseClick("left", 686,552,1) sleep(1000) MouseClick("left",639, 860, 3) Else _DosomethingElse() EndIf EndFunc The most important thing is that after doing the 1st time script, it must take the 2nd line name from the .txt, and then at the 3rd time take the 3rd line name. Idk if i've been clear enough, but if need more help, please tell me. THANKS Link to comment Share on other sites More sharing options...
idaser Posted January 28, 2011 Share Posted January 28, 2011 BUMP! Link to comment Share on other sites More sharing options...
idaser Posted January 28, 2011 Share Posted January 28, 2011 Bring up your post Link to comment Share on other sites More sharing options...
idaser Posted January 28, 2011 Share Posted January 28, 2011 bump Link to comment Share on other sites More sharing options...
Thornhunt Posted January 28, 2011 Share Posted January 28, 2011 hint stop bumping your post. second, there are numerous ways of doing this. including string read and search or you can manually open the file copy the first name save from clipboard to array, then send enter and repeat. or find next line copy paste ect ect Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D Link to comment Share on other sites More sharing options...
GEOSoft Posted January 28, 2011 Share Posted January 28, 2011 Read my signature about post bumping and here is another tip for you Myself and others watch for people bumping posts and when we see them their question will move to the bottom of the list for support. Someone will get to you sooner or later so don't make it even later by bumping within 24 hours. Your code is only important to you and everyone around here has their own code to work with and their own life to lead. Remember we are all volunteers and that means we get to say when (and if) we are going to help you. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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