GetCommandLine() question...

Anything related to Hollywood Designer goes in here
Post Reply
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

GetCommandLine() question...

Post 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!
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetCommandLine() question...

Post 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 :)
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

Re: GetCommandLine() question...

Post 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?
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetCommandLine() question...

Post 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 :)
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

Re: GetCommandLine() question...

Post 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!
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetCommandLine() question...

Post 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.
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

Re: GetCommandLine() question...

Post by Tuxedo »

Well...
since I'm an Amiga only progammer thats not a problem for me :P
So plz add that simple thing.

EDIT: since I love hollywood more things I can do with it more I'm happy :)
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: GetCommandLine() question...

Post by airsoftsoftwair »

This is supported now.
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

Re: GetCommandLine() question...

Post by Tuxedo »

WoW!
MANY thanks!
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Post Reply