Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Our Till roll is currently displayed in Notepad. Is there a command switch, to make it open at the end of the text file.

Update: 10 April 2012 00:44 GMT and Local Time.

Notepad2 has a Command Line switch /g -1 to make this happen./g for GoTo, -1= as unsigned is EndOfFile. /g 25 will send it to line 25,if it has 25 lines, otherways to the end.
/g -1 sends it to line 0xffffffff, past the Max File Size, and so, to the end of the file.
I understand that ms Notepad has No such command line switch facilities.
Better install Notepad2 then.
regards,
:)
Posted
Updated 9-Apr-12 13:45pm
v3
Comments
Mohibur Rashid 8-Apr-12 23:46pm    
I haven't understood your problem.

What do you want ? opening the notepad ???????
enhzflep 9-Apr-12 1:52am    
When you open a file in Notepad, the cursor is poitioned at [0, first_line]
I believe Bram would like this to be [0, last_line]

Research indicates there not to be such a switch.
Notepad++ does include a switch that will position the cursor at a particular line number, though not one explicitly for positioning at the end of file.
Perhaps (??) the functionality could be achieved by sending lineNumber= -1.

Question 5'ed to counter the univoter.
Bram van Kampen 9-Apr-12 19:48pm    
enhzflep below got it right!

1 solution

Not with "standard" notepad - it doesn't support command line switches.
You could use notepad++ though: "-n" will set the line number

The other option is to start notepad, then use SendKeys to send CTRL-END once it is loaded.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900