Loop and using EOF

Advanced Macro Recorder/Editor.

Moderator: Pulover

MatJack
Posts: 2
Joined: 01 Feb 2022, 15:20
Contact:

Loop and using EOF

01 Feb 2022, 15:37

I made a simple Macro that does what I want to a .txt file, EXCEPT, I want it to STOP when it gets to the End of the File.
I am using the "LOOP UNTIL" and using the "IsAtEOF := File.AtEOF" as the expression.
What am I doing wrong???
User avatar
Pulover
Posts: 612
Joined: 29 Sep 2013, 19:51
Location: Brazil
Contact:

Re: Loop and using EOF

01 Feb 2022, 15:53

Probably because you are using the wrong operator. The := is an assign operator, you should use = to compare. But that's a guess, I'd have to look at your macro to be sure.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
MatJack
Posts: 2
Joined: 01 Feb 2022, 15:20
Contact:

Re: Loop and using EOF

01 Feb 2022, 18:05

I will change that. It is a VERY small macro, how can I get it to you?
It is only 2k; here it is in Text form... (unchanged)

Code: Select all

[PMC Globals]|None||
[PMC Code v5.4.1]|F3||1|Window,2,Fast,0,1,Input,-1,-1,1|1|Macro2
Context=None|
Groups=Start:1
1|WinActivate||1|333|WinActivate||*K:\SQLData\Backups\DB_Backups\_WA-SFM\Received\24M02\NFIRS export for FDID 34M02 Q4-2021.txt - Notepad++ ahk_class Notepad++|||1|
2|[Pause]||1|3031|Sleep|||||3|
3|[LoopStart]|LoopStart|0|0|Loop|IsAtEOF := File.AtEOF||||4|
4|F3|{F3}|1|0|Send|||||6|
5|[Pause]||1|7391|Sleep|||||7|
6|End|{End}|1|0|Send|||||8|
7|[Pause]||1|2828|Sleep|||||9|
8|Left|{Left}|1|0|Send|||||10|
9|[Pause]||1|344|Sleep|||||11|
10|LShift Down|{LShift Down}|1|0|Send|||||12|
11|[Pause]||1|187|Sleep|||||13|
12|Left|{Left}|1|0|Send|||||14|
13|[Pause]||1|219|Sleep|||||15|
14|Left|{Left}|1|0|Send|||||16|
15|[Pause]||1|188|Sleep|||||17|
16|Left|{Left}|1|0|Send|||||18|
17|[Pause]||1|203|Sleep|||||19|
18|Left|{Left}|1|0|Send|||||20|
19|[Pause]||1|218|Sleep|||||21|
20|Left|{Left}|1|0|Send|||||22|
21|[Pause]||1|235|Sleep|||||23|
22|Left|{Left}|1|0|Send|||||24|
23|[Pause]||1|1031|Sleep|||||25|
24|LShift Up|{LShift Up}|1|0|Send|||||26|
25|[Pause]||1|1031|Sleep|||||27|
26|Delete|{Delete}|1|0|Send|||||28|
27|[Pause]||1|1797|Sleep|||||29|
28|[LoopEnd]|LoopEnd|1|0|Loop|||||30|
[Mod edit: [code][/code] tags added.]

Return to “Pulovers Macro Creator”

Who is online

Users browsing this forum: sachalamp and 15 guests