English Amiga Board


Go Back   English Amiga Board > Support > support.AmigaOS

 
 
Thread Tools
Old 11 April 2022, 19:30   #1
falken
Amiga Lover
 
falken's Avatar
 
Join Date: Feb 2018
Location: Spain
Posts: 197
Remove an icon from desktop with amigashell. Possible?

Does anyone know if it is possible to 'Put Away' a desktop icon that has been previously placed with the 'Leave Out' option from an amigashell command line?

I understand that some action needs to be taken on the .info file, but I don't know if there is an amigashell command that does this.
falken is offline  
Old 12 April 2022, 13:59   #2
Swe_Kryten2x4b
Registered User
 
Join Date: Sep 2017
Location: Uppsala
Posts: 105
Sort of. You need to parse the .backdrop file and remove the line that corresponds to whatever you want to put away again.

A script could certainly accomplish this but I am not aware of something that does it.
Swe_Kryten2x4b is offline  
Old 12 April 2022, 16:21   #3
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,985
If you act directly on the .backdrop file you need to reboot to get it activated.

It's better to use the Workbench ARexx Port. Then you see the result immediately.
Requires OS 3.5 or higher (this includes 3.1.4 onwards).
thomas is offline  
Old 12 April 2022, 17:20   #4
Swe_Kryten2x4b
Registered User
 
Join Date: Sep 2017
Location: Uppsala
Posts: 105
Quote:
Originally Posted by thomas View Post
If you act directly on the .backdrop file you need to reboot to get it activated.

It's better to use the Workbench ARexx Port. Then you see the result immediately.
Requires OS 3.5 or higher (this includes 3.1.4 onwards).
So it does. Require a reboot that is. I could have sworn it didn't, but apparently I remembered wrong.

Arexx is probably a better idea anyway even if it hadn't required a reboot. If nothing else because it saves you from remembering if it should be dh0:.backdrop, dh1:.backdrop and so on.
Swe_Kryten2x4b is offline  
Old 12 April 2022, 17:37   #5
falken
Amiga Lover
 
falken's Avatar
 
Join Date: Feb 2018
Location: Spain
Posts: 197
Quote:
Originally Posted by thomas View Post
If you act directly on the .backdrop file you need to reboot to get it activated.

It's better to use the Workbench ARexx Port. Then you see the result immediately.
Requires OS 3.5 or higher (this includes 3.1.4 onwards).
Is there a script already done? I have no knowledge of Arexx
falken is offline  
Old 12 April 2022, 19:51   #6
Swe_Kryten2x4b
Registered User
 
Join Date: Sep 2017
Location: Uppsala
Posts: 105
Quote:
Originally Posted by falken View Post
Is there a script already done? I have no knowledge of Arexx
I'm no Arexx-expert but this will do the trick.

/*put away */

OPTIONS RESULTS

ADDRESS workbench

IF ARG() ~ = 1 THEN DO
SAY "USAGE: Putaway name-of-icon"
EXIT 5
END

ARG iconname

ACTIVATEWINDOW root

LOCKGUI

ICON WINDOW root NAMES iconname SELECT

GETATTR OBJECT WINDOWS.ACTIVE

ACTIVEWINDOW = RESULT

MENU WINDOW '"' || ACTIVEWINDOW || '"' INVOKE ICONS.PUTAWAY

UNLOCKGUI


With the caveat that I haven't tried it with more than one icon. Save it in rexx: as putaway.rexx or similar, make sure the S flag is set and invoke it
with rexxutaway.rexx file-to-put-away

And the icon should go back to its original place.

In other words, rexxutaway.rexx documents if there's something "left out" named Documents. Come to think of it, I haven't tried what happens if there are two things called Documents left out either.
Swe_Kryten2x4b is offline  
Old 12 April 2022, 19:57   #7
falken
Amiga Lover
 
falken's Avatar
 
Join Date: Feb 2018
Location: Spain
Posts: 197
Quote:
Originally Posted by Swe_Kryten2x4b View Post
I'm no Arexx-expert but this will do the trick.

/*put away */

OPTIONS RESULTS

ADDRESS workbench

IF ARG() ~ = 1 THEN DO
SAY "USAGE: Putaway name-of-icon"
EXIT 5
END

ARG iconname

ACTIVATEWINDOW root

LOCKGUI

ICON WINDOW root NAMES iconname SELECT

GETATTR OBJECT WINDOWS.ACTIVE

ACTIVEWINDOW = RESULT

MENU WINDOW '"' || ACTIVEWINDOW || '"' INVOKE ICONS.PUTAWAY

UNLOCKGUI


With the caveat that I haven't tried it with more than one icon. Save it in rexx: as putaway.rexx or similar, make sure the S flag is set and invoke it
with rexxutaway.rexx file-to-put-away

And the icon should go back to its original place.

In other words, rexxutaway.rexx documents if there's something "left out" named Documents. Come to think of it, I haven't tried what happens if there are two things called Documents left out either.
Cool, I'm going to try it. Thank you very much @Swe_Kryten2x4b
falken 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 can I remove wallpaper from desktop? Lektroid support.Other 10 19 September 2020 00:05
How to create a desktop icon for WB >= 1.3? fstarred support.Apps 23 05 May 2018 00:21
3.9 desktop icon text question Roman78 project.ClassicWB 25 19 October 2016 18:30
ClassicWB Desktop icon danko project.ClassicWB 3 09 May 2016 13:05
Icon util/patch to remove outline on OS 2.x-3.x redblade request.Apps 5 09 December 2013 09:48

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

Top

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