#2 PerlScript Error

open
nobody
None
7
2002-11-08
2002-11-08
Mathias MICHEL
No

As soon as i attempt to modify the text of the active document, I get an
error. However, displaying a simple messagebox or getting info
from Objects is ok with PerlScript.

I join my script (revert /
and \ to their opposite) and the snapshot of the
errormessage.

Syn 2.0.0.23 on WinXP &
perl5.6.1
If you get to modify the text of a document with
perlscript, please show me how!!!

Mathias

Discussion

  • Mathias MICHEL
    Mathias MICHEL
    2002-11-08

    the script

     
    Attachments
  • Mathias MICHEL
    Mathias MICHEL
    2002-11-08

     
    Attachments
  • Mathias MICHEL
    Mathias MICHEL
    2002-11-08

    • priority: 5 --> 7
     
  • Ascher Stefan
    Ascher Stefan
    2002-11-08

    Logged In: YES
    user_id=163640

    When I do something like this:

    my $lin = $Self->ActiveDocument->Lines;
    $lin->Text =~ tr"/\\"\\/" ;

    I get "Can't modify non-Ivalue subroutine call at...". Seems
    Perl handles Properties in a different way.

    The same with this:

    $Self->ActiveDocument->CurLine =~ tr"/\\"\\/" ;

    I'll do some research, but I know close to nothing about Perl.