Call_IDE - Utility for HMG IDE

Utilities like DBU, Make, IDE written in HMG/ used to create HMG based applications

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Call_IDE - Utility for HMG IDE

Post by Pablo César »

Hello everyone,

I am happy to present my application support for the use of HMG-IDE. :D

Version 1.0

The purpose is to make every file with .hbp extension open as default by the IDE.
This can be done in two ways:

1. Via Windows Explorer, double-click on any .hbp file.

2. Type in the command line: Call_ID <FileName> (can be with or without file extension).

Both will call the IDE that has been configured to open, so if you have multiple HMG installations.
But before going into detail, I would like to start over from the start explaining your work environment.

And I'll start by explaining how to set up and use the tools to make programming performance easier and faster.
Each application taht I use as HMG Toools, has a purpose different from the other but everyone has a certain flexibility in its configuration in order to meet each style of programming. But in this topic, I will basically focus on using IDE.

To begin with I tell you that I have a folder called "HMGTools" in the root of my disk.
This way I concentrate all the applications to support programming in HMG, without having to change anything even installing new versions of HMG.

I already have ViewError.exe that is used to view the line where the error occurs during compilation, opening Notepad++ (or your favorite editor or grid). But this is explained deeply in this topic (viewtopic.php?f=10&t=4110#p38692). But it is here in this folder that we will download and store Call_IDE.exe.

The first time you run Call_IDE.exe, it will detect this automatically by the application and force it to run with administrator rights when the application requires it. So it will show this first message:
 
Screen54.png
Screen54.png (8.37 KiB) Viewed 5454 times
 
Therefore, this application will present several forms of execution and when needs administrator rights, you will have two options:
Allow the application to guide you as being executed, if as a user / administrator or else you must force to be executed from the begining as administrator.

1. You can start running by right-clicking through Windows Explorer and selecting "Run as Administrator".
The application will strictly use to be executed as administrator only when you need to make these changes:

- "Set IDE for HBP extension file as associated program"
- "Make this program executable from everywhere (Prompt and Explorer)"

However, if after setting this application and deciding to change the same storage location that the application is run at another time, the application will detect that it is the first time in this new location and will request the configuration again.

2. Allow the application to request authorization to perform task with administrator rights when it finds it necessary. The rest of the options do not require "elevated rights".

After ensuring the use of administrator privileges (if necessary) when replying to this UAC message:
 
Screen55.png
Screen55.png (26.25 KiB) Viewed 5454 times
 
You need to leave the first checkbox option be selected at least, then files with ".hbp" extension will be associated with this application's call and make the appropriate change in your Windows REGISTER:

You must leave the first option of CheckBox selected, at least. Files with a ".hbp" extension will be associated with the call of this application and will make the appropriate change in your Windows REGISTER:
 
Screen56.png
Screen56.png (14.68 KiB) Viewed 5454 times
 
The second CheckBox option is to make sure that the application wherever it is accesses at the command line.
It is recommended to leave it selected.

You can see that the "Confirm" button will have the Shield icon to denote that it is running with administrator rights.

After confirming with the CheckBoxes selected, you will ensure the use of the application.
And these options will always be available if you want to uninstall the IDE support application.
But before confirming, you should also confirm which is the IDE that you will use to use in the version of HMG installed and other preferences that I will explain below.

Another purpose that Call_IDE has is that it also serves to create new projects and with the style that we prefer. Of course always calling the IDE, but first will check your preferences.
Relying on pre-existing project files or not.
By optionally creating the .FMG (form file) or by creating the .PRG with the screen pattern either through the TEMPLATE file or not. And still in the ANSI/UNICODE standard selected in your preference.

Let's say you want to create a new project on the command line (before you create a new folder for this).
You will type for example:
 
Screen57.png
Screen57.png (12.53 KiB) Viewed 5454 times
 
You do not need to use quotation marks in the parameter unless it contains special characters such as blank space in the file name and folder. Otherwise, containing blank spaces, will be interpreted as multi-parameter arguments.

Once you have called the Call_IDE, there will surely appear an OptionBox like this:
 
Screen58.png
Screen58.png (9.82 KiB) Viewed 5454 times
 
Composed generally by the items:
  • Main.prg
  • <Project Name>.prg
  • And all files in the same folder that have the "MAIN module" in their PRG content.
In this way the user passes to choose which will be the main module as PRG and will create with the name chosen (if the file does not exist).

In the TEMPLATE.prg file that can be accessed using the "Preferences" button, it contains two variables between tags (sign of less than "<" or sign of greater than ">") as follows:

<HbpFile>
<FileMain>

Not always the two tags have the same value and these are important for the creation of the PRG main file.

When you confirm the use of Call_IDE and restart your computer, the .hbp file icons will appear like this:
 
Screen59.png
Screen59.png (45.91 KiB) Viewed 5454 times
 
To change any application settings, simply run without any parameters that will enter the Setup mode.

You can access the "Recent" files on the minimized icon in TaskBar:
 
Screen60.png
Screen60.png (25.21 KiB) Viewed 5454 times
 
I hope you enjoy it, it is very useful and if you can contribute with some idea that can be implemented, welcome.

I make this contribution even though I know I will not win "my precious" as the character Sméagol (Gollum in The HOBBIT film). :lol:
 
<Project pack file was removed cause there is a newest version ahead this topic.>
 
Here's in Spanish:
En-Español.rar
Explicacion en Español
(298.67 KiB) Downloaded 265 times
 
OFF TOPIC message: (Added later. My clarification to those who found this issue bad.)
I'm not here for the rates, but rating a post is a good way for me to know how much I helped.
To give it a "likes" on button when the forum system returns to normal and you think it is warranted, It's to be able to give and receive some kind of feedback on discussion posts.
Last edited by Pablo César on Fri Jan 27, 2017 10:25 pm, edited 17 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Call_IDE - Utility for HMG IDE

Post by serge_girard »

Thanks Pablo, great project! Just downloaded and will try tomorrow,
Serge
There's nothing you can do that can't be done...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Call_IDE - Utility for HMG IDE

Post by Pablo César »

Bedankt Serge ! :D

It's small project but well done and better for the utility proposed.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Call_IDE - Utility for HMG IDE

Post by Rathinagiri »

Thank you for sharing Pablo.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Call_IDE - Utility for HMG IDE

Post by Pablo César »

நீங்கள் வரவேற்கிறேன், நண்பர்

You're welcome Rathinagiri ! :)
Last edited by Pablo César on Fri Jan 27, 2017 12:39 pm, edited 2 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Call_IDE - Utility for HMG IDE

Post by Pablo César »

Version 1.1

ChangeLog:
  • Added ToolTip for CheckBoxes
  • Bug when Enabled Label_1 at start app
  • Added quotation marks at app path in vbs files
  • Add option to delete temporary files
  • Fixed ShellExecuteEx
  • Optimize vbs procedures. Error handling
  • Detect when administrator admin failed due negative UAC response
  • Added it to the source code header: gratefulness, contributions and inquiries message
<Pakage file was removed because there is a newest version more ahead>
 
What happens ?

Are you all that busy ? Or are you just plain shy ?

I've worked hard on this project and NO feedback I received ? :|

Maybe afraid to run the application by the changes it makes in the Windows registry ?
Who does not understand the application, let me know ..
Last edited by Pablo César on Fri Jan 27, 2017 10:23 pm, edited 4 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Call_IDE - Utility for HMG IDE

Post by serge_girard »

No not shy, but out of time! Just quickly checking the forum between compilations.
Hope to have some time later!

Serge
There's nothing you can do that can't be done...
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Call_IDE - Utility for HMG IDE

Post by Pablo César »

Serge wrote:No not shy, but out of time!
Ahhh ok Serge. I was not just referring to you Serge, but to the whole forum.

Let me know about your experience in it.

I use this app frequently  :)  but I did not tested in other Windows versions and in other rights level for UAC or not. :?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Call_IDE - Utility for HMG IDE

Post by Pablo César »

Version 1.2

Fixed a little bug: Do not display wrong message "Please try again but this time ensure that execution be with administrator rights." when Call_IDE only needs to write in INI file (do not need admin rights).
 
<Project pack file was removed cause there is a newest version ahead this topic.>
 
 
Now I want to launch a challenge for all of you: "Create a project in record time".

After creating the project storage location (create new working folder), how long would it take you to create a new project named Demo_1 containing the following files:

Demo_1.hbp
Demo_1.prg
Demo_1.fmg

And compile the project creating executable file and running. How much would you take to the whole ?

My best result it is less than 3 seconds. Three files auto created, IDE opened, PRG file opened and executable created and running...

Please note, that IDE would it create Main.prg instead not with the same name of project. We can also change to create with name of Main.prg and also supress fmg file be created. All depends your configurations at Call_IDE.

Try yourself and let me know your experience. :)
Last edited by Pablo César on Sat Jan 28, 2017 3:06 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Call_IDE - Utility for HMG IDE

Post by serge_girard »

Hi Pablo,

Just did a quick test:

PRG and HBP created but in the folder Call_IDE; this should adjusted to a specific dirve/path/folder.
What is the best place (folder) in order to get working right. Now I have to create a project folder myself, GO TO IT, and run call_ide.
I now have my projects in the HMG folder like SAMPLES, SOURCE, IDE, ... So if the <param> from call_id <param> doesn't exist as a folder please create it too.

Code: Select all

* Main module for test12 project
#include <hmg.ch>
Function Main()
DEFINE WINDOW test12 AT 254, 369 WIDTH 550 HEIGHT 350 TITLE "" ICON NIL MAIN CURSOR NIL
 
END WINDOW
CENTER WINDOW test12
ACTIVATE WINDOW test12
Return Nil
Can this generated code made from a INI file? I need in almost any project the following:

Code: Select all

SET DATE FRENCH
SET CENT ON
SET DEFAULT TO ....
SET PATH TO    ...
SET TOOLTIPBACKCOLOR { 193, 224, 255}
SET TOOLTIPSTYLE BALLOON
SET LANGUAGE TO FRENCH
hb_setcodepage("FRWIN")
etc...

Serge
There's nothing you can do that can't be done...
Post Reply