English Amiga Board


Go Back   English Amiga Board > Support > support.Other

 
 
Thread Tools
Old 27 October 2016, 21:45   #1
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
WB 3.1 - Creating an icon that runs a script file

Following on from these 2 posts in the "Reshoot-A modern Shoot´em-Up-Experience for Amiga" thread:

... http://eab.abime.net/showpost.php?p=...&postcount=178
... http://eab.abime.net/showpost.php?p=...&postcount=179

I've successfully created a script file that if I run from "Shell" works perfectly

My issue is that I want to create a new icon and then have it run the script file... Damned if I can work out how to achieve this

This has always confused me and I've tried numerious things without success.

Any help would be much appreciated
DamienD is offline  
Old 27 October 2016, 22:13   #2
Devlin
Bane of Magic
 
Devlin's Avatar
 
Join Date: Nov 2005
Location: Bradford, UK
Age: 38
Posts: 335
make a project icon that runs c:iconx for your script. that's how the oldskool coverdisks typically did it
Devlin is offline  
Old 27 October 2016, 22:22   #3
zipper
Registered User
 
Join Date: Mar 2004
Location: finland
Posts: 1,841
That's what I did to launch games that needed scripts.
zipper is offline  
Old 27 October 2016, 22:46   #4
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by Devlin View Post
make a project icon that runs c:iconx for your script. that's how the oldskool coverdisks typically did it
Cool thanks

...but I can't even work out how to create a new icon in WB 3.1; let alone set it as a project one. Nothing under the "Icons" menu for new...

Can you possibly give me the required steps as I'm really not sure how to achieve this?

Sorry for being a WB noob
DamienD is offline  
Old 27 October 2016, 23:16   #5
zipper
Registered User
 
Join Date: Mar 2004
Location: finland
Posts: 1,841
IconEdit does it (Tools drawer) - but mostly I just copied and renamed a suitable one (=lazy).
zipper is offline  
Old 27 October 2016, 23:16   #6
-Acid-
Registered User
 
Join Date: Oct 2012
Location: South Shields
Posts: 812
If you use Dopus get to your script file in a lister and click AddIcon (sometimes it's the right mouse button function of IconInfo). The you need to change the default tool to c:iconx - you can double click the new icon in dopus to change it or use the information command from the icon menu in workbench after you click it once.
-Acid- is offline  
Old 27 October 2016, 23:20   #7
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Quote:
Originally Posted by zipper View Post
IconEdit does it (Tools drawer)
Cheers; will try that

Quote:
Originally Posted by zipper View Post
but mostly I just copied and renamed a suitable one (=lazy).
Tried that already, right-clicked on copied icon, selected "Information", changed and pointed the "Default Tool" to the file / path of my script file, double-clicked afterwards but no joy:

DamienD is offline  
Old 28 October 2016, 00:08   #8
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
...don't worry; sorted now by hacking around

Would still be nice to know the step-by-step process in order to:

a) create a new icon.
b) point this to a script file.
DamienD is offline  
Old 28 October 2016, 00:17   #9
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,195
I never create the icon-script. I always take an existing one, edit it with the new commands and then I use CopyIcon by Stephan Rupprecht (included in PeterK's Icon library in Aminet, "Third party") to change its image.

Last edited by Retrofan; 28 October 2016 at 00:24.
Retrofan is offline  
Old 28 October 2016, 15:02   #10
daxb
Registered User
 
Join Date: Oct 2009
Location: Germany
Posts: 3,305
Creating a script (text file) and assign an icon is really easy. If you look in Amiga DOS manual at index for Icon and IconX you get the info you need. Generally you just open your faviorite editor, enter your script and save it. Some editor will/can add an icon while saving. If not: Add an project icon to the script file by copy one, use icon editor or just DOpus (or other filemanager) and add "IconX" as default tool. Thats all. A step-by-step process describes only one way of doing it. That might be not the best or what you like to use. You can also create a template "icon + script" and use it as submittal. I think learn by yourselves is the better way in this case because it incluses only elementary knowledge. A search should lead you to a step-by-step manual. Don`t get me wrong. I myself did it (description + screen shots) in the past but in german only.
daxb is offline  
Old 28 October 2016, 15:19   #11
Retrofan
Ruler of the Universe
 
Retrofan's Avatar
 
Join Date: Mar 2010
Location: Lanzarote/Spain
Posts: 6,195
To create a new icon there are three ways that I use:

- Using "Icon Maker" by James icluded in AKReal that uses Image Converter by Thilo Koehler (needs FPU). You only need the image you want to use and it gives you several options.

- Using "Join" included in AKReal. You type in a Cli "Join", it will open and then you select two images, the first for normal and the other for the selected and then you save as name whatever.info and you get dual png icons. This is how for example the Ken's icons are made.

- Using "Icon Edit" included in AKReal. You can select the images for the new icon as normal or selected or also add glow. You can also modify the images pixel by pixel.
Retrofan is offline  
Old 28 October 2016, 15:39   #12
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Cheers guys; I'll play around

Quote:
Originally Posted by daxb View Post
I think learn by yourselves is the better way in this case because it incluses only elementary knowledge.
Trust me; I've taught myself a lot of new stuff Amiga-wise over the past year and assisted others in the process also.

See this thread: WHDLoad Games Converted to HDF
DamienD is offline  
Old 28 October 2016, 17:04   #13
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
Use IconEdit. You can't change the icontype using tooltypes.

Open the window your script is at, make sure you do "Window -> Show -> All Files" so you can see it.

Open Iconedit (sys:Tools/IconEdit) then drag your script "icon" to its window.
On the "Type" menu select "Project"
THen "Project -> Save" will create its new icon and it will be of the right type.

Now when you enter that icon's INformation, you can set the default tool to be c:IconX and it should work.
Amiga1992 is offline  
Old 28 October 2016, 19:04   #14
jPV
Registered User
 
jPV's Avatar
 
Join Date: Feb 2008
Location: RNO
Posts: 1,007
Sorry this isn't no help, but I just love how DOpus (Mag2) does it I can't even remember how difficult it can be in plain WB

BTW. one other option is to add S (script) protection bit for your script (protect yourscriptfile +s), and then you can at least launch it from WB if you view all files instead of icons.

But of course it would be cleaner to have a proper .info file for it. Basically it should work as long as you have similarly named .info file to your script, which would be a project icon with iconx default tool, as others have already instructed.
Attached Thumbnails
Click image for larger version

Name:	dopusmagellan2-iconinfo.png
Views:	254
Size:	75.9 KB
ID:	50654  
jPV is offline  
Old 28 October 2016, 19:21   #15
jPV
Registered User
 
jPV's Avatar
 
Join Date: Feb 2008
Location: RNO
Posts: 1,007
One example, if you have your script in ram:myscript

In the shell:
copy devs:dosdrivers/pipe.info ram:myscript.info

Then open icon information window for it and change the default tool from C:Mount to C:IconX and delete the ACTIVATE=0 tooltype. Now it should work when doubleclicked.
jPV is offline  
Old 28 October 2016, 19:25   #16
DamienD
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
Cheers all, I'll have a tinker over the weekend
DamienD is offline  
Old 28 October 2016, 19:30   #17
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
Quote:
Originally Posted by jPV View Post
One example, if you have your script in ram:myscript

In the shell:
copy devs:dosdrivers/pipe.info ram:myscript.info

Then open icon information window for it and change the default tool from C:Mount to C:IconX
This advice ignores, as advice before, that it is important to have the right type of icon assigned to a file. In this case, the mountlist PIPE: is indeed a Project type icon, but not all icons are Project type. If you are copying around, make sure you copy an icon of the right type.

Or use IconEdit to change type, as I explained above.

Why did Commodore make it this way? I guess they were just being... Commodore
Amiga1992 is offline  
Old 04 November 2016, 02:06   #18
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,254
Quote:
Originally Posted by DamienD View Post
Cheers all, I'll have a tinker over the weekend
Is there an easier way to make an executable script. In practice, if a script to assign the attribute S (protection bits) This script will be considered by system an executable, and it can run as if it were a real executable. If my translation is not comprehensible look at my video exhaustive. Add my two other videos on the management of Icons AMiGA

Script transform into executable
[ Show youtube player ]



Management Icons AMiGA

[ Show youtube player ]

[ Show youtube player ]

Last edited by AMIGASYSTEM; 04 November 2016 at 09:26.
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
How to make an Workbench Icon running a CLI Script ? Marskilla support.Other 9 26 April 2016 23:11
Execute script works but not after adding an icon with IconX as Default Tool. e5frog support.Other 19 27 July 2010 10:23
Help in creating a script to launch an executable... keropi support.Apps 11 05 May 2007 21:47
AmigaDos script file help. T_hairy_bootson support.Apps 0 07 March 2006 10:15
Can't open install script's icon THX1138 support.Apps 14 01 July 2005 22:42

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 16:06.

Top

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