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.
31
Nomads / How to exit a panel with an <Enter> key
« on: January 29, 2020, 01:39:09 AM »
hi Folks,
A really, really dumb question.....
I have a really simple panel. All it does is display an image in the Pre-Display logic
All I want to do is have the panel close when I press the <ENTER> key.
Currently it only closes on <F4>
Normally I'd have an Exit or Close button or <F4> to close the panel.
Never wanted to do this before.
00110 PREDISPLAY_ICNQ_PICTURE:
00120 LET S$=ARG_1$
00130 LET IC_PHOTO=HFN
00140 LET STK_PHOTO$=%PATH_DATA$+"ic_images/"+CVS(S$(1,25),3)+".png"
00150 OPEN (IC_PHOTO,ERR=*NEXT)STK_PHOTO$; GOTO 0170
00160 LET STK_PHOTO$=%PATH_DATA$+"ic_images/noimage.png"
00170 CLOSE (IC_PHOTO)
00180 RETURN
Thanks
A really, really dumb question.....
I have a really simple panel. All it does is display an image in the Pre-Display logic
All I want to do is have the panel close when I press the <ENTER> key.
Currently it only closes on <F4>
Normally I'd have an Exit or Close button or <F4> to close the panel.
Never wanted to do this before.
00110 PREDISPLAY_ICNQ_PICTURE:
00120 LET S$=ARG_1$
00130 LET IC_PHOTO=HFN
00140 LET STK_PHOTO$=%PATH_DATA$+"ic_images/"+CVS(S$(1,25),3)+".png"
00150 OPEN (IC_PHOTO,ERR=*NEXT)STK_PHOTO$; GOTO 0170
00160 LET STK_PHOTO$=%PATH_DATA$+"ic_images/noimage.png"
00170 CLOSE (IC_PHOTO)
00180 RETURN
Thanks
32
General Announcements / Re: PxPlus 2019 Update 2 is now available for download
« on: December 02, 2019, 06:03:13 PM »
Is this update supposed to be available via the online update manager or is it a full install?
It is not appearing in the online update.
Thanks
It is not appearing in the online update.
Thanks
33
Registration and Setup / Re: SSL libraries on Ubuntu64 bit with PxPlus V10 64 bit
« on: October 18, 2019, 06:10:52 PM »
Thanks guys.
I'll pass this on.
Funnily enough I did suggest upgrading to latest version a couple of weeks ago to avoid compatibility issues
I'll pass this on.
Funnily enough I did suggest upgrading to latest version a couple of weeks ago to avoid compatibility issues
34
Registration and Setup / Re: SSL libraries on Ubuntu64 bit with PxPlus V10 64 bit
« on: October 18, 2019, 03:50:53 AM »
Ubuntu version 18.04.3 and Pxplus version 10
THanks
THanks
35
Registration and Setup / SSL libraries on Ubuntu64 bit with PxPlus V10 64 bit
« on: October 17, 2019, 09:43:10 PM »
Hi
Ubuntu latest version
PxPlus 10 64 bit
What is the procedure to install ssl library libssl.so.10
Thanks
Ubuntu latest version
PxPlus 10 64 bit
What is the procedure to install ssl library libssl.so.10
Thanks
36
Programming / JSON files
« on: August 22, 2019, 11:45:24 PM »
Hi All,
When I create JSON files from PxPlus each element terminates with comma+0A.
I note that most JASON files we process from other sources are a continuous stream of data with only a comma between elements.
If I parse the PxPlus file at https://jsonformatter.org/ is validates OK.
Is this correct for PxPlus or should I be doing something to eliminate the 0A ?
SMPRICE_JSON:
CLEAR SMPRICEJSON${ALL}
LET SMPRICEJSON$["Price Date"]=""
LET SMPRICEJSON$["Products.1.Inventory_SKU"]=""
LET SMPRICEJSON$["Products.1.List_Price"]=""
LET SMPRICEJSON$["Price Date"]=DYMD$
FOR I=1 TO 5
READ RECORD (ICM1)ICM1$
LET SMPRICEJSON$["Products."+STR(I)+".SKU"]=ICM1.STOCK_CODE$
LET SMPRICEJSON$["Products."+STR(I)+".Price"]=STR(ICM1.PRICES[1])
NEXT I
LET SMPRICE$=DIM(LIST EDIT SMPRICEJSON${ALL})
LET JSONFILE$="/hit/temp/czapijson.json";
ERASE JSONFILE$,ERR=*PROCEED;
SERIAL JSONFILE$;
OPEN (HFN,ISZ=LEN(SMPRICE$))JSONFILE$;
WRITE RECORD (LFO)SMPRICE$;
CLOSE (LFO)
Thanks
When I create JSON files from PxPlus each element terminates with comma+0A.
I note that most JASON files we process from other sources are a continuous stream of data with only a comma between elements.
If I parse the PxPlus file at https://jsonformatter.org/ is validates OK.
Is this correct for PxPlus or should I be doing something to eliminate the 0A ?
SMPRICE_JSON:
CLEAR SMPRICEJSON${ALL}
LET SMPRICEJSON$["Price Date"]=""
LET SMPRICEJSON$["Products.1.Inventory_SKU"]=""
LET SMPRICEJSON$["Products.1.List_Price"]=""
LET SMPRICEJSON$["Price Date"]=DYMD$
FOR I=1 TO 5
READ RECORD (ICM1)ICM1$
LET SMPRICEJSON$["Products."+STR(I)+".SKU"]=ICM1.STOCK_CODE$
LET SMPRICEJSON$["Products."+STR(I)+".Price"]=STR(ICM1.PRICES[1])
NEXT I
LET SMPRICE$=DIM(LIST EDIT SMPRICEJSON${ALL})
LET JSONFILE$="/hit/temp/czapijson.json";
ERASE JSONFILE$,ERR=*PROCEED;
SERIAL JSONFILE$;
OPEN (HFN,ISZ=LEN(SMPRICE$))JSONFILE$;
WRITE RECORD (LFO)SMPRICE$;
CLOSE (LFO)
Thanks
37
Programming / Re: Writing CSV files
« on: July 03, 2019, 01:06:00 AM »
Hi Allen,
I thought that was true but wasn't sure.
The file will be imported to Magento 2.x and I wanted to be certain.
Thanks
BTW I just discovered *obj/excel
This is so easy to use, HOWEVER, how do you make it work in WindX where the file you are working with is on the NTHOST server and you are on a workstation that has Excel installed?
I thought that was true but wasn't sure.
The file will be imported to Magento 2.x and I wanted to be certain.
Thanks
BTW I just discovered *obj/excel
This is so easy to use, HOWEVER, how do you make it work in WindX where the file you are working with is on the NTHOST server and you are on a workstation that has Excel installed?
38
Programming / Writing CSV files
« on: July 02, 2019, 11:06:27 PM »
Hi all
I have to read a csv file, update the 6th column and write the record out again.
I know I could do this with a call to Excel but I can't remember how to do it. I think it would also be very slow.
So, instead I'm reading the input CSV, updating the 6th column and writing it out to a new CSV file.
This is great except the new file has quotes around each column.
How do I write the record without the quotes?
Thanks
00015 DIM CSVREC$[1:7]
00016 IOLIST CSVREC${ALL}:[STR(",")]
00021 OPEN (2)"/HIT/TEMP/CUSTOMER.CSV"
00022 LET CUSTOMEROUT$="/HIT/TEMP/CUSTOMEROUT.CSV"
00023 ERASE CUSTOMEROUT$,ERR=*NEXT
00024 SERIAL CUSTOMEROUT$
00025 OPEN LOCK (3)CUSTOMEROUT$
00030 READ (2,END=0500)IOL=0016
00032 CSVREC$[6]=123456"
00034 WRITE (3)IOL=0016
This becomes
name@gmail.com,base,default,David,Chard,,
this
"name@gmail.com","base","default","David","Chard","123456","",
I have to read a csv file, update the 6th column and write the record out again.
I know I could do this with a call to Excel but I can't remember how to do it. I think it would also be very slow.
So, instead I'm reading the input CSV, updating the 6th column and writing it out to a new CSV file.
This is great except the new file has quotes around each column.
How do I write the record without the quotes?
Thanks
00015 DIM CSVREC$[1:7]
00016 IOLIST CSVREC${ALL}:[STR(",")]
00021 OPEN (2)"/HIT/TEMP/CUSTOMER.CSV"
00022 LET CUSTOMEROUT$="/HIT/TEMP/CUSTOMEROUT.CSV"
00023 ERASE CUSTOMEROUT$,ERR=*NEXT
00024 SERIAL CUSTOMEROUT$
00025 OPEN LOCK (3)CUSTOMEROUT$
00030 READ (2,END=0500)IOL=0016
00032 CSVREC$[6]=123456"
00034 WRITE (3)IOL=0016
This becomes
name@gmail.com,base,default,David,Chard,,
this
"name@gmail.com","base","default","David","Chard","123456","",
39
Programming / Re: How to remove a file from an FTP server using Curl
« on: June 11, 2019, 04:51:22 AM »
This worked!
-O or -o is needed depending on whether you want to download to other than the current folder
curl -k -ssl --user username@servername.com.au:password -o \hit\somefolder\Magento\Orders\filename.txt ftp://ftp.servername.com.au/public_html/Future/Texts/ -Q "-DELE filename.txt"
I had to be patient though.
It appeared the file wasn't deleting whilst monitoring the ftp server with Filezilla.
It just takes a while to refresh.
-O or -o is needed depending on whether you want to download to other than the current folder
curl -k -ssl --user username@servername.com.au:password -o \hit\somefolder\Magento\Orders\filename.txt ftp://ftp.servername.com.au/public_html/Future/Texts/ -Q "-DELE filename.txt"
I had to be patient though.
It appeared the file wasn't deleting whilst monitoring the ftp server with Filezilla.
It just takes a while to refresh.
40
Programming / Re: How to remove a file from an FTP server using Curl
« on: June 10, 2019, 11:05:40 AM »
Removing the space certainly made a difference.
It now produces a directory listing on the command window but doesn't delete anything.
That's because the ftp url ends with /Texts/ which generates a listing.
So it seems the -Q onwards was ignored.
As you say, time to consult with curl support.
Thanks for trying.
It now produces a directory listing on the command window but doesn't delete anything.
That's because the ftp url ends with /Texts/ which generates a listing.
So it seems the -Q onwards was ignored.
As you say, time to consult with curl support.
Thanks for trying.
41
Programming / Re: How to remove a file from an FTP server using Curl
« on: June 07, 2019, 08:19:04 PM »
Hi Devon,
I thought it was going to work but sadly not....
The CURL command seems to be accepted but it just hangs and eventually it times out
curl -k --ssl --user username@servername.com.au:password ftp://ftp.servername.com.au/public_html/Future/Texts/ -Q " -DELE filename.txt"
curl: (28) Timeout was reached
I don't think its the directory (0755) file permissions (0744) because curl didn't complain
I thought it was going to work but sadly not....
The CURL command seems to be accepted but it just hangs and eventually it times out
curl -k --ssl --user username@servername.com.au:password ftp://ftp.servername.com.au/public_html/Future/Texts/ -Q " -DELE filename.txt"
curl: (28) Timeout was reached
I don't think its the directory (0755) file permissions (0744) because curl didn't complain
42
Programming / Re: How to remove a file from an FTP server using Curl
« on: June 07, 2019, 12:14:58 AM »
Hi Devon,
I tried your suggestion
F:\HIT\TEMP\FTPFILES>curl -k --ssl -Q -DELE ftp://ftp.servername.com.au/public_html/Future/Texts/filename.txt --user username@servername.com.au:password
This is what came back
052C10398880632B4914768747600603C351BF179135309830EE638478376AFA
curl: (21) QUOT string not accepted: DELE
21 FTP quote error. A quote command returned error from the server.
I tried your suggestion
F:\HIT\TEMP\FTPFILES>curl -k --ssl -Q -DELE ftp://ftp.servername.com.au/public_html/Future/Texts/filename.txt --user username@servername.com.au:password
This is what came back
052C10398880632B4914768747600603C351BF179135309830EE638478376AFA
curl: (21) QUOT string not accepted: DELE
21 FTP quote error. A quote command returned error from the server.
43
Programming / How to remove a file from an FTP server using Curl
« on: June 05, 2019, 08:34:11 PM »
Hi All,
We have written our code to access a Magento FTP Server using CURL to download orders from a folder in json format.
To avoid processing the same orders I need to remove the file from the Magento FTP server as we process it.
That remove command structure is eluding me.
Has anyone removed a file from an FTP Server?
Thanks
We have written our code to access a Magento FTP Server using CURL to download orders from a folder in json format.
To avoid processing the same orders I need to remove the file from the Magento FTP server as we process it.
That remove command structure is eluding me.
Has anyone removed a file from an FTP Server?
Thanks
44
Web Services / Re: Curl Syntax
« on: May 23, 2019, 06:14:09 PM »
Guys
Thanks for the input.
I had worked out to download the folder contents and then parse it.
I had read about the -o but didn't realise you could specify the path.
So the bit I was missing was the local path.
Thanks.
Thanks for the input.
I had worked out to download the folder contents and then parse it.
I had read about the -o but didn't realise you could specify the path.
So the bit I was missing was the local path.
Thanks.
45
Web Services / Curl Syntax
« on: May 22, 2019, 09:50:00 PM »
I am trying to specifiy the folder to download a file using Curl FTP
It uses the current folder by default.
I have trawled all the online doco but I cant find the syntax to specify the local destination.
LET MPROGRAM$="""\hit\pvx\curl.exe""",MDESTINATION$="ftp://ftp.hatfields.com.au/public_html/Future/Texts/"+TT$,MUSER$=%NW_WEB_USER$+ \
":"+%NW_WEB_PASSWORD$
LET SS$=MPROGRAM$+" -k --ssl -O """+MDESTINATION$+""" --user """+MUSER$+""" "
INVOKE WAIT SS$
The above becomes:
"\hit\pvx\curl.exe" -k --ssl -O "ftp://ftp.domain.com.au/public_html/Future/Texts/mytestfile.txt" --user "username:password"
1. What is the syntax to specify the destination on the local computer?
I assume it's possible because *web/ftp can do it.
Unfortunately *web/ftp won't work with the new certificate requirements on ftp server. You always get an error.
I've had that discussion before, hence using Curl. The -k and --ssl parameters overcome the certificate issue.
2. Is there a syntax to specify all eg *.txt files on the ftp server to download.
Again I can't find that either.
I did find ranges eg [100-200].txt but that won't work in my case because the files names could be random.
I have resorted to retrieving a file ( ?.txt ) from the ftp server folder and parsing that for individual files.
Thanks
It uses the current folder by default.
I have trawled all the online doco but I cant find the syntax to specify the local destination.
LET MPROGRAM$="""\hit\pvx\curl.exe""",MDESTINATION$="ftp://ftp.hatfields.com.au/public_html/Future/Texts/"+TT$,MUSER$=%NW_WEB_USER$+ \
":"+%NW_WEB_PASSWORD$
LET SS$=MPROGRAM$+" -k --ssl -O """+MDESTINATION$+""" --user """+MUSER$+""" "
INVOKE WAIT SS$
The above becomes:
"\hit\pvx\curl.exe" -k --ssl -O "ftp://ftp.domain.com.au/public_html/Future/Texts/mytestfile.txt" --user "username:password"
1. What is the syntax to specify the destination on the local computer?
I assume it's possible because *web/ftp can do it.
Unfortunately *web/ftp won't work with the new certificate requirements on ftp server. You always get an error.
I've had that discussion before, hence using Curl. The -k and --ssl parameters overcome the certificate issue.
2. Is there a syntax to specify all eg *.txt files on the ftp server to download.
Again I can't find that either.
I did find ranges eg [100-200].txt but that won't work in my case because the files names could be random.
I have resorted to retrieving a file ( ?.txt ) from the ftp server folder and parsing that for individual files.
Thanks