Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jan-Erik Lärka

Pages: [1] 2 3 ... 22
1
Programming / Re: [Classic Rexx] Set Long File Name
« on: April 23, 2025, 09:31:16 pm »
Someone may try to experiment with SysMoveObject and tell the rest of us if it is possible to use?

2
Applications / Re: DBExpert
« on: April 23, 2025, 05:54:14 pm »
You're welcome! :)

Hard code the path or use rexx.

In the current folder:
SAY DIRECTORY()||'\myimage.bmp'

parent folder ( note the omitted \ ):
SAY FILESPEC( 'Drive', DIRECTORY() )||FILESPEC( 'Path', DIRECTORY() )||'myimage.bmp'

parents parent folder ( must strip the trailing \ ):
SAY FILESPEC( 'Drive', DIRECTORY() )||FILESPEC( 'Path', STRIP( FILESPEC( 'Path', DIRECTORY() ), 'Trailing', '\' ) )||'myimage.bmp'

another folder relative parents parent folder ( must strip the trailing \ ):
SAY FILESPEC( 'Drive', DIRECTORY() )||FILESPEC( 'Path', STRIP( FILESPEC( 'Path', DIRECTORY() ), 'Trailing', '\' ) )||'otherfolder\myimage.bmp'

3
Programming / Re: [Classic Rexx] Set Long File Name
« on: April 19, 2025, 08:41:12 am »
I you copy files to external drives like I do it is important to set the EA for each file either before you copy each file or first thing.

Just bought my latest one the other day and started to copy files to it.
Files without EA attached to them are destined to get short names, possibly loosing all hope to recover the real name, causing all sorts of annoyances as the visible name and the real name behind doesn't match. Most may not notice, as you haven't given it a thought, but once you look at it closer... grrrr.

This script set .LONGNAME info and use it to rename each file name to the visible one, by adjusting the TITLE or if that doesn't work use the command rename. (comment out the "IF rc = 0 THEN" to allow it to actually rename the file)

Note the important yet subtle information about TITLE (in Rexx Tips & Tricks v3.60 for example).
Is there a way to get rid of the rename command?

4
Programming / Re: [Classic Rexx] Set Long File Name
« on: April 18, 2025, 08:05:35 pm »
Warning!

This script may cause harm to your computer!
DO NOT USE UNLESS FULLY AWARE OF THE DANGER!

The attached script was inspired by setln.cmd, but also extended to handle "more" of the problems we face with our OS when we download files with national characters.

Those brave that may want try it should perhaps trace it line by line to see what it does to begin with.

Feel free to improve!

rename nls.zip to nls.ext
An important part of the script is the function that use unzip32.dll or unzip.exe to unpack the file nls.ext (that is a plain .zip-file)
nls.ext contain information about the characters valid in various languages.

5
Programming / [Classic Rexx] Set Long File Name
« on: April 18, 2025, 07:50:14 pm »
You may have noticed that Seamonkey, Firefox or Thunderbird or another application all of a sudden (after a restart) has lost all or many settings/profiles etc.
This is not limited to those applications, but as they're a central part of what one use, more likely that you've also have seen.
Files downloaded from the internet these days usually have these long names and software ported from other systems create files with long file names, both for settings and other output.
The problem is that the file system sometimes loose the info about the long file name and revert to a short form with the length 8.3

To improve the chanse to recover files, one can set the .LONGNAME EA (Extended Attribute).
Ported software are unaware of the concept of EA, even "native" software doesn't write .LONGNAME EA to files, thus it is very strange to think that every application has to write .LONGNAME EA to files. It would be more appropiate if the IFS driver would handle something as that...

but JRescuer contain a litte script (setln.cmd) that set .LONGNAME of each file, so that one can recover and set the proper file name.

setln.cmd contain a function that call itself repeatedly (recursively) to go through files and set the .LONGNAME EA.
What the script lack, is the ability to set the file name nor output information about the process.

A rewrite would be interesting to explore that address the issue, as and update to the file system (JFS) and deeper understanding and acceptance to add the feature to the ifs driver is far away.

1. Change the recursive calls
2. Show output of what the script do
3. Rename files that has lost the name

6
Would he agree to that someone sign a NDA (Non Disclosure Agreement)
and either let that person remove the code or himself if we'd scramble money to do it?

At a later stage it would be interesting if Gpf Rexx could work with ooRexx 5.x

7
Applications / Re: DBExpert
« on: April 18, 2025, 11:58:38 am »
Also note that the form has to be tied to a database table.
It seem as if it only try to read the file if it also has initialized a record.

8
Applications / Re: DBExpert
« on: April 18, 2025, 10:25:31 am »
Save the form as a report and open the report.
Do you see the picture there?

I suspect that you only see a white background as it is?
And no change if you use =dbeLoadPicture('c:\path\2\picturefile.bmp') either?

9
Applications / Re: DBExpert
« on: April 16, 2025, 07:01:06 pm »
To create a bitmap control that displays a picture from a disk file:  

1.Click the bitmap control tool [tree and house] in the control tool box   

2.Click on the form where you want the top left corner of the bitmap to appear   

3.Set the Source attribute to =LoadPicture(`filename') where filename is the name of the file the picture is in. For example, =LoadPicture( `os2.bmp' )
____
Skip to 3. to adjust existing bitmap control and specify the path to the bitmap.
I think you may need to specify the full path or no path, but try if you can use relative path with "..\" for parent folder, something like ..\..\other\WHOOPI.BMP for parents-parent-folder-containing-folder-other-with-bitmap

10
Programming / Re: [Classic REXX] Network Map
« on: April 01, 2025, 09:18:32 pm »
Hi Jan-Erik
Sorry having added a lof of codes  ::)

Ohh, yes, I soooOOooo crossed (NOT!) that you've improved the script further than one could hope for.

I''m actually very pleased that you've come up with all of these enhancements, but don't tell anyone I wrote that.  ;)

11
Programming / Re: [Classic REXX] Network Map
« on: March 28, 2025, 08:52:27 pm »
Great update of the script Remy!  8)

It now tell me that the vacuum cleaner has gone offline for the night, but it managed to pull out the cable of the laptop today and ensured it went offline as well.

I comment the 2 initial SET line into de macaddr.cmd and use those from config.sys
uncomment bof lines if you would like set these two vars without config.sys update
e.g.  remove /* and */ of both lines and set value to 1 or 0
/* 'SET WOL=1' */   
/* 'SET NET=1' */

Just type
SET WOL=1
SET NET=1
on the command line before you run the script and those will be added to each object it create, thus not require any of them in config.sys

or create a program object "Refresh" pointing to the script, without any parameter, but with
WOL=1
NET=1
in the Environment tab (See each created network object for examples).


How about merging/reuse code for the various calls that resemble each other, and control them with parameters?
Perhaps explore the use of parsing templates:
PARSE VALUE ... WITH pre (fixed_variable1) mid (fixed_variable2) post

The idea was initially to build a network map of the devices found on the home LAN with info about them.
What uses can we explore here?
Shares would be one thing, but ... are there something else that one want and can be created?!

12
Programming / Re: [Classic REXX] Network Map
« on: March 27, 2025, 09:17:15 pm »
Feel free to modify the code and post it here, both for testing purposes and to improve it.

13
Programming / Re: [Classic REXX] Network Map
« on: March 27, 2025, 06:13:36 am »
SAY '>'STG'<'
is there to say it sent that as a Wake on Lan call to that machine.
But since the mac address isn't there it can't create a proper call to wake it up.

14
Programming / Re: [Classic REXX] Network Map
« on: March 26, 2025, 07:04:44 pm »
I would say that that explain the problems.
*** Can't find server name for address 192.168.0.1: Non-existent host/domain
then no script can help until it's configured to reply with something useful.

Hi!

What is the name returned from a nslookup 192.168.0.106 ?
Is it the one under nostname from config.sys ?

Today, my machines address is 192.168.0.104,
Code: [Select]
H:\tmp>nslookup 192.168.0.104
*** Can't find server name for address 192.168.0.1: Non-existent host/domain
*** Default servers are not available

config.sys has,
Code: [Select]
SET HOSTNAME=ARCAOS-44454C4

15
Programming / Re: [Classic REXX] Network Map
« on: March 26, 2025, 07:01:00 pm »
Seen.

I have a specific ARCAOS host_name under config.sys
Into my box and because my PC can be booted OS/2 or Windows using same interface, I have set a name to the corresponding @ip / macaddr
Using nslookup on my PC @ip I could see that my computer_name set into the box differs from the config.sys and after updating config.sys, it works

With WOL=0 and NET=0, it display all local equipments.
When I set WOL=1, I have all equipment but also many
(icoplte    (icoplte    (icoplte    (icoplte    (icoplte    (icoplte ....

Remy, I've only been able to test with English version, is it possible that the parsing has to be adjusted somewhat?

With NET=1, I have the folder created as well all found equipment but none have an icon !
Where are icon found ?
That also mean that I need help to create the artwork for it.  ;)
But see the icons I use here.
I would suggest a change into the rexx which could prevent this kind of no returned result.
Check the interface used and look for its @ip followed by a nslookup on the @ip which will return the hostname and then run into the process like if the
the host_name was found into os2env variables....
That's something to fall back on, as several of you seem to not be able to get "host" to return proper info

Pages: [1] 2 3 ... 22