English Amiga Board


Go Back   English Amiga Board > Support > support.Other

 
 
Thread Tools
Old 07 February 2019, 13:45   #1
Steffest
Registered User
 
Join Date: Jan 2017
Location: Antwerp / Belgium
Posts: 189
AmigaDOS: Open file with "default tool" from CLI

AmigaDos question.
Classic OS (3.1)

Is there a way to open a file using it's default tool from CLI?
Basically I want to open an image in dpaintIV when the system boots.
I would imagine that you could execute something like "dpaint pic.iff" but that just opens dpaint.
When I specify dPaint als default tool in the file icon, this works when I click the icon, so clearly dPaint can open a file at startup.
How do I do the same thing from CLI?
Or how does this "default tool" thing in WorkBench work exactly behind the scenes?
Steffest is offline  
Old 07 February 2019, 14:02   #2
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Dpaint load <path>/<filename>
DamienD is offline  
Old 07 February 2019, 14:31   #3
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,369
Yep, you can usually run the program from the CLI with the path of the file you want to open as an argument. Behind the scenes, the default tool setting in icons only applies within Workbench, not in the Shell or anywhere else. It simply tells Workbench to launch the named program with the icon you've opened as an argument.
Daedalus is offline  
Old 07 February 2019, 15:02   #4
Steffest
Registered User
 
Join Date: Jan 2017
Location: Antwerp / Belgium
Posts: 189
Quote:
Originally Posted by DamienD View Post
Dpaint load <path>/<filename>
Ah ... I feel like a noob now :-)
I'm sure I knew that 25 years ago but I had completely forgotten about that.
Thanks Damien!
Steffest is offline  
Old 07 February 2019, 15:17   #5
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
No problem

When stuck trying to work out the syntax / options for a program; always a good idea to use "?":

DamienD is offline  
Old 08 February 2019, 02:14   #6
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,651
WBRun pic.iff

would be another way of doing it.
Minuous is offline  
Old 08 February 2019, 07:18   #7
jPV
Registered User
 
jPV's Avatar
 
Join Date: Feb 2008
Location: RNO
Posts: 1,007
WBRun isn't yet included in 3.1, but is available separately in Aminet.
jPV is offline  
Old 08 February 2019, 08:47   #8
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,651
Oops, didn't notice that he said he was still on OS3.1.
Minuous is offline  
Old 08 February 2019, 09:16   #9
Steffest
Registered User
 
Join Date: Jan 2017
Location: Antwerp / Belgium
Posts: 189
Quote:
Originally Posted by Minuous View Post
WBRun pic.iff

would be another way of doing it.
Excellent Excellent Excellent.
Now I don't even have to know what program is associated with the file from CLI. Very handy for mod files e.g.

Thanks! (apparently it's also provided by BetterWB, so it was there on my system already without me knowing)

S
Steffest 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
"Open with" tool for iconless, non-executable files in workbench 3.1? Yulquen74 support.Apps 6 22 June 2023 15:06
"LIST: Unable to open redirection file" Returncode 10 Foebane support.Apps 25 17 July 2018 17:26
"Unable to open your tool 'Installer' "-Workbench 3.1 Mr B support.Apps 7 31 March 2011 00:14
Unable to open your tool "directory opus' skeediddley support.Apps 3 04 December 2010 03:09
"Unable to open your tool" S. Campbell support.WinUAE 31 12 September 2004 20:39

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 21:44.

Top

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