Source language: Translate to:

action editor - embedding a place holder for code

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

action editor - embedding a place holder for code

Postby Skarabäus » Fri Jul 28, 2006 5:38 am

the situation appears as follows:

    there is a push button,
    the action properties (left click-tab) of the push button contains code (action commands, loops, ...) ,
    this code i wanna use several times for other buttons (different appearences) on other pages in the publication

to avoid all the copy and paste of the code
my idea was creating place holders like it works in neobook with text objects

    set Variable:SetVar "[text_welcome]" "Welcome to Germany"
    text object name: text_welcome
    place holder in text editor of text object: [text_welcome]


this unfortunately does not work so.

i would be very grateful for a proposal for solution.
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern

Postby HPW » Fri Jul 28, 2006 5:56 am

Put your code into a subroutine of funtion and:

GoSub "YourActionCode"

or

Call "YourActionCode"
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Skarabäus » Fri Jul 28, 2006 6:15 am

hpw:
    GoSub "YourActionCode"
    Call "YourActionCode"

works perfect for this!

Many thanks.
Skarabäus
User avatar
Skarabäus
 
Posts: 37
Joined: Mon May 15, 2006 4:31 am
Location: Germany, Ostfildern


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest

cron