Author Topic: Templates  (Read 9369 times)

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Templates
« on: April 18, 2018, 04:52:15 pm »
I hope this is the right place for this question.

How does one create a template?

I am now moving everything from one of my old computers over to a nice new one I have just built and now I want to create the program objects for the large number of java apps that I use.  What I would like to do is create a template with the Path and File name for java already filled in to save retyping it 50+ times, the other fields can be copied and pasted from a text file.

Another thought

Since I have a text file with all the details, including icon name would it be possible to use something like a rexx script to do everything in one run and if so does anyone have such a script?

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: Templates
« Reply #1 on: April 18, 2018, 05:09:09 pm »
To make a template, first create a Program Object with the features you want, then open the Properties, go to the icon tab and check the checkbox marked "Template."
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

xynixme

  • Guest
Re: Templates
« Reply #2 on: April 19, 2018, 12:47:48 am »
Quote
Another thought

Since I have a text file with all the details, including icon name would it be possible to use something like a rexx script to do everything in one run and if so does anyone have such a script?
Not the first time this thought has popped up. The answer still in yes. Albeit instead of pasting "javalanche.jar" in a *.TXT you can append a "template line"to a *.CMD file. I.e. (pseudo code):

CALL CreateJavaObject 'name','javalanche.jar','C:\JAVAAPPS\Avalanche'

ivan

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +17/-0
    • View Profile
Re: Templates
« Reply #3 on: April 19, 2018, 06:05:51 pm »
Thanks guys.

It looks like a long task which ever way I go and now I have retired I don't have the night shift to do such things  ;)

xynixme

  • Guest
Re: Templates
« Reply #4 on: April 20, 2018, 11:28:05 am »
Quote
It looks like a long task which ever way I go and now I have retired I don't have the night shift to do such things  ;)

An hour a day keeps the doctor away: https://www.os2world.com/wiki/index.php/Book_Review:_Teach_Yourself_REXX_in_21_Days.

You could try to convert your data to DATABASE.TXT-entries, by using REXX.

You could try to use a good data file format as an input file for a REXX installer.

Or you can insert your data in REXX installer(s). My own choice, which often replaces and sometimes improves existing installers as well. At the moment 12 scripts, each smaller than 64 KiB, are saving about a day of RSI per install, and less disk full-errors in case of really old IBM hardware (mainly due to not having to have two back-ups of about thew same package, WarpIN and installed package). Mostly lines with SysCreateObject, albeit you can write an own SysCreateJavaObject function in REXX with all of the default Java settings (e.g. always with an embedded EXENAME=D:\PROGRAMS\JAVA6\JAVAW.EXE).

With your background you may not need 21 days, unless there appears to be a time-consuming lack of talent. After having read such a book you may want to browse through the list of all available built-in Classic REXX functions.

All programs in the book should be available digitally, nowadays. Surely the sample programs in the book are. The Classic REXX learning curve isn't steep, unless you want to write SysCreateJavaObject as a REXX DLL function in C.

Eighter way the answer to the question of the thought is: yes, sure, unless the data file format is rubbish/useless.
« Last Edit: April 20, 2018, 11:29:48 am by André Heldoorn »

xynixme

  • Guest
Re: Templates
« Reply #5 on: March 30, 2019, 03:03:19 pm »
You could try to convert your data to DATABASE.TXT-entries, by using REXX.
What does or did the (Win-OS/2?) setting COMMON_SESSION in DATABASE.TXT set (to ON/1 or OFF/0)?

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: Templates
« Reply #6 on: March 30, 2019, 04:22:46 pm »
Years ago when I was helping Steve Levine and John Small with FM/2, that was one of my requested features.  Unfortunately, they never had time to implement it.  The program has a menu program object to create an Object, a Shadow, and I was hoping a Java object could be added.  Unfortunately, they never go around to it and have got busy doing other endeavers.  People don't realize how powerful this file manager is.  If I remember correctly, it was original designed by Mark Kimes to be used as a replacement for the WPS if one so chose.

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Templates
« Reply #7 on: March 30, 2019, 07:41:51 pm »
Years ago when I was helping Steve Levine and John Small with FM/2, that was one of my requested features.  Unfortunately, they never had time to implement it.  The program has a menu program object to create an Object, a Shadow, and I was hoping a Java object could be added.  Unfortunately, they never go around to it and have got busy doing other endeavers.  People don't realize how powerful this file manager is.  If I remember correctly, it was original designed by Mark Kimes to be used as a replacement for the WPS if one so chose.

I added JAVA object creation to FM2 multiple years ago. It is available in the latest version. If it's not working please let me know as it works here.

David Graser

  • Hero Member
  • *****
  • Posts: 870
  • Karma: +84/-0
    • View Profile
Re: Templates
« Reply #8 on: March 30, 2019, 10:12:56 pm »
Hi Gregg

I cannot find the icon for the program java creation in the toolbars menu.  I am using FM/2 version 3.24.  It could be I just don't recognize the icon.  I will continue to look.

Gregg, can you take a pic and post.  I even enabled toolbar titles and don't see it.

David
« Last Edit: March 30, 2019, 11:54:14 pm by David Graser »

Joop

  • Hero Member
  • *****
  • Posts: 633
  • Karma: +5/-0
    • View Profile
Re: Templates
« Reply #9 on: March 31, 2019, 01:34:53 am »
I use cmd files with a certain standard setup. Because its almost standard only the line with the java program has to be changed. Once you have a cmd file you can drag it to any place you want in the menu structure of OS/2. If you want examples go to my site http://joopn.home.xs4all.nl/os2ecs/ecs6e.htm

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: Templates
« Reply #10 on: March 31, 2019, 07:58:12 pm »
I have been using the same approach Joop has detailed for some time now. Very easy to change the path to the JRE EXE, most other things remain the same...so it's a quick drag'n'drop to build an object which requires a specific JRE version.

Gregg Young

  • Jr. Member
  • **
  • Posts: 72
  • Karma: +0/-0
    • View Profile
Re: Templates
« Reply #11 on: April 01, 2019, 08:38:10 am »
Hi Gregg

I cannot find the icon for the program java creation in the toolbars menu.  I am using FM/2 version 3.24.  It could be I just don't recognize the icon.  I will continue to look.

Gregg, can you take a pic and post.  I even enabled toolbar titles and don't see it.

David

It's not on the tool bar as far as I remember. You can find it on the Create object submenu. I am not near an OS2 box so I can't actually check. Thanks

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Templates
« Reply #12 on: April 01, 2019, 02:52:27 pm »
David, just search for 'java' in the help file.

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: Templates
« Reply #13 on: April 03, 2019, 06:56:59 pm »
Since I have a text file with all the details, including icon name would it be possible to use something like a rexx script to do everything in one run and if so does anyone have such a script?
I do have that script...

Run the script once and it will create a program object in the folder for command prompts ;)
It then also associate itself with .jar-files
Double click on a .jar-file and it will ask you if it should create a program object for you.
The program object contain parameters that you can adjust and/or remove/add.
It use any existing .ico file with the same name as the .jar file as it create the program object.
It work out of the box with both GenealogyJ, JDownloader2.

You can translate the message files to your own language if you like.