Source language: Translate to:

ListBoxGetItemNumber

Post your suggestions for future versions of NeoBook

Moderator: Neosoft Support

Postby Gaev » Sat Oct 27, 2007 9:44 am

Wrangler:
One extra line of code. No bloat.
In case there was a misunderstanding ... I agree with you ... I vote for using one extra script command instead of asking Dave for yet another command (which eventually would contribute to .exe bloat for every .exe by every developer)
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Wrangler » Sat Oct 27, 2007 3:04 pm

Nope. No misunderstanding. Posted it to back up your opinion.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Leos » Mon Oct 29, 2007 6:06 am

what about this?:

........................
SetVar "[file]" "this.is.myfile.just.one.line.code.to.filename.out.ext."
ExtractFileName "[file]" "[fileName]"
.to extract the filename AND extension
StrParse "[fileName]" "." "[filearray]" "[numparsed]"
........................
User avatar
Leos
 
Posts: 178
Joined: Mon Apr 04, 2005 11:13 am
Location: Coimbra, Portugal

Postby Gaev » Mon Oct 29, 2007 6:43 am

Leonel:
what about this?:

........................
SetVar "[file]" "this.is.myfile.just.one.line.code.to.filename.out.ext."
... I would do it like this ...
Code: Select all
ExtractFileExt "[file]" "[FileExt]"
If "[FileExt]" "=" ""
   ExtractFileName "[file]" "[FileNameOnly]"
Else
   ExtractFileName "[file]" "[FilePlusExt]"
   StrLen "[FilePlusExt]" "[FilePlusExtLen]"
   StrLen "[FileExt]" "[FileExtLen]"
   StrDel "[FilePlusExt]" "1+[FilePlusExtLen]-[FileExtLen]" "[FileExtLen]" "[FileNameOnly]"
EndIf
... covers file names like ...

- abc (no extension)
- abc.jpg (regular stuff)
- abc.def.jpg (dots in filename part)
- abc.jpg.jpg (parts of name same as extension)

... of course I would place above code in the NeoBook Function folder and use it like this ...
Code: Select all
Call "gkExtractFileNameOnly" "[file]" "[FileNameOnly]"
... build once, deploy a gazillion times after that.
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby Leos » Mon Oct 29, 2007 8:18 am

Hi, Gaev

nice exercise. However my first intention wasn't to solve it (i apreciate your help), but just to show that a simple command can simplify our life (neobook users).

You know, I agree with you almost in 90% from your's point of view.
How much more commands, more 'lacks' or problems... but i think so that if we have not nothing (any commands), we got Zero problems :D , but we have nothing!

So, I agree that we must have priority in our wish list (who must designate this prioritys, I don't know, maybe 50% to Daves's 50% to neobook users), and this mine wish, obviously is not at the top...

... LOL ... I am not part of the NeoBook team ... just an enthusiastic user of this great application development product.


At this point i can not to agree with you.
You know: all of us, we are the team! (Neobook users and specially neobook forum users; we are not so many, but it is a pleasure to me to participate in this community)...
... but, and i think that in this point I have many others that agree with me, when i ask here for help, i know that i have four entity that are allways ready to help:

- Neosoft support,
- Gaev
- HPW (Hans)
- the users (almost the same)
- Sam Cox (what about him?)

- I'm sorry if i don't do mention no more guys in individual, but there are a lot of them that i aprecitte very mutch.

Wrangler: i appreciate to your intervention.

So... my wish list is just a wish list (the priority i don't know)

and... long life to Neobook! 8)
User avatar
Leos
 
Posts: 178
Joined: Mon Apr 04, 2005 11:13 am
Location: Coimbra, Portugal

Postby Neosoft Support » Mon Oct 29, 2007 11:35 am

Leos:

You can use the existing ChangeFileExt action to remove the extension from a file name. Just leave the "new ext" parameter blank. For example:

ChangeFileExt "[FileName]" "" "[FileName]"

...when you begin to write extr you press one key (for example space key) and you can choose from the existing commands (in this case, ExtractFileName, ExtractFileExt, ExtractFileNameNoExt and you can select one, and the editor complete the rest: ExtractFileName)


Good idea! I will make sure that this is added to "the list". If added it will be an option that can be turned off.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Leos » Tue Oct 30, 2007 9:21 am

Nice tip Neosoft!

Thank you very mutch.
User avatar
Leos
 
Posts: 178
Joined: Mon Apr 04, 2005 11:13 am
Location: Coimbra, Portugal

Previous

Return to NeoBook Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest