Problem to launch a script in WBStartup
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2037 from 2003/4/10
    From: France
    Hello all,

    i have an AmigaDOS script in WBStartup with an icon and script option activated.

    When i double click, the script is executed, when i start MorphOS, nothing append...

    Any idea please ?



    [ Edité par Papiosaur 28.06.2022 - 18:11 ]
  • »28.06.22 - 16:07
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    sailor
    Posts: 357 from 2019/5/9
    From: Central Bohemi...
    Try to set icon type as "Project" and add Default tool "c:iconx". It normally works from Ambient, try if it works also from WBstartup.

    Or, simply add your sript to s:user-startup. It will work for sure, but I know this is not the exact you want.
    AmigaOS3: Amiga 1200
    AmigaOS4: Micro A1-C, AmigaOne XE, Pegasos II, Sam440ep, Sam440ep-flex, AmigaOneX1000
    MorphOS: Efika 5200b, Pegasos I, Pegasos II, Powerbook G4, Mac Mini, iMac G5, Powermac G5 Quad
  • »28.06.22 - 16:29
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2037 from 2003/4/10
    From: France
    Thanks sailor for the tips.

    ok bizarre now it work with the two possibilities...

    i have added a "wait 5" before the wget command to have internet conection activated.

    [EDIT] is it possible to remove output window please ?

    [ Edité par Papiosaur 28.06.2022 - 20:00 ]
  • »28.06.22 - 17:57
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2968 from 2003/3/5
    From: Canada
    There's no guarantee that a 'wait 5' will ensure that networking is up. You should run a script that needs wget from user-network-startup.

    Quote:

    is it possible to remove output window please


    Redirect the output to >NIL: and it should not pop up
  • »28.06.22 - 18:43
    Profile Visit Website
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2021 from 2003/2/24
    From: po-RNO
    I don't know which would be the best way to test it (does Netstack have some ARexx command to tell the state, for example?), but I think a pretty safe way is to check if inetd is running. It's launched as the last thing before user-network-startup is launched.

    So add something like this in your script:
    Code:
    WaitForPort INTERVAL=5 inetd.ipc
    If NOT WARN
    ; Do your stuff here
    EndIf
  • »29.06.22 - 07:38
    Profile Visit Website