Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'My version...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
My version...
Authored by: petey on Feb 06, '02 07:01:00PM

much more elegant code. using word & paragraph - who woulda thunk it?

it has some trouble on my machine getting some app names - (it appends the -psn_0_ stuff to the ends of some names)



[ Reply to This | # ]
-psn
Authored by: porkchop_d_clown on Feb 06, '02 10:34:51PM

Yeah - basically those are UNIX command line arguments. I'm not sure how to deal with them because there's no easy way to tell where the application name stops and the arguments begin, when the application name is allowed to have spaces in it. I'm pondering it though; we'll see what I can come up with.



[ Reply to This | # ]
-psn
Authored by: petey on Feb 06, '02 11:33:45PM

just filter out " -psn" the same way you filter out ".app"



[ Reply to This | # ]
-psn
Authored by: mcroft on Feb 06, '02 11:58:37PM

yup, I added this just after the filer for .app

-- if the name contains "-psn", truncate the name there.
set ao to offset of " -psn" in a
if (ao is not 0) then set a to (text items 1 through (ao - 1)) of a as string



[ Reply to This | # ]
-psn
Authored by: porkchop_d_clown on Feb 07, '02 05:25:19PM

Well, I want a general version that will kill any command line args. They almost always have a dash in front, and a space, so I think I have a solution.



[ Reply to This | # ]