LeaveOut & PutAway CLI commands

A forum for general AmigaOS 4.x support questions that are not platform-specific
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 6:47 pm
Contact:

Re: LeaveOut & PutAway CLI commands

Post by JosDuchIt »

@nbache & xenix thanks, "myicon" did it
User avatar
thomasrapp
Posts: 318
Joined: Sun Jun 19, 2011 12:22 am

Re: LeaveOut & PutAway CLI commands

Post by thomasrapp »

To get always correct results, you should enclose words which are not meant as variables in quotes.

Like this:

Code: Select all

address "WORKBENCH"
"WINDOW WINDOWS" path "OPEN"
"MENU WINDOW" path "INVOKE WINDOW.CLEARSELECTION"
say icon
"ICON WINDOW" path "NAMES" icon "SELECT"
"MENU WINDOW ROOT INVOKE ICONS.LEAVEOUT"
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 6:47 pm
Contact:

Re: LeaveOut & PutAway CLI commands

Post by JosDuchIt »

I tested the opposite script
The icon gets selected but is not 'put away"
8.Amiga OS 4:> getenv .name
StKlsDuch.htm
8.Amiga OS 4:> RX rexx:PutawayName.rexx

Code: Select all

/* Put away  an icon on the Workbench with its name .name as env variable
 */

OPTIONS results

id='gtnv'pragma('id')
address command 'rxset' id '`getenv ".name"`'
if rc=5 then exit
myicon=getclip(id)
call setclip(id,'')

ADDRESS workbench
MENU WINDOW ROOT INVOKE WINDOW.CLEARSELECTION
ICON WINDOW ROOT NAMES myicon SELECT
MENU WINDOW ROOT INVOKE ICONS.PUTAWAY
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 1:06 am

Re: LeaveOut & PutAway CLI commands

Post by xenic »

@JosDuchIt
Try this:

Code: Select all

/* Put away  an icon on the Workbench with its name .name as env variable
 */

OPTIONS results

id='gtnv'pragma('id')
address command 'rxset' id '`getenv ".name"`'
if rc=5 then exit
myicon=getclip(id)
call setclip(id,'')

ADDRESS workbench
MENU WINDOW ROOT INVOKE WINDOW.CLEARSELECTION
WINDOW ACTIVATE ROOT
ICON WINDOW ROOT NAMES myicon SELECT
MENU WINDOW ROOT INVOKE ICONS.PUTAWAY
AmigaOne X1000 with 2GB memory - OS4.1 FE
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 6:47 pm
Contact:

Re: LeaveOut & PutAway CLI commands

Post by JosDuchIt »

@xenix, thanks that worked ok
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 6:47 pm
Contact:

Re: LeaveOut & PutAway CLI commands

Post by JosDuchIt »

i am progressing nicely with my "project manager" allowing to leave selections of icons on the WB screen and put them away.
Still got a problem with paths wontaining balnks

WINDOW WINDOWS frpath OPEN
works for frpath without blanks
say
sys:System/Snp/Snoopy
but not for
Amiga OS 4:System/Snp/Snoopy
how can i pass such string (as an env variable) that arexx will understand ?
User avatar
thomasrapp
Posts: 318
Joined: Sun Jun 19, 2011 12:22 am

Re: LeaveOut & PutAway CLI commands

Post by thomasrapp »

You should surroung the path name by quotes and make sure that the quotation marks are sent to Workbench and not stripped away by Rexx:

Code: Select all

WINDOW WINDOWS '"'frpath'"' OPEN
Or even better, as I already mentioned above, put the entire command in quotes:

Code: Select all

'WINDOW WINDOWS "'frpath'" OPEN'
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 6:47 pm
Contact:

Re: LeaveOut & PutAway CLI commands

Post by JosDuchIt »

@Thomas
both examples work OK Thanks
JosDuchIt
Posts: 291
Joined: Sun Jun 26, 2011 6:47 pm
Contact:

Re: LeaveOut & PutAway CLI commands

Post by JosDuchIt »

I did upload to http://users.online.be/AD/LP_Icons_.lha

my simple "project manager" LP_Icons.gc. It should work out of the box - comes with new version 3.8.8 of Gui4Cli interpreter which is also here http://users.online.be/AD/Gui4Cli3.8.8_OS4.lha
with thanks for
the help i got here.
Post Reply