Question Function (converted from VBscript) - Forum

Forum Navigation
You need to log in to create posts and topics.

Question Function (converted from VBscript)

I have the following working function. It reads clipboard contents. But I want it to read the variable [KeyName] which I'm using in my project.

How do I correctly replace "Clip" with my variable?

{NeoBook Function}
Version=5.60
Language=VBScript
Comment=blah blah.
{End}

Dim Message, Clip, SAPI
Set objHTML = CreateObject("htmlfile")
Clip = objHTML.ParentWindow.ClipboardData.GetData("text")
Set SAPI = CreateObject("sapi.spvoice")
SAPI.Speak Clip

 

 

 

@talker

The information you are looking for can be found on this page ... https://winhelp.visualneo.com/FunctionLibrary.html

There is an example near the bottom of this page ...

title = publication.nbGetVar( "[PubTitle]" )
MsgBox title

 

Talker has reacted to this post.
Talker

Thank Gaev! I guess I missed that. Got it to work now:

{NeoBook Function}
Version=5.60
Language=VBScript
Comment=blah blah.
{End}

keypress = publication.nbGetVar( "[KeyName]" )
Set objHTML = CreateObject("htmlfile")
Set SAPI = CreateObject("sapi.spvoice")
SAPI.Speak keypress