Source language: Translate to:

Embedded files - help !

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Embedded files - help !

Postby dglojnar » Tue Feb 21, 2017 4:16 am

Well , I try to solve problem with embedded files, but, for now, with no success:-(

I have file named Tos2Win - it's a Atari ST emulator in one file, and for running need Atari program , usually with extension PRG or APP.
So, syntax is: Tos2Win.exe designer.app - where designer.app is name of Atari application file.
I made BAT procedure and want to to make an EXE file named Designer.exe - something like binder - include Tos2Win, designer.app and several INF files in one EXE.

But, now I have a problem:-(

When I compile my publication, an error appear: Could not identify application's main window.

I have only one command - RunInRectangle "Rectangle2" "[embedded]designer,bat" "" "" "" ""

Also, I embedded files I needed from Neobook menu.

So, question is - what I'm doing wrong ?
I'm aware that Tos2Win maybe not working with RunInRectangle command, but, I actually start publication like I want, but, after few seconds I receive error - Could not identify application's main window.

Any idea or help are more then welcome !
dglojnar
 
Posts: 112
Joined: Sun Apr 03, 2005 10:52 pm

Re: Embedded files - help !

Postby Gaev » Tue Feb 21, 2017 6:06 am

dglojnar:

1) Please post the content of your designer.bat file here.

2) Try and take things in baby steps e.g. replace the contents of your designer.bat with a simple command (like dir *.*) ... tell us if that works.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Embedded files - help !

Postby dglojnar » Tue Feb 21, 2017 11:12 am

@gaev:

Here's the 2 code's of the batch file:

1. This is original code and works without problems

Code: Select all
@ echo off
tos2win.exe c:\0\designer.app


where C:\0\is a path of a designer.app

2. This is modified code I use on publication:
Code: Select all
@ echo off
[embedded]tos2win.exe [embedded]designer.app


As You see, my idea was, if all files are embedded, then I need to specify each file with [embedded] variable.
I'm not sure if is OK, probably not...
All needed files are embedded from Neobook menu.

About baby steps - whan I worked with original code out of Neobook, everythings working OK, from Neobook I receive error "Could not identify application's main window"
If I change contents of batch code like TREE, DIR etc...there's no problem..

So, IMHO, problem is with file tos2win.exe and Neobook...maybe...

But, I hope that is clear what I want to make - merge all files in one EXE with Neobook, something like file binder...
dglojnar
 
Posts: 112
Joined: Sun Apr 03, 2005 10:52 pm

Re: Embedded files - help !

Postby mishem » Tue Feb 21, 2017 11:52 am

Try this:
Code: Select all
ExtractFile "[embedded]designer.bat" "[TempDir]designer.bat"
RunInRectangle "Rectangle2" "[TempDir]designer.bat" "" "" "" ""


@ echo off
[embedded]tos2win.exe [embedded]designer.app

These, too, must first extract.
mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: Embedded files - help !

Postby Gaev » Tue Feb 21, 2017 12:47 pm

dglojnar:

Do what mishem said.

Explanation: When you run a .bat file, it is interpreted/serviced by DOS ... which has no idea what [embedded] means ... so you have to extract the required files (embedded within your NeoBook .exe file, which only NeoBook knows how) to some temporary folder/file ... and then tell the DOS/bat file where to find the extracted files.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Embedded files - help !

Postby mishem » Tue Feb 21, 2017 2:30 pm

Do what mishem said.

@ echo off
[embedded]tos2win.exe [embedded]designer.app


[embedded] It should be replaced with the path where the files are extracted.

In general it is better to put these files in a folder with the project and use variable [PubDir]
mishem
 
Posts: 574
Joined: Mon Oct 08, 2012 1:51 pm

Re: Embedded files - help !

Postby dglojnar » Tue Feb 21, 2017 3:05 pm

@mishem :D
@gaev :D

You guys rocks :-))

Thank You very much for help and support, now everything works like a charm :D :D :D :D :D
dglojnar
 
Posts: 112
Joined: Sun Apr 03, 2005 10:52 pm


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest