What is the perl command for moving the cursor one space to the left and one space to the right?
Thnx
perl language for moving the cursor
- martin
- Official Nisus Person
- Posts: 5230
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Perl itself cannot change the selection. You'll have to use a Nisus macro language command. Here's how to move the cursor one space to the right:
If you have some Perl code that needs to calculate a more complicated selection location, just use the fact that variable values transfer across embedded Perl blocks:
Code: Select all
$location = Selection Location
$location += 1 # add one to the location
Set Selection Location $location
Code: Select all
$location = Selection Location
Begin Perl
$location = ($location * 2) + 5;
End
Set Selection Location $location
-
- Posts: 11
- Joined: 2007-07-17 08:10:02
thanks, and...
and I suppose that
$location=Selection Location
location -=1
Set Location Location $location
means move cursor one space to the left?
$location=Selection Location
location -=1
Set Location Location $location
means move cursor one space to the left?
-
- Posts: 11
- Joined: 2007-07-17 08:10:02
exactly!
Thanks for this. Experiment is what I shall do!