Welcome, Guest. Please login or register.

Author Topic: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatically  (Read 2291 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline nyteschaydeTopic starter

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 644
    • Show all replies
    • http://www.nyteshade.com
Does anybody know much about the mechanism behind leaving and icon on the workbench and putting one away? I'd like to programmatically do this technique from within an application but I don't know where to look for APIs or information about the mechanism behind this functionality.

Also, is it possible to add an icon that doesn't represent something on the filesystem. It seems like it should be possible given things like Iconify seem to work similarly. Any info on this would also be appreciated.
Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500
 

Offline nyteschaydeTopic starter

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 644
    • Show all replies
    • http://www.nyteshade.com
Thanks. Let me know what you can. It would be nice to do this without having another dependency like ARexx but worse come to worst I can do that. I modified the .backdrop file but changes didn't take effect so I assume there is something I need to do to make the system recognize the changes. Reset WB didn't do it (what is that good for anyway?!)


Quote from: Daedalus;674911
I can't remember 100% off-hand (I'll check when I get home) but I think from 3.5 up you can carry this function out using ARexx commands. Might be the simplest way to do it - issue an "RX ADDRESS 'WORKBENCH' " from your application.



This is called an "App Icon" and it's how YAM puts an icon on the desktop showing the status of your mailbox, PPaint lets you load files by dragging and dropping onto its app icon, and so on. I'm sure there's something in the SDK documents about setting up an app icon. It basically triggers an event which your application then acts upon as you desire.
Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500
 

Offline nyteschaydeTopic starter

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 644
    • Show all replies
    • http://www.nyteshade.com
Wow, that's great info. Perhaps I have been too biased with my slant on doing without dependencies. I'll look into it. The problem is that I am writing some CLI commands for use in very early startup (before Workbench is loaded) but would like to work even after it's come up.

Thanks for all that information. I'll see what I can drum up if my install of CubicIDE ever finishes.

Quote from: matthey;674927
It's possible to send an ARexx command to a program's ARexx port without "using" ARexx. The port is a standard Amiga Port and the message contents are a standard string (including numbers). The program may open ARexx itself to parse the command that is sent though.

Here is a guide with the Workbench Arexx interface (AmigaOS 3.5+)...

http://www.heywheel.com/matthey/Amiga/WBguide.lha

This guide should already be installed if you are using the unofficial AmigaOS 3.9 BoingBag 3 and up. If installed, you can use the help key at any time from Workbench to bring it up. You can also use the help key while in the menu to bring up help for a particular menu item. It's not very thorough with the help but the Workbench ARexx documentation is quite good. It looks like the icons you want to put away or leave out would have to be selected with the "ICON" command (or let the user do it) then the "MENU INVOKE ICONS.LEAVOUT" or "MENU INVOKE ICONS.PUTAWAY" command used to do the work. Using the "WORKBENCH" ARexx host is a lot better and more reliable than hacking it even if you send the command directly to this port without opening ARexx.
Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500
 

Offline nyteschaydeTopic starter

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 644
    • Show all replies
    • http://www.nyteshade.com
So what you're saying is that what it does is undocumented and has no immediately visible effect. Mysterious and powerful indeed.

Quote from: Tension;674945
And it's mystery is exceded only by it's power.
Senior MTS Software Engineer with PayPal
Amigas: A1200T 060/603e PPC • A1200T 060 • A4000D 040 • A3000 (x2) • A2000 Vamp/V2 • A1200 (x4) • A1000 (x3) • A600 Vamp/V1 • A500