Source language: Translate to:

Dos or Bat

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Dos or Bat

Postby Neobook » Tue Feb 20, 2007 11:20 am

Hello,

Is it possible to modify a comiled Neobook application ? I explain, I have a push button with a lot of ligne, when I have compiled it, is it possible with a Dos or Bat commanf, (I think is Bat) to enter in the application (push button) and modify it, and it saves.

Thanks all people.
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby HPW » Tue Feb 20, 2007 11:52 am

Not the compiled app but its PUB-source.
You can parse for your button-section and modify it.
Then you can use the new commandline compile feature of 5.5.3
and make the customised compiled app.
This is all possible from a BAT.
Last edited by HPW on Tue Feb 20, 2007 11:52 am, edited 1 time in total.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Neosoft Support » Tue Feb 20, 2007 11:52 am

It's not possible to modify a compiled pub exe. However, you can modify external files distributed with your pub. I'm not sure if that's what you're looking for or not.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Neobook » Tue Feb 20, 2007 12:03 pm

OK, thanks
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby Sam Cox » Tue Feb 20, 2007 12:22 pm

Following up on Neosoft Support's advice, you can modify external files AND you can execute code placed in an external file.

Create an external file as, say, C:\path\file.txt, and in this file put the following Neobook code:
Code: Select all
Alertbox "" "EXTERNAL COMMANDS"

Notice that this file is a regular text file.

Now, create a button with this code:
Code: Select all
SetVar "[CommandFile]" "c:\path\file.txt"
FileExists "[CommandFile]" "[Exists]"
If "[Exists]" "=" "True"
  Call "[CommandFile]"
Else
  AlertBox "" "External File Doesn't Exist"
Endif

With the external file and the button's code, you can change the function of the button on-the-fly. With the If-Else-Endif structure in the button's code, you can execute default instructions if the external file does not exist.

-- Sam
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby Neobook » Tue Feb 20, 2007 1:03 pm

Thanks Sam Cox.
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am

Postby Sam Cox » Tue Feb 20, 2007 1:07 pm

You are welcome, Neobook. I should have mentioned that executing code from an external file as described above is a VERY dangerous thing to do because if you can change the code, so can anyone else that finds the file -- your customer, perhaps. If you decide to use this method, please be aware of the danger involved.

EDIT: Corrected grammar.
Last edited by Sam Cox on Tue Feb 20, 2007 1:11 pm, edited 1 time in total.
User avatar
Sam Cox
 
Posts: 768
Joined: Fri Apr 01, 2005 7:30 am
Location: Loveland CO USA

Postby Neobook » Tue Feb 20, 2007 1:10 pm

OK
Neobook
 
Posts: 131
Joined: Sat Jul 01, 2006 7:07 am


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 2 guests