![]() |
![]() |
#1 |
Registered User
Join Date: Feb 2018
Location: Germany
Posts: 5
|
Icon position clearence by Script/ARexx ?
Hi,
How can I clear the Icon position (e.g. of a drawer icon) by script oder by ARexx (so the same I do by workbench with the "Icons->UnSnapshot" command)? Preferrable by already installed tools/libs in ClassicWB. Why? If I e.g. copy a lot of drawer icons with the same position/different names) this will look ugly (=overlapped) by default. Without the position workbench will do an auto-arrangement. Last edited by logical; 28 October 2018 at 10:09. |
![]() |
![]() |
#2 |
Registered User
Join Date: Oct 2009
Location: Germany
Posts: 3,310
|
RexxMustHave (RMH) library has a seticonattr() function which may work. If you use OS3.9 or OS 3.1.4 you can use the Workbench ARexx port (see ARexx.doc).
Isn't displaying icons faster if they are fixed? In that case it would be better to sort them and then snapshot all. |
![]() |
![]() |
#3 |
Registered User
Join Date: Sep 2014
Location: Poland
Posts: 175
|
I have written such ARexx script for my personal use long time ago, and here it is:
Code:
/* UnSnapshotAllIcons.rexx 1.0 */ PARSE ARG file IF file="" | file="?" THEN DO SAY 'Usage: UnSnap <file>' EXIT 0 END file=STRIP(file,B,'"') IF OPEN('i',file,R) THEN DO CALL SEEK('i',58,B) /* $3A */ CALL WRITECH('i',B2C(10000000000000000000000000000000)) /* -1 */ CALL WRITECH('i',B2C(10000000000000000000000000000000)) CALL CLOSE('i') END ELSE DO SAY "Error! Can't open:" file EXIT 20 END |
![]() |
![]() |
#4 |
-
Join Date: Jul 2003
Location: Helsinki / Finland
Age: 43
Posts: 9,925
|
The amigaos install disks have an unstick tool as well from 2.1 onwards, called IconPos.
You can scriptify it: Code:
list #?.info FILES LFORMAT "IconPos >NIL: *"%p%n*" -1 -1\" >ram:unstick execute ram:unstick |
![]() |
![]() |
#5 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
If you're using Workbench 3.9, 4.x or 3.1.4, Workbench itself has an ARexx port that gives you full control of pretty much all the Workbench functions. Using this, you could simply get the current window, invoke the Select All menu function, invoke the Unsnapshot menu item, and you're done.
|
![]() |
![]() |
#6 | |
Registered User
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,385
|
Quote:
But -1, -1 does not mean unstick, it's just one pixel left and up relative to the window. "NO_ICON_POSITION" is $80000000, as you can see in Ami's code, too. But his comment /* -1 */ is wrong, it's -2GB. I think IconPos has special arguments like FreeX, FreeY, but I didn't try IconPos yet. |
|
![]() |
![]() |
#7 |
Registered User
Join Date: Feb 2018
Location: Germany
Posts: 5
|
Thanks for your answers.
IconPos seems to be what I was searching for, I didn't find it as it wasn't installed by default with MagicWB - I now made the un-snapshot optional. Here now what the ARexx procedure for checking/creating a new directory looks like (is part of the walk-over-all-folders code): Code:
CHECK_DIR: procedure parse arg dir /* create folder if it doesn't exist and make sure drawer icon is present */ if ~exists(dir) then address command 'makedir "'dir'"' if ~exists(dir'.info') then do address command 'copy "ENV:Sys/def_drawer.info" "'dir'.info"' /* un-snapshot drawer icon */ if exists('c:iconpos') then address command 'iconpos "'dir'.info" FREEX FREEY' end return 1 Last edited by logical; 02 November 2018 at 01:15. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem executing DOpus5 Arexx Script ... | beltrixx | support.Apps | 1 | 01 August 2015 22:16 |
Simple NewShell script?.. in Arexx? | Yoji | Coders. General | 5 | 19 May 2015 14:49 |
CD-ROM icon position | fc.studio | support.Apps | 4 | 21 December 2005 22:54 |
wtf? The ram disk icon does not save its position... | keropi | support.Apps | 3 | 29 November 2005 18:10 |
Arexx script (txt => hex) | Uukrul | Coders. General | 10 | 09 September 2001 04:02 |
|
|