Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
220 user(s) are online (108 user(s) are browsing Forums)

Members: 0
Guests: 220

more...

Support us!

Headlines

 
  Register To Post  

Writing Tool Types in Arexx
Not too shy to talk
Not too shy to talk


See User information
Hi all,

This page:
https://wiki.amigaos.net/wiki/AmigaOS_ ... Parsing#Tool_Type_Parsing

Gives a good example of reading tool types in Arexx, does anyone know of a method to write them? I tried to write my own but have only managed to succeed in corrupting the info file.

I'm aware thers is a library rexxtricks that provides this function, but wherever possible I 'm hoping to avoid external libraries.

Thanks!

Go to top
Re: Writing Tool Types in Arexx
Not too shy to talk
Not too shy to talk


See User information
@daveyw

This example actually is a bad one. It completely ignores the file format and does a textual search in the file contents. It neither considers future format changes nor custom file formats like PNG icons.

With this method you could probably change an existing tooltype if you maintain the length field and alignment. Or even insert a new one behind or in front of an existing one. But you cannot add a new tooltype without knowing of one which already exists.

The only proper way to access icon data is through icon.library. Unfortunately it does not have an ARexx interface, so you won't get around using an external helper. Either a library or a shell command.

Go to top
Re: Writing Tool Types in Arexx
Just popping in
Just popping in


See User information
With python icon module maybe

Go to top
Re: Writing Tool Types in Arexx
Not too shy to talk
Not too shy to talk


See User information
@PetrolQuote:
Petrol wrote:With python icon module maybe


This looks like a really good solution, although I can't figure out how to use puticon()

ChatGPT suggests this should work (I don't know Python):
# Test
import icon
diskobj 
icon.DiskObject("ram:au.log")
diskobj.tooltypes = ["BUFFER=128""VERBOSE=YES"]
icon.PutIcon("ram:au.log")


But I just get an error "AttributeError: 'module' object has no attribute 'PutIcon'"

**Edit.

Nevermind,I got this to work:

# Test
import icon
diskobj 
icon.DiskObject("ram:au.log")
diskobj.tooltypes = ["BUFFER=128""VERBOSE=YES"]
diskobj.PutIcon("ram:au.log")


Edited by daveyw on 2025/7/31 2:03:33
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project