Page 2 of 2

Re: LeaveOut & PutAway CLI commands

Posted: Fri Dec 20, 2013 7:29 pm
by JosDuchIt
@nbache & xenix thanks, "myicon" did it

Re: LeaveOut & PutAway CLI commands

Posted: Fri Dec 20, 2013 7:47 pm
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"

Re: LeaveOut & PutAway CLI commands

Posted: Fri Dec 20, 2013 8:03 pm
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

Re: LeaveOut & PutAway CLI commands

Posted: Fri Dec 20, 2013 9:23 pm
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

Re: LeaveOut & PutAway CLI commands

Posted: Sat Dec 21, 2013 2:40 pm
by JosDuchIt
@xenix, thanks that worked ok

Re: LeaveOut & PutAway CLI commands

Posted: Thu Jan 02, 2014 5:45 pm
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 ?

Re: LeaveOut & PutAway CLI commands

Posted: Fri Jan 03, 2014 8:17 am
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'

Re: LeaveOut & PutAway CLI commands

Posted: Fri Jan 03, 2014 11:31 am
by JosDuchIt
@Thomas
both examples work OK Thanks

Re: LeaveOut & PutAway CLI commands

Posted: Sat Jan 04, 2014 7:04 pm
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.