Source language: Translate to:

Neoscript

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Neoscript

Postby HackinHoodLogicsTm » Thu Nov 28, 2013 12:57 am

Is there any way to give an action at the end of a prog. To find words and replace them with different word. :P Any answer will appreciated
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Neoscript

Postby dpayer » Thu Nov 28, 2013 7:00 am

HackinHoodLogicsTm wrote:Is there any way to give an action at the end of a prog. To find words and replace them with different word. :P Any answer will appreciated


You have to be more specific. "at the end of a prog" is not a clear term. Do you mean when the app is shutting down? when the user finishes a certain process? when they have reached the last 'page' of your app? when a script from an object (button) has finished?

There is place to put an action when the app is shutting down. Go to BOOK-->BOOK PROPERTIES-->ACTIONS-->SHUTDOWN.

Run a subroutine from there to replace your words.

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

Re: Neoscript

Postby HackinHoodLogicsTm » Thu Nov 28, 2013 7:28 am

Hi, i mean if a user inputs a number like 2, is there any script to change the 2 into something else upon giving a filewrite action so that when you open the document you save will not see 2 but something else like 5
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana

Re: Neoscript

Postby dpayer » Thu Nov 28, 2013 8:47 am

HackinHoodLogicsTm wrote:Hi, i mean if a user inputs a number like 2, is there any script to change the 2 into something else upon giving a filewrite action so that when you open the document you save will not see 2 but something else like 5



Use a conditional statement to test the variable populated from your input. Create a text entry field (var=[TextEntry1]) and a button with the following code:
Code: Select all
If "[TextEntry1]" "=" "2"
AlertBox "Error" "You answered 5. Incorrect!"
SetVar "[TextEntry1]" "5"
Endif
FileWrite "[pubdir]testfile.txt" "All" "[TextEntry1]"
SetVar "[TextEntry1]" ""


You don't need to constantly check to see the value of the variable, only when you need to act on it (after a selection is made and an action ex: button click, has been initiated).

David P.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Neoscript

Postby HackinHoodLogicsTm » Thu Nov 28, 2013 8:52 am

Thanks for the reply.
I am proud to be a Neobooker!!!
www.neosoftware.com
Special Thanks To
Mr. David Riley
User avatar
HackinHoodLogicsTm
 
Posts: 120
Joined: Wed Aug 28, 2013 7:03 am
Location: Ghana


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest