Page 1 of 1
GetCommandLine() question...
Posted: Mon Mar 29, 2010 9:07 pm
by Tuxedo
Hi!
since I need to know exactly how many commands from shell my program gets, and since GetCommanLine() get both the cmd and ToolTypes (set to ON)...there's a way to know only the CMD passed?
Thank you!
Re: GetCommandLine() question...
Posted: Tue Mar 30, 2010 12:29 pm
by airsoftsoftwair
That's currently not possible, but you can use
GetIconProperties() to get the tooltypes. When you have obtained the tooltypes, you can compare them with the result from
GetCommandLine() to see which arguments have been passed in the tooltypes. Well, of course that doesn't work if an argument is specified in the tooltypes *and* the command line

Re: GetCommandLine() question...
Posted: Tue Mar 30, 2010 1:05 pm
by Tuxedo
I just tought at that but...
Unfotrunately that wasnt possible also if some tooltypes was disabled since it wasnt counted by
GetCommandLine()...
So the statement (ToolTypesNumber-CMD commands) wasnt exact...and wasnt applicable unfortunately...
I think we simply need some sort o env var that state if the program was loaded from wb or cli...was possible?
Re: GetCommandLine() question...
Posted: Wed Mar 31, 2010 12:57 pm
by airsoftsoftwair
Probably not. Hollywood was designed to be as simple as possible so I'd like to avoid that the programmer has to deal with the intricacies of CLI start vs. WB start. That is also why
GetCommandLine() will also return the tooltypes. It's meant to be simple

Re: GetCommandLine() question...
Posted: Wed Mar 31, 2010 8:10 pm
by Tuxedo
Sorry...
Honestly, IMHO, that(returns of tooltypes from GetCMD), was al but simple...
When I start a program from cli I expect that the program works from cli...so was natural to use it in that way...
In the way it works now was ambiguos and not so user friendly for my point of view...now I'll like to read other usres thinkings bout that however...
Another advantage to have a proper cli mode was that hollywood (another time IMHO...) was really a great tool to made cli commands for its simplicity and power, or also a some sort of program that ca be started from cli with some parameter(from another script for example) and works, silently, without a vuideo output...but can be started also from its icon...
The GetIconProperties coommmand was excellent to handle the tooltpyes and GetCMD must be the same for cli commands IMHO...
I dont see the problem if it works in that way...only advantages!
Fisrt of all...CONTROL of my program!
Re: GetCommandLine() question...
Posted: Mon Apr 05, 2010 11:31 am
by airsoftsoftwair
Well, maybe I'll add something that allows you to figure out whether your program was started from CLI or WB. But generally, this is too low level for Hollywood because this is not available on all systems Hollywood supports. Take Windows for an instance, console and Windows programs are two different pairs of shoes. You can't create a program on Windows that is both, a console and a Windows program. Such behaviour is highly Amiga specific.
Re: GetCommandLine() question...
Posted: Mon Apr 05, 2010 2:20 pm
by Tuxedo
Well...
since I'm an Amiga
only progammer thats not a problem for me

So
plz add that simple thing.
EDIT: since I
love hollywood more things I can do with it more I'm happy

Re: GetCommandLine() question...
Posted: Fri Apr 16, 2010 1:23 pm
by airsoftsoftwair
This is supported now.
Re: GetCommandLine() question...
Posted: Fri Apr 16, 2010 1:59 pm
by Tuxedo
WoW!
MANY thanks!