Click here to Skip to main content
13,629,044 members
Rate this:
 
Please Sign up or sign in to vote.
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 7-Apr-12 14:22pm
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web03-2016 | 2.8.180712.1 | Last Updated 9 Apr 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100