amiga.org
     
iconAll times are GMT -6. The time now is 03:40 PM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Amiga computer related discussion » Amiga Software Issues and Discussion » Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatically

Amiga Software Issues and Discussion This forum exists for the discussion of the use, issues with, and fun brought about by classic and next generation Amiga software.

Reply
 
Thread Tools Display Modes
Old 01-08-2012, 01:27 PM   #1
nyteschayde
Premium Member
Points: 10,213, Level: 67 Points: 10,213, Level: 67 Points: 10,213, Level: 67
Activity: 15% Activity: 15% Activity: 15%
 
nyteschayde's Avatar
 
Join Date: Mar 2002
Location: San Jose, Ca USA
Posts: 402
Send a message via ICQ to nyteschayde Send a message via AIM to nyteschayde Send a message via MSN to nyteschayde Send a message via Yahoo to nyteschayde
Default Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatically

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.
nyteschayde is offline   Reply With Quote
Old 01-08-2012, 01:43 PM   #2
fryguy
Technoid
Points: 6,585, Level: 53 Points: 6,585, Level: 53 Points: 6,585, Level: 53
Activity: 1% Activity: 1% Activity: 1%
 
Join Date: Nov 2004
Posts: 228
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

im not a programmer but its saved in the .backdrop file saved in root of the partition iirc. So you just need to edit that file.
fryguy is offline   Reply With Quote
Old 01-08-2012, 01:43 PM   #3
Daedalus
Cult Member
Points: 9,252, Level: 64 Points: 9,252, Level: 64 Points: 9,252, Level: 64
Activity: 22% Activity: 22% Activity: 22%
 
Daedalus's Avatar
 
Join Date: Feb 2002
Location: Dublin, Ireland
Posts: 880
Send a message via ICQ to Daedalus Send a message via MSN to Daedalus
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

Quote:
Originally Posted by nyteschayde View Post
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.
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' <insert command here>" from your application.

Quote:
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.
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.
__________________
Engineers do it with precision
--
http://www.robthenerd.com
Daedalus is offline   Reply With Quote
Old 01-08-2012, 01:51 PM   #4
nyteschayde
Premium Member
Points: 10,213, Level: 67 Points: 10,213, Level: 67 Points: 10,213, Level: 67
Activity: 15% Activity: 15% Activity: 15%
 
nyteschayde's Avatar
 
Join Date: Mar 2002
Location: San Jose, Ca USA
Posts: 402
Send a message via ICQ to nyteschayde Send a message via AIM to nyteschayde Send a message via MSN to nyteschayde Send a message via Yahoo to nyteschayde
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

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:
Originally Posted by Daedalus View Post
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' <insert command here>" 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.
nyteschayde is offline   Reply With Quote
Old 01-08-2012, 02:35 PM   #5
Krashan
Technoid
Points: 8,420, Level: 61 Points: 8,420, Level: 61 Points: 8,420, Level: 61
Activity: 1% Activity: 1% Activity: 1%
 
Krashan's Avatar
 
Join Date: Jan 2003
Location: Białystok, Poland
Posts: 203
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

Quote:
Originally Posted by nyteschayde View Post
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.
Icons can be added to Workbench with AddAppIcon() of workbench.library.
__________________
Homepage · MorphOS Files · DigiBooster 3
Krashan is offline   Reply With Quote
Old 01-08-2012, 02:45 PM   #6
Tension
Banned
Points: 11,914, Level: 71 Points: 11,914, Level: 71 Points: 11,914, Level: 71
Activity: 56% Activity: 56% Activity: 56%
 
Tension's Avatar
 
Join Date: Jan 2008
Location: Belfast
Posts: 2,034
Blog Entries: 3
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

Quote:
Originally Posted by nyteschayde View Post
Reset WB didn't do it (what is that good for anyway?!)
Reset WB is a mysterious and powerful function.
Tension is offline   Reply With Quote
Old 01-08-2012, 03:04 PM   #7
matthey
Cult Member
Points: 5,816, Level: 49 Points: 5,816, Level: 49 Points: 5,816, Level: 49
Activity: 13% Activity: 13% Activity: 13%
 
Join Date: Aug 2007
Location: Kansas
Posts: 738
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

Quote:
Originally Posted by nyteschayde View Post
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?!)
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.
matthey is offline   Reply With Quote
Old 01-08-2012, 03:51 PM   #8
nyteschayde
Premium Member
Points: 10,213, Level: 67 Points: 10,213, Level: 67 Points: 10,213, Level: 67
Activity: 15% Activity: 15% Activity: 15%
 
nyteschayde's Avatar
 
Join Date: Mar 2002
Location: San Jose, Ca USA
Posts: 402
Send a message via ICQ to nyteschayde Send a message via AIM to nyteschayde Send a message via MSN to nyteschayde Send a message via Yahoo to nyteschayde
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

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:
Originally Posted by matthey View Post
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.
nyteschayde is offline   Reply With Quote
Old 01-08-2012, 05:15 PM   #9
kolla
Defender of the Faith
Points: 11,318, Level: 70 Points: 11,318, Level: 70 Points: 11,318, Level: 70
Activity: 2% Activity: 2% Activity: 2%
 
kolla's Avatar
 
Join Date: Oct 2002
Location: Trondheim, Norway
Posts: 1,698
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

Quote:
Originally Posted by nyteschayde View Post
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.
Well, you cannot tell Workbench to leave out icons when there is no Workbench around to listen. Sounds to me like you want to edit the :.backdrop files, these will be read by Workbench when it is launched.
__________________
-- kolla
kolla is offline   Reply With Quote
Old 01-08-2012, 05:34 PM   #10
Tension
Banned
Points: 11,914, Level: 71 Points: 11,914, Level: 71 Points: 11,914, Level: 71
Activity: 56% Activity: 56% Activity: 56%
 
Tension's Avatar
 
Join Date: Jan 2008
Location: Belfast
Posts: 2,034
Blog Entries: 3
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

Quote:
Originally Posted by Tension View Post
Reset WB is a mysterious and powerful function.
And it's mystery is exceded only by it's power.
Tension is offline   Reply With Quote
Old 01-08-2012, 08:22 PM   #11
nyteschayde
Premium Member
Points: 10,213, Level: 67 Points: 10,213, Level: 67 Points: 10,213, Level: 67
Activity: 15% Activity: 15% Activity: 15%
 
nyteschayde's Avatar
 
Join Date: Mar 2002
Location: San Jose, Ca USA
Posts: 402
Send a message via ICQ to nyteschayde Send a message via AIM to nyteschayde Send a message via MSN to nyteschayde Send a message via Yahoo to nyteschayde
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

So what you're saying is that what it does is undocumented and has no immediately visible effect. Mysterious and powerful indeed.

Quote:
Originally Posted by Tension View Post
And it's mystery is exceded only by it's power.
nyteschayde is offline   Reply With Quote
Old 01-08-2012, 08:37 PM   #12
matthey
Cult Member
Points: 5,816, Level: 49 Points: 5,816, Level: 49 Points: 5,816, Level: 49
Activity: 13% Activity: 13% Activity: 13%
 
Join Date: Aug 2007
Location: Kansas
Posts: 738
Default Re: Coding: I would like to be able to "Leave Out" or "Put Away" icons programmatical

Quote:
Originally Posted by nyteschayde View Post
So what you're saying is that what it does is undocumented and has no immediately visible effect. Mysterious and powerful indeed.
Nah, it's in my WB guide . ResetWB closes and reopens all Workbench windows. It's even more useful than "Redraw all" 8).
matthey is offline   Reply With Quote
Reply

Bookmarks

Tags
coding , icons , leave out , programmatically , put away

Thread Tools
Display Modes

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