English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 03 March 2018, 21:15   #1
Foebane
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)
Foebane is offline  
Old 03 March 2018, 23:06   #2
EzdineG
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.
EzdineG is offline  
Old 03 March 2018, 23:47   #3
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by EzdineG View Post
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.
I just tried copying the DOpus icon into WBStartup, it says "Insert volume DOpus in any drive" when I reset.
Foebane is offline  
Old 03 March 2018, 23:56   #4
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
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.
AMIGASYSTEM is offline  
Old 04 March 2018, 06:34   #5
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by AMIGASYSTEM View Post
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:
How did you start DOpus like that? It's not clear in the video how you did that. Some kind of key combination?
Foebane is offline  
Old 04 March 2018, 08:06   #6
Dan
Registered User
 
Dan's Avatar
 
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
You have to be sure that the name is written right, and maybe add the path before it, if your directory opus is in an extra Folder.

My directory opus is on DH0: so with the path, it looks like this

Code:
dh0:directoryopus
After you have successfully started Dopus, then you can remove the wait command from the startup sequence. It is there, only for the debugging purpose, so that you can see if any error message is displayed.

Quote:
I just tried copying the DOpus icon into WBStartup, it says "Insert volume DOpus in any drive" when I reset.
To solve this, if the requester pops out again, you need to assign DOPUS: volume name to the path, in which your Dopus executable is found.

Code:
assign DOPUS: DH0:dopusdirname

Last edited by Dan; 04 March 2018 at 08:21.
Dan is offline  
Old 04 March 2018, 09:12   #7
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
Quote:
Originally Posted by Foebane View Post
How did you start DOpus like that? It's not clear in the video how you did that. Some kind of key combination?
I made a small change in the final part to the Startup-sequence and added LoadWB and EndCLI into Dopus4.


Assign Dopus: SYS:Programs/DirOpus4/
SYS:Programs/DirOpus4/DirectoryOpus

;C:LoadWB
;EndCLI >NIL:
AMIGASYSTEM is offline  
Old 04 March 2018, 09:47   #8
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by AMIGASYSTEM View Post
I made a small change in the final part to the Startup-sequence and added LoadWB and EndCLI into Dopus4.


Assign Dopus: SYS:Programs/DirOpus4/
SYS:Programs/DirOpus4/DirectoryOpus

;C:LoadWB
;EndCLI >NIL:
I made the change just now, with these modifications, and it works fine now, and what's more, WB is ready and waiting once I quit DOpus!

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.
Attached Thumbnails
Click image for larger version

Name:	001.png
Views:	444
Size:	32.7 KB
ID:	57130  
Foebane is offline  
Old 04 March 2018, 11:32   #9
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
Quote:
Originally Posted by Foebane View Post
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.
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
AMIGASYSTEM is offline  
Old 04 March 2018, 11:46   #10
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Quote:
Originally Posted by AMIGASYSTEM View Post
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
Yes, I noticed those two white buttons in your video, but they're blank and grey on mine, and I don't really want to set them up. Besides, I'm on emulation so I can give myself as much memory as I want, so it's no issue, really.

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.
Foebane is offline  
Old 04 March 2018, 11:50   #11
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
Yes, the keys were empty, i entered the commands
AMIGASYSTEM is offline  
Old 04 March 2018, 12:12   #12
Foebane
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?
Foebane is offline  
Old 04 March 2018, 12:29   #13
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
The command NIL for more functions, for example, it does not show error comments, read HERE and HERE
AMIGASYSTEM is offline  
Old 04 March 2018, 14:51   #14
jPV
Registered User
 
jPV's Avatar
 
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"
...will output the text "bla" into the shell.

Code:
Echo "bla" >RAM:test
...doesn't output anything into the shell, but will result a text file called test in RAM: and you'll see the text "bla" inside it.

Code:
Echo "bla" >NIL:
...doesn't output anything into the shell or actually anywhere. The output is just lost forever.

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.
jPV is offline  
Old 04 March 2018, 20:52   #15
Foebane
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.
Foebane is offline  
Old 04 March 2018, 21:32   #16
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
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
AMIGASYSTEM is offline  
Old 05 March 2018, 06:45   #17
jPV
Registered User
 
jPV's Avatar
 
Join Date: Feb 2008
Location: RNO
Posts: 1,007
Quote:
Originally Posted by AMIGASYSTEM View Post
@jPV
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
Yes, the only exceptions are system patches which are needed to run there, but in that case it's clearly stated in the documentation.

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.
jPV is offline  
Old 05 March 2018, 07:31   #18
Foebane
Banned
 
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
Is right at the end of user-startup OK, jPV?
Foebane is offline  
Old 05 March 2018, 08:07   #19
jPV
Registered User
 
jPV's Avatar
 
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.
jPV is offline  
Old 05 March 2018, 09:30   #20
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
Quote:
Originally Posted by Foebane View Post
Is right at the end of user-startup OK, jPV?
Better to put it at the end otherwise it will remain something suspended, you can also create a small script and put it in WBStartup.
AMIGASYSTEM is offline  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:36.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.11962 seconds with 13 queries