English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 12 April 2016, 00:04   #1
zardoz
Zone Friend
 
zardoz's Avatar
 
Join Date: Oct 2004
Location: Wales
Age: 53
Posts: 163
Workbench question - what is an icon?

Is this a daft question? Coming from the windows world, I expect an icon to be a shortcut to a file elsewhere on the file system. Is the same true in Workbench?

I want to write a startup script to launch a game - Monkey Island - in the folder there's a huge icon called Monkey Island (or Monkey_Island or similar). I can't just call it from the cli;

It's got a tool type of iconX
There's an editable stack value

There are two Monkey_Island files; calling Monkey_Island I'm told is not executable. The .info file is the bitmap (& more?)

Calling Main starts the game. Is this obvious from the icon properties at all?

Sorry for the newbie questions.
zardoz is offline  
Old 12 April 2016, 01:31   #2
-Acid-
Registered User
 
Join Date: Oct 2012
Location: South Shields
Posts: 812
The icon as well as holding the image information that is displayed on the Workbench screen also holds other data depending on what type of icon it is. The one you describe is a project icon (there are also Tool and Drawer icons), stack and the default tool are definable. In this case iconx is called to load the script called Monkey_Island, tooltypes are also stored in the .info file if there is any.
-Acid- is offline  
Old 12 April 2016, 06:32   #3
ajk
Registered User
 
ajk's Avatar
 
Join Date: May 2010
Location: Helsinki, Finland
Posts: 1,341
The operating system on the Amiga consists of AmigaDOS (command line) and Workbench (graphical user interface). Icons, or .info files, exist for Workbench. If you ran everything from AmigaDOS, icons would be irrelevant. In the Workbench environment they are used to hold the actual picture you see, but also settings (such as the stack, as you noticed) that you might otherwise set manually if starting a program via AmigaDOS.

As -Acid- mentions IconX, or icon execute, is a particular program to connect an icon and a script for use in Workbench. Scripts would normally be called from AmigaDOS since they are not programs, but text files. You can open "Monkey_Island" in a text editor to see what the script contains.

In Windows, there are both shortcuts and icons. If you look at, for example, the executable "firefox.exe", it's going to have that Mozilla fox ball image. This image is baked into the .exe itself, it does not exist as a separate file, as the .info files do on the Amiga.

On the Amiga, files don't have particular imagery included within them, so when you do a "Show All" in Workbench they are represented using various generic images. Except, if you have a "file" and a matching "file.info", then Workbench knows those two belong together. In AmigaDOS you will find that both "file" and "file.info" are listed since icons have no special meaning within that environment, they are both just files.

Shortcuts or .lnk files in Windows are similar to .info files, in that they only contain the image and some information: which executable to call or directory to open.

Last edited by ajk; 12 April 2016 at 06:40.
ajk is offline  
Old 12 April 2016, 12:03   #4
Arnie
R.I.P Smudge 18-08-16
 
Arnie's Avatar
 
Join Date: Aug 2005
Location: Leicester/UK
Age: 66
Posts: 3,968
There are 4 types of icon. Disk, drawer, project & tool. They are referred to as .info
Disk info is for the Floppy, HD, CD etc
Drawer info is for Directories (dirs, tools.info, system.info etc)
Project info is for running a script via IconX.
Tool info is for executable files.

Project info may also have tooltypes specified by the program that the script is executing.

All info files have a stack setting.

The icon used in the .info file can be changed using IconEdit.
Arnie is offline  
Old 12 April 2016, 15:36   #5
zardoz
Zone Friend
 
zardoz's Avatar
 
Join Date: Oct 2004
Location: Wales
Age: 53
Posts: 163
OK... I'm still trying to work out what the OS does when I click on this (project) icon.

What I want to do is launch the game from a startup script, does the icon not tell me how to do this?

I naively tried iconx Monkey_Island 'iconx is used from Workbench only'


Edit ---

Oh I see, if I open the project file in a text editor it show me a script (two commands in this case).

So I could copy and paste these two commands into my own script, or is there a way of executing the script directly?

Last edited by zardoz; 12 April 2016 at 15:55. Reason: Worked it out all on my own :-)
zardoz is offline  
Old 12 April 2016, 16:41   #6
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,307
Yes. There is the command "Execute". To launch a script you just have to type in a shell:
Code:
execute <scriptfile>
With MonkeyIsland you can do it this way. The IconX way is just to lauch a script by double click on a project icon.

Edit:
Have a look into Amiga DOS and Workbench manual. There you can read all the magic.
daxb is offline  
Old 12 April 2016, 17:14   #7
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,348
If the icon has a tooltype of "IconX" (Icon eXecute) it means that it's the equivalent of a Windows .BAT file.
idrougge is offline  
Old 13 April 2016, 02:37   #8
-Acid-
Registered User
 
Join Date: Oct 2012
Location: South Shields
Posts: 812
Quote:
Originally Posted by Arnie View Post
Project info is for running a script via IconX.
Actually the Project icon type is for anything that's none of the others (i completely forgot about the Disk type). Since you can select what the default tool is it can be for example Multiview, More or HippoPlayer or some other program you want the data passed to.
-Acid- 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
Icon Editor in Classic Workbench Peter project.ClassicWB 22 11 July 2014 11:44
Icon problems with KG WHDload package / Workbench 2.1 CU_AMiGA support.Other 9 02 October 2009 02:15
Workbench 3.1 Icon Text blackcornflake support.Apps 1 27 September 2009 15:14
Workbench icon placement coze support.Other 4 11 June 2006 10:47
Workbench 3.9 icon colors Konrad support.Apps 10 11 March 2004 17:23

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:19.

Top

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