arexx in showgirls
  • Order of the Butterfly
    Order of the Butterfly
    catohagen
    Posts: 297 from 2003/5/20
    trying to write a small arexx script to go trough a list of
    pictures and get the width and heigth of each picture

    /* test */

    options results
    address 'SHOWGIRLS.1'

    ImageWidth
    width=result
    say width

    Loadnext

    etc, but say width only say RESULT

    wtf am i doing wrong ?


    heres the shell output

    MorphOS:system_util/ShowGirls-0.8/Rexx> rx test.rx
    8 *-* Imagewidth;
    +++ Command returned 798
    SHOWGIRLS.1
    RESULT
    RESULT
    MorphOS:system_util/ShowGirls-0.8/Rexx>

    the width is 798 but i want that info in script not shell :)


    [ Edited by catohagen on 2006/4/2 22:59 ]
  • »02.04.06 - 21:54
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    DoctorMorbius_FP
    Posts: 315 from 2004/2/13
    From: Naples - Italy
    Use "width=RC" instead of "width=result".
    Powered by PegasosII-G4, MacMini, PowerMac MDD.
  • »02.04.06 - 22:58
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    catohagen
    Posts: 297 from 2003/5/20
    >Use "width=RC" instead of "width=result".

    ah, that worked thanks.

    seems its just showgirls that have an uncommon way of doing arexx commands.

    Do you know any way to quiet the script too ?

    annoying to get shell output when you dont need it :)
  • »03.04.06 - 14:15
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    DoctorMorbius_FP
    Posts: 315 from 2004/2/13
    From: Naples - Italy
    Put the line

    call open('STDERR','NIL:','write')

    somewhere at the beginning of the ARexx routine. This discards most error output.

    Of course you should enable this command line only after the testing phase of the program is ended... :-)
    Powered by PegasosII-G4, MacMini, PowerMac MDD.
  • »03.04.06 - 15:51
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    catohagen
    Posts: 297 from 2003/5/20
    ah..thanx again :)
  • »03.04.06 - 16:22
    Profile
  • pOS
  • Order of the Butterfly
    Order of the Butterfly
    pOS
    Posts: 217 from 2003/11/14
    From: Bavaria
    Yes, really strange to use RC instead of RESULT for return value...

    My problem now is: I want to find out the Path/Filename of currently shown Picture.

    my code looks like that:
    Code:

    /* $VER: 1.0 */

    options results /* enable return codes */

    options failat 6

    signal on syntax

    address SHOWGIRLS.1
    'ImagePath'
    say result
    say rc
    'ImageName'
    say results
    say rc



    exit

    syntax:

    say "Error in line" sigl ":" errortext(rc)



    when run, result is always unset.
    and RC contains a number width 8 digits in case of ImagePath resp. 4 digits in case of ImageName.

    I however exspected string values instead...
  • »08.11.15 - 01:40
    Profile Visit Website
  • MorphOS Developer
    Krashan
    Posts: 1107 from 2003/6/11
    From: Białystok...
    trying to write a small arexx script to go trough a list of pictures and get the width and heigth of each picture

    RGetSize may be useful for this.
  • »08.11.15 - 05:45
    Profile Visit Website
  • pOS
  • Order of the Butterfly
    Order of the Butterfly
    pOS
    Posts: 217 from 2003/11/14
    From: Bavaria
    I don't need the sizeof the image, I try get the filnemae of the image currently shown by ShowGirls.
  • »08.11.15 - 16:37
    Profile Visit Website