Recent Posts

Pages: 1 ... 8 9 [10]
91
Files / Re: Run external program with parameters
« Last post by Malkom on September 14, 2020, 11:47:53 AM »
Hello,

Unfortunately the HN command to launch a program/file cannot send parameters to the target.

However, a work-around is to create a simple batch file with HN and then use this to launch the target with necessary parameters.

Attached is a very basic project that converts a video using FFmpeg on Windows X64 - the download link is at the bottom of this post.

The project just has one button and one field.
The location of FFmpeg is hardcoded in the script, and the final video is called Video1.mkv
The video to be converted is selected via a dialog box.

Note, the video source path has " (quotation marks) appended around it,  in case the full path contains spaces.
I didn't do this for the converted file path as it is just saved to the project directory.


Most of the code just displays information into field 1 as to aid debugging.

Also, FolderItemLaunch(fvar,1) executes the FFmpeg in the foreground to aid debugging.
Just use - FolderItemLaunch(fvar,0) to launch it in the background.

Code: [Select]
Local fname,fvar,fdetails,ftypes,fpaths,fnames,fextens
Local fhandle
 
Local sourcePath

Clear field 1

@ --- Get file ---
Put '--- Get file ---' after field 1
FileAskFilter(fname,'',fhandle,fdetails,ftypes,fpaths,fnames,fextens)
Put fname after field 1
Put line 9 of fdetails into sourcePath
Put sourcePath after field 1


@ --- Create batch file ---
Local batchname
Put ' ' after field 1
Put '--- Create batch file ---' after field 1

Put MyDirectoryFN into batchname
Append FolderSeparatorFN onto batchname
Append 'mybatch.bat' onto batchname
Put batchname after field 1
OpenTWriteAbs(batchname,fvar)


@ --- Build batch file ---
Local commandLine
Put ' ' after field 1
Put '--- Build batch file ---' after field 1
WriteTLine(fvar, 'ECHO OFF')
Put 'C:\ffmpeg-win64\bin\ffmpeg.exe -i ' into commandLine
Append '"' onto commandLine
Append sourcePath onto commandLine
Append '"' onto commandLine
Append ' -c copy ' onto commandLine
Append 'Video1.mkv ' onto commandLine
Put commandLine after field 1
WriteTLine(fvar,commandLine)
WriteTLine(fvar, 'PAUSE')
CloseTWrite(fvar)


@ --- Run batch file ---
Put ' ' after field 1
Put '--- Run batch file ---' after field 1
FolderItemGetAbs(batchname,fvar,fdetails,ftypes,fpaths,fnames,fextens)
FolderItemLaunch(fvar,1)
Put 'DONE' after field 1


 
92
Files / Run external program with parameters
« Last post by LinesOfCodes on September 13, 2020, 08:01:31 AM »
Now, I'm doing a program that will convert the video file using FFmpeg.
But I want to know, What script I have to write to run FFmpeg with parameters because FFmpeg is a program that requires parameters to work properly.
And I also want to know, How can I make a file dialog to pop-up then get a path of the file that has been selected and then set the value of the input field to that path.
93
Development Progress / August 2020
« Last post by Malkom on August 31, 2020, 10:08:13 PM »
Here is a brief progress report on HN5 development for the month of August 2020.

The aim is to get the Chart demo project running inside HN5 Creator IDE.

The development is being carried out on a Windows 7 x64 machine with regular testing of HN5 on Linux(Lubuntu).

The development language is Free Pascal which should ensure HN5 will be able to run on a variety of Operating Systems, both newer and older versions. The main targets being Windows, OS X and Linux.


EDITOR

Editor window - Cards, MainCode, Specials, Menus.

Controls List.

Error linking.


CREATOR PROPERTIES/TOOLBAR

Controls.

Controls' images.

Some properties.




 

94
Development Progress / July 2020
« Last post by Malkom on July 31, 2020, 05:49:51 AM »
Here is a brief progress report on HN5 development for the month of July 2020.

The aim is to get the Chart demo project running inside HN5 Creator IDE.

The development is being carried out on a Windows 7 x64 machine with regular testing of HN5 on Linux(Lubuntu).

The development language is Free Pascal which should ensure HN5 will be able to run on a variety of Operating Systems, both newer and older versions. The main targets being Windows, OS X and Linux.


EDITOR
Script editor and its links with compiler and debugger.


DEBUGGER
Compiler error processing system.


COMPILER
Filled in more compiler functionality.

95
Development Progress / June 2020
« Last post by Malkom on June 30, 2020, 02:40:07 PM »
Here is a brief progress report on HN5 development for the month of June 2020.

The aim is to get the Chart demo project running inside HN5 Creator IDE.

The development is being carried out on a Windows 7 x64 machine with regular testing of HN5 on Linux(Lubuntu).


COMPILER
 Filled in more compiler functionality.


RUNTIME ENGINE
 Filled in more code to support relevant keywords.
96
Development Progress / May 2020
« Last post by Malkom on May 31, 2020, 12:28:07 PM »
Here is a brief progress report on HN5 development for the month of May 2020.

 
LOAD PROJECT
 Parsing of an HN v2,3,4 Chart project file now works.

 The Chart project has several different controls: buttons, fields, canvases etc:-
  - creation of objects.
  - loading code.
  - code tables.
  - Note, UTF8 import is not working correctly.


Project Converter

Built a primitive app that converts  HN v2,3,4 project to HN5 format.


97
Development Progress / April 2020
« Last post by Malkom on April 30, 2020, 10:10:03 AM »
Here is a brief progress report on HN5 development for the month of April 2020.

 
LOAD PROJECT
 Parsing of an HN v2,3,4 project file is over 95% done-
  - creation of nearly all objects.
  - loading code.
  - code tables.
  - still needs some data decompression.


RUNTIME ENGINE
 Filled in more functions relevant to Project Loading.


CARD CREATOR WINDOW
 Creation of some controls for Project Loading.


COMPILER
 Filled in more pass 3 compiler functionality.


PLATFORMS
 HN5 will run on multiple platforms:- Windows, OS X, Linux Ubuntu etc, Raspberry Pi.
 HN5 will not create cross platform binaries as earlier version of HN(v1 to 4) did.
 Instead, HN5 Creator will build a universal stack that will be runnable on any platform having a HN5 Player.
 To users of the stack it will seamlessly appear to be an app, just like Java apps appear to be.

98
Development Progress / March 2020
« Last post by Malkom on March 31, 2020, 02:31:34 PM »
Here is a brief progress report on HN5 development for the month of March 2020.

 
LOAD PROJECT
 Parsing of a project file still ongoing.


COMPILER
 Filled in more pass 3 compiler functionality.


RUNTIME ENGINE
 Filled in more code to support relevant keywords.


PLATFORMS
 Current HN5 build Works on these platforms:-

* Windows 10 and 7(x64)

* OS X Leopard G4 (carbon)

* Lubuntu(x64)

* Raspberry Pi 4 Model B(Raspbian)

Note: OS X Catalina
Having problems with Xcode Command Line files.

99
Development Progress / February 2020
« Last post by Malkom on February 29, 2020, 04:51:53 PM »
Here is a brief progress report on HN5 development for the month of February 2020.

COMPILER
 Filled in more pass 3 compiler functionality.
 
THREADING
 for Compilation, Building and Runtime phases.
 
GUI
 Menu System form - Go: Compile option.
 Compiler status form and its progress bar.
 
UTILITIES
 Improved string handling functions.
100
General / Re: HyperNext Creator 4 save error
« Last post by Malkom on February 21, 2020, 12:39:10 PM »
I'm sorry you are having this Save As problem but I am to with HyperNext V4.01 on Windows 7 - it gives exactly the same error messages.

I've just set up the orginal HyperNext source code in REALbasic and used the debugger to see if there is a problem but Save As works perfectly. It saves the current project with the correct name and reloading it also works.

Unfortunately there is not much I can suggest except manually copying your HyperNext project folder to another folder and then renaming it:

(1) For example with a project called Test that needs to become Test 2.

(2) Copy the folder Test to a new folder Test 2.

(3) Inside folder Test 2, rename the project file from Test to Test 2.

(4) Double-click project file Test 2  to open the project in HyperNext Creator.

Pages: 1 ... 8 9 [10]
anything