din
New Member
Posts: 2
|
Post by din on Jul 5, 2021 16:21:14 GMT
Hello need some help. Below the code
I have a txt file containing below numbers. Where you see Keypress Ctrl+v the first nr need to be.
5660889379
5661140380
5661140381
5661153207
5661175966
5661185825
5661186241
5661186585
5661186654
What I would like to archive is that the code goes the the txt file runs the macro but where Ctrl+v it will take the first nr. When done it loops and takes the second nr from txt file and so on. Hope someone can help me.
Million thanks already Din
insert code here 1 | 760 | 842 | 8137 | Left Click Down
2 | 760 | 842 | 127 | Left Click Release
3 | 190 | 262 | 1759 | Keypress Ctrl+ | v
4 | 190 | 262 | 1772 | Keypress enter
5 | 206 | 295 | 5405 | Keypress f4
6 | 206 | 295 | 1237 | Keypress f4
|
|
|
Post by philranger on Jul 5, 2021 18:43:55 GMT
Hello,
Although I know that you can take them directly from the file, I have never done it myself so all I can say is that there seems to be examples on the mini mouse macro "conditions" page.
What I would do is:
- open the text file in a notepad - do a keypress ctrl+ | home to be sure I'm at the beginning of the document - do a shift-down (selects the full line) - ctrl-x cuts it so it is in the clipboard - click, paste, etc. then alt-tab to come back to the notepad
|
|
|
Post by Steve on Jul 6, 2021 8:07:06 GMT
Hi din This would be best handled with a FOR condition ( www.turnssoft.com/conditions.html#for). The example below I loop through the numbers in numbers.txt and paste each line to a notepad document: 1 | FOR | EACH | LINE IN | C:\Users\steph\Dropbox\Macro\File\numbers.txt | DO 2 | 760 | 842 | 350 | Left Click Down 3 | 760 | 842 | 350 | Left Click Release 4 | 190 | 262 | 350 | Keypress %line% 5 | 190 | 262 | 350 | Keypress enter 6 | 206 | 295 | 350 | Keypress f4 7 | 206 | 295 | 350 | Keypress f4 8 | FOR | NEXT
|
|
din
New Member
Posts: 2
|
Post by din on Jul 7, 2021 12:00:15 GMT
OMG this is awesome ! Thanks a million for helping out !!!
|
|