Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
107 user(s) are online (85 user(s) are browsing Forums)

Members: 0
Guests: 107

more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: Is there shell command to open a workbench window with specified path ?
Not too shy to talk
Not too shy to talk


See User information
@kas1e

Duh, if you put WaitForPort in sequence before LoadWB, it will block execution of the rest of startup, and therefore of LoadWB. It only makes sense to do this if you Run Waitforport. Which is why I said it needs to be in it's own script. If you insist on doing it without a script you will have to try and find a backtick sequence that works.

Go to top
Re: Is there shell command to open a workbench window with specified path ?
Not too shy to talk
Not too shy to talk


See User information
I've tested it now the command you want is

RUN >NIL: <NIL: WBRun path:folder/ `WaitForPort WORKBENCH`

Apparently in OS4 the portname must be case sensitive, not sure when they added that

Note that the ` are ` not '

Go to top
Re: Is there shell command to open a workbench window with specified path ?
Home away from home
Home away from home


See User information
@NinjaCyborg

No, didn't work. When I put your line to the end of user-startup, then on reboot it blocking everything, nothing runs while Waittoport happens, and after 10 seconds it just says "Workbench process not found, do LoadWB first".


Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Is there shell command to open a workbench window with specified path ?
Not too shy to talk
Not too shy to talk


See User information
Then your choice is to do it in a script. You can make it an arexx script if you want, but you still need to call waitforport from inside the arexx script. But at least then you could put it in a single inline command.

Something like

RUN >NIL: <NIL: rx 'address command "WaitForPort WORKBENCH"\naddress WORKBENCH WINDOW OPEN disk:path

should work...

[edit] the \n doesn't do a new line and neither does *N.

There's probably some combination of pchar or mchar that will let you do it all in one line but doing it as a script.

ONe more you can try is + at the end of run:

Run WaitForPort WORKBENCH +
WBRun DISK:path/

so it treats the second line as part of the run command. using NIL: might break that though. try it and see.


Edited by NinjaCyborg on 2021/1/16 22:46:44
Go to top
Re: Is there shell command to open a workbench window with specified path ?
Not too shy to talk
Not too shy to talk


See User information
confirmed that the Run plus solutions works. e.g.

Run >NIL: <NIL: WaitForPort WORKBENCH +
WBRun DISK:path/
next command in usual startup goes here - it won't wait for the port unless you put another + at the end of the line above

the default timeout on waitforport is 10seconds, you can change that though if you add the parameter to the command, if your startup is really slow.

Go to top
Re: Is there shell command to open a workbench window with specified path ?
Just can't stay away
Just can't stay away


See User information
@kas1e

Maybe a simpler and more logical solution would be to create a script with the WBRun (or the rx equivalent if you prefer), give it an icon with Run from Shell, and call it from WBStartup.

After all, WBStartup (as the name hints) is for things you want to run when WB starts up ...

Best regards,

Niels

Go to top
Re: Is there shell command to open a workbench window with specified path ?
Not too shy to talk
Not too shy to talk


See User information
@nbache

He already said he's too fussy to do that. Anyway, the solution I made him works. And looks like all of you need to read 'Denny Atkins Amiga Tips and Secrets'.

Go to top
Re: Is there shell command to open a workbench window with specified path ?
Home away from home
Home away from home


See User information
@NinjaCybor

Quote:

Run >NIL: <NIL: WaitForPort WORKBENCH +
WBRun "Work:"


That one works, but not every time. Sometimes works right after system load, sometimes not. If it powers OFF/power ON (takes 32 seconds for fully loaded WB), then usually the directory shows up right after the system loads. If it a warm reboot (takes 14 seconds), then often it doesn't show up.

Maybe it has something with all other stuff I load on boot as well, dunno. But IMHO enough, as if there start all those "someone needs to read books", it starts to smell not very interesting to discuss it futher.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Is there shell command to open a workbench window with specified path ?
Not too shy to talk
Not too shy to talk


See User information
LOL don't be so damn lazy and ungrateful. Try adjusting the timeout on waitforport

Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project