Source language: Translate to:

Open exe file

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Open exe file

Postby AMD Online » Thu Oct 06, 2011 3:46 pm

Hi, I am new to the Forum and I am hoping someone can help me.

I am trying to have a button click action which opens an exe file and will be compiled within the program.
I have attempted a few actions myself to try to do this but when I compile and run it says "cannot find the specified file"

I have searched the Forum to read similar threads but I cannot work this out.

The exe file is embedded but again I am not sure what to do.

Any help would be appreciated.

Thanks

Andy
AMD Online
 
Posts: 8
Joined: Sun Sep 25, 2011 10:57 am

Postby Gaev » Thu Oct 06, 2011 4:34 pm

Andy:

Why don't you post the scrips that you are trying to run ... then perhaps people can tell you where you are going wrong.

Also, what do you mean by ...

1) opens an exe file - are you trying to run the .exe file ? ... note that you can not do a FileRead on .exe files

2) will be compiled within the program - can you be specific about the name of the Compiler program and what will be the Source file it will compile ?
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby AMD Online » Thu Oct 06, 2011 4:53 pm

Hi, thanks for coming back to me. Yes, I want the compiled program to run an .exe file at the click of a button
I have fiddled around again and this code seems to work but I am not certain if it will work on a remote PC or just on mine as the exe file is on my PC?

[Run "C:\Users\Andy\Documents\NeoBook 5\Projects\EA\Working Word Form.exe" "" "Normal" "" ""]

Any comments would be helpful as I dont know if I have done it right or not

Andy
Thank You

Andy
AMD Online
 
Posts: 8
Joined: Sun Sep 25, 2011 10:57 am

Postby Gaev » Thu Oct 06, 2011 5:45 pm

Andy:

My first advice would be to not try this kind of activity.

Even if you were to extract/place the .exe file in a folder that is on every user's computer ... you might run into the many different ways their security setup could trip you.

But the general idea is to ...

1) Embed your file into your Pub/Project (Book >>> Embedded Files ...)

2) Use ExtractFile to extract the embedded file into a folder on your user's computer ... best to use [PubDir], [TempDir] etc.

3) Then issue the Run command ... but make sure you place the Exclamation Mark ! before the name of the file ... or the Backward Slashes will trip you up ... NeoBook will try and do Division (Math) on the words.

Note that just because it works on your computer, does not mean it will work on other computers ... you will need to copy your compiled Pub to another computer and try it out ... then pray that it works on most other users' machines.
User avatar
Gaev
 
Posts: 3738
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest