Page 1 of 1

Progress bar

PostPosted: Wed Nov 27, 2013 4:02 pm
by HackinHoodLogicsTm
:P Please can any one help me make a progress bar. Thanks in advance.

Re: Progress bar

PostPosted: Wed Nov 27, 2013 10:55 pm
by Neosoft Support

Re: Progress bar

PostPosted: Wed Nov 27, 2013 11:29 pm
by HackinHoodLogicsTm
Thanks. Pls how do i make a script that upon closing it will search for a word and replace them with a diferent word. Thanx in advance

Re: Progress bar

PostPosted: Thu Nov 28, 2013 12:38 pm
by Neosoft Support
Search for a word where? In a file?

Re: Progress bar

PostPosted: Fri Nov 29, 2013 11:51 am
by HackinHoodLogicsTm
Hi, i mean search for a word in a text entry and replace them with a different word.

Re: Progress bar

PostPosted: Fri Nov 29, 2013 1:51 pm
by CN_Iceman
From NeoBook Help...

StrReplace
Purpose: Replace all occurrences of a character or substring within a string.
Category: Strings
Syntax: StrReplace "string" "old chars" "new chars" "variable" "options"
string - The original string.
old chars - The characters to replace.
new chars - The replacement characters.
variable - The name of a variable to store the modified string.

options - Enter "CaseSensitive" here to search using the exact characters entered. Leave this parameter blank to perform a case insensitive search (upper and lower case characters are treated the same).

Example: The following example replaces each occurrence of the word "dog" in the source string with "cat":

StrReplace "My dog is a good dog." "dog" "cat" "[Result]" ""

You can also use this Action to remove a character by leaving the replacement characters parameter empty. For example:

StrReplace "My doggy is a good doggy." "gy" "" "[Result]" ""

Greetings.

Re: Progress bar

PostPosted: Sat Nov 30, 2013 1:56 am
by HackinHoodLogicsTm
Hi. It does not work when i try to replace two more words with the strreplace. Please i am try to make an application that requires to replace 20 words. Please can any help. Thanx:P

Re: Progress bar

PostPosted: Sat Nov 30, 2013 2:10 am
by HPW
Show your code. We can not guess what you are doing.

Re: Progress bar

PostPosted: Sat Nov 30, 2013 5:41 am
by HackinHoodLogicsTm
Hi, thanks guys for your replies, i had to do it in this way.

Code: Select all
Filesavebox "save files" "Text files|*.txt" "[textdir]" "[compile]"
filewrite "[compile].txt" "All" "[text entry]"
fileread "[comile].txt" "All" "[text]"
strreplace "[text]" "deck" "pc" "[text1]"
filewrite "[compile].txt" "All" "[text1]"


and i had to change the variable to store the other word like "[text2]" then it worked as i wanted. Thanx to all contributions