Source language: Translate to:

Create and call a class

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Create and call a class

Postby krackerjaxz » Fri May 16, 2014 6:38 pm

Depending on what.programming language you're coming from this goes by a couple terms: function or class.

I'm wanting to create a function or class that can be used throughout my application. Let's say I create a function that checks if the editbox contains any numbers. Instead of scripting this at every editbox I could create a function. For each editbox I could have it call this function when the text changes.

How can this be done with the scripting language? That is, where would the function code reside and how to call it from any object as described? I'm aware of using the timer object to perform similar. However, I was just curious from a programming standpoint if functions could be created and called.
krackerjaxz
 
Posts: 42
Joined: Sun Nov 24, 2013 8:58 am

Re: Create and call a class

Postby Wrangler » Fri May 16, 2014 10:33 pm

Run help and search for 'functions'. Functions are great and easy to implement.
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: 1506
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: Create and call a class

Postby Neosoft Support » Sun May 18, 2014 2:47 pm

Yes, press F11 in NeoBook to access the function library. Here you can create your own custom functions in either NeoBook's scripting language or VBScript. The functions you create can then be called from other NeoBook scripts using the Call action.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Create and call a class

Postby dpayer » Mon May 19, 2014 1:59 pm

Neosoft Support wrote:Yes, press F11 in NeoBook to access the function library. Here you can create your own custom functions in either NeoBook's scripting language or VBScript. The functions you create can then be called from other NeoBook scripts using the Call action.



Don't forget JScript (javascript) is also available to use.

There are some examples of using functions on the resource center link (at top of this page).

David P.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
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