Source language: Translate to:

Retrieve all words/phrases

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Retrieve all words/phrases

Postby Alex » Sat Feb 25, 2012 8:56 am

Hi,

I have a Neobook pub with about 300 files in the functions folder, I don't want to open each files and to search all texts words/phrases and to put them in a TEXT.txt file that contains all the software sentences (the sentences are to going to be translated). I think the total is 3000 phrases. Is there a way to make a script that detect words/phrases between " and " and to automatically put them in TEXT.txt and that replace the phrase by a variable like [TEXT1]; [TEXT2]...

For example:
Code: Select all
setvar "[var1]" "Searching..."
setvar "[var1]" "[TEXT1]"

CustomWindow "Information" "" "" "Rectangle1" "DialogBox"
CustomWindow "[TEXT2]" "" "" "Rectangle1" "DialogBox"


so in my pub starting I will put
Code: Select all
FileRead "[PubDir]TEXT.txt" "1" "[TEXT1]"


Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Postby dec » Sat Feb 25, 2012 11:51 am

Hi Alex,

I figure here a task for Regular Expressions and of course lot of work... but the question can be: how many times do you need to achieve this? For example, suposing you forget to prepare the appropiate "variables for translation" in one publication, even if a lot of translations is need, maybe compensate to do it manually in comparison with triying to do an script like you can imagine. So supose how many time I supose for this script... ;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Postby Alex » Sat Feb 25, 2012 12:08 pm

Hi Dec,

Yes thanks for the answer.

I don't know, but I was juts thinking about this and if it is possible to do it.

Thanks


Alex
Alex
 
Posts: 745
Joined: Sat Mar 04, 2006 4:53 am

Re: Retrieve all words/phrases

Postby dpayer » Wed Feb 29, 2012 2:49 pm

Alex wrote:Hi,

I have a Neobook pub with about 300 files in the functions folder, I don't want to open each files and to search all texts words/phrases and to put them in a TEXT.txt file that contains all the software sentences (the sentences are to going to be translated). I think the total is 3000 phrases. Is there a way to make a script that detect words/phrases between " and " and to automatically put them in TEXT.txt and that replace the phrase by a variable like [TEXT1]; [TEXT2]...

Alex


Alex, Microsoft has a free utility called qgrep.exe found in the 2003 server resource kit (free download).

Here is a quick reference someone made for it: http://ss64.com/nt/qgrep.html

You can have it look for phrases in a big file and it will tell you the line number in that file that contains the phrase (you can port the results to a text file). So you don't need to open each file in NB and search, you could use a batch program to search multiple files and then import the results.

I have used it to search massive log files for specific entries and it was very helpful.

In any case, 300 files is a lot of files to look through.


David Payer
User avatar
dpayer
 
Posts: 1384
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron