03 March 2018, 21:15 | #1 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
ClassicWB: How to run a program at startup?
I would imagine that, to make an app run at startup on this version of Workbench, the app's path should be added to "startup-sequence", but I see that LoadWB is the last thing to be run before "endcli" is called, so WHERE and HOW should I put the command? (In this example, to make Directory Opus run from startup)
|
03 March 2018, 23:06 | #2 |
Registered User
Join Date: Apr 2017
Location: Springfield, MO
Posts: 264
|
It’s been a while, but I believe you’re looking for the wbstartup folder. Drag or copy the Dopus icon into get folder and workbench will load it after being invoked.
No need to edit anything. |
03 March 2018, 23:47 | #3 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
I just tried copying the DOpus icon into WBStartup, it says "Insert volume DOpus in any drive" when I reset.
|
03 March 2018, 23:56 | #4 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
If you want to start Dopu4 directly without loading the workbench first, you can do it quietly, the workbench can be started later, see video:
Last edited by AMIGASYSTEM; 07 March 2018 at 10:53. |
04 March 2018, 06:34 | #5 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
|
04 March 2018, 08:06 | #6 | |
Registered User
Join Date: Nov 2004
Location: Germany
Posts: 629
|
Hi.
Here is the Code on how Directoryopus is starting from the startup-sequence: Code:
LoadWB directoryopus wait 5 endcli My directory opus is on DH0: so with the path, it looks like this Code:
dh0:directoryopus Quote:
Code:
assign DOPUS: DH0:dopusdirname Last edited by Dan; 04 March 2018 at 08:21. |
|
04 March 2018, 09:12 | #7 | |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
Quote:
Assign Dopus: SYS:Programs/DirOpus4/ SYS:Programs/DirOpus4/DirectoryOpus ;C:LoadWB ;EndCLI >NIL: |
|
04 March 2018, 09:47 | #8 | |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Quote:
From my experience of Amiga, I knew that "Assign" was the command I needed, but I wasn't sure where or how to word it. Since I heard that the device was case-sensitive, I thought I'd change "Dopus" to what I'd seen myself ("DOpus"), that the trailing forward slash was not needed (as the other scripts indicate) and I was wondering why you turned the last two commands into comments? I just let them be and everything's fine. Thanks all the same, it's much appreciated. |
|
04 March 2018, 11:32 | #9 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
Just for convenience, if only Dopus4 is needed, it is useless to load the Workbench too, on a Real Amiga this way you can save the Ram LoadWB and EndCLI they are not comments, if I need the Workbench instead of writing the commands I use the appropriate button
|
04 March 2018, 11:46 | #10 | |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Quote:
I thought that in a script like startup-sequence, anything on a line preceded by a semicolon was a comment or remark, like the CMD "REM" command? Either way, I know they disable the rest of the line and so are used for comments. Thanks again, anyway. |
|
04 March 2018, 11:50 | #11 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
Yes, the keys were empty, i entered the commands
|
04 March 2018, 12:12 | #12 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
On a side note, what does >NIL: in an Assign command do? Maybe I should add it?
|
04 March 2018, 14:51 | #14 |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,007
|
Hey guys, seriously, don't clutter the startup-sequence with user modifications or 3rd party programs. It's not meant that user should normally touch it at all, there's the user-startup file where you should put all your assigns and launch extra programs which you don't/can't launch from WBStartup.
There isn't a command "NIL", but there's a device called NIL: (just like you have RAM:, DF0:, SER:, etc). Files written to NIL: just disappear and aren't stored anywhere (it's a bit like "trashcan" where you can throw stuff and never see it again). ">" redirects output from a command to a file instead of the standard output (shell). So, for example: Code:
Echo "bla" Code:
Echo "bla" >RAM:test Code:
Echo "bla" >NIL: So, as a conclusion, you use >NIL: to ensure that you won't see any output from a command. Usually you don't need that with the Assign command, or actually it's better to see if some of your assign will fail and you can correct it then. Unless you have some tricks for removable media or something more advanced. |
04 March 2018, 20:52 | #15 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
I wanted to use NIL because the other Assign commands in startup-sequence do, and it seems to work fine on commands like DELETE and EXECUTE as well. Just don't use it on LIST, especially when you're outputting to a text file.
|
04 March 2018, 21:32 | #16 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
@jPV
The NIL (I know it's not a real command, it was a translation error) in some cases it is essential to run applications or executable games. The user-startup it can not always replace the Startup-sequence, there are commands that must be written before or after the Setpatch or before or after Iprefs |
05 March 2018, 06:45 | #17 | |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,007
|
Quote:
If you have to ask where something must be put, just don't put it in the startup-sequence but in the user-startup. And with this assign+dopus case they both should definitely be put in the user-startup. |
|
05 March 2018, 07:31 | #18 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Is right at the end of user-startup OK, jPV?
|
05 March 2018, 08:07 | #19 |
Registered User
Join Date: Feb 2008
Location: RNO
Posts: 1,007
|
Yes, you can pretty much decide the order in user-startup yourself. The safest bet is to put at the end, if the program would rely on something else set in the user-startup earlier.
|
05 March 2018, 09:30 | #20 |
Registered User
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Running Workbench program from CLI (at startup.) | Pheonix | support.Other | 47 | 28 January 2022 05:24 |
ClassicWB v28 - Assign-Startup and 2nd partition issue | Tomarkus | project.ClassicWB | 3 | 16 February 2018 23:25 |
Run AREXX program from PC side? | MickGyver | support.WinUAE | 5 | 15 March 2017 10:05 |
Run skick and a custom startup-sequence | Gaula92 | support.Games | 8 | 24 January 2013 11:56 |
Cant run AnimatED....anyone every used this great program? | mrbob2 | support.Apps | 2 | 20 June 2009 13:13 |
|
|