hi:
my app is in xhb+dbf+ps32+wvw
from my app's billing screen, user selects an invoice (e.g. inv#:'ABC_1234/22-23' record# 44892), clicks on 'make-json' (menu to prom) to create a .json file of that invoice (jfile).
e.g. jfile=diskname()+':\TAX\INVOICE\JSON_OUT\'+jsonfilename.json
-this process is already coded & running proper.
now, can this be programmed from within my app:
1. open www.xxx.co.xx (predefined variable)
2. login with username,password & the 'captcha' (user,psw are predefined)
3. open/click the specific 'bulk-upload' tab (in the opened www.xxx.co.xx)
4. upload the 'jfile'
-www.xxx.co.xx will now validate & generate a file (embedded with qrc) to be downloaded. (options: xlsx / json / xml / zip)
5. download/save the generated 'xlsx' file (e.g. ABC_123.XLSX) to diskname()+':\TAX\INVOICE\JSON_IN folder
6. replace 'qrc_xls' field with ABC_123.XLSX in record#44892 (INVTAX.DBF)
the user does not have to click/hit any key.
(all this time, the screen would 'continue' to show inv# ABC_1234/22-23 details.)
thank you
On Friday, September 2, 2022 at 8:22:25 AM UTC+5:30, timepro timesheet wrote:
hi:
my app is in xhb+dbf+ps32+wvw
from my app's billing screen, user selects an invoice (e.g. inv#:'ABC_1234/22-23' record# 44892), clicks on 'make-json' (menu to prom) to create a .json file of that invoice (jfile).
e.g. jfile=diskname()+':\TAX\INVOICE\JSON_OUT\'+jsonfilename.json
-this process is already coded & running proper.
now, can this be programmed from within my app:
1. open www.xxx.co.xx (predefined variable)
2. login with username,password & the 'captcha' (user,psw are predefined) 3. open/click the specific 'bulk-upload' tab (in the opened www.xxx.co.xx) 4. upload the 'jfile'
-www.xxx.co.xx will now validate & generate a file (embedded with qrc) to be downloaded. (options: xlsx / json / xml / zip)
5. download/save the generated 'xlsx' file (e.g. ABC_123.XLSX) to diskname()+':\TAX\INVOICE\JSON_IN folder
6. replace 'qrc_xls' field with ABC_123.XLSX in record#44892 (INVTAX.DBF)
the user does not have to click/hit any key.
(all this time, the screen would 'continue' to show inv# ABC_1234/22-23 details.)
thank youhello all:
upon scouring & poring over various threads, i managed to reached here:
(this is the first, am experimenting/coding with: turl, cPassword, tipclienthttp...)
oUrl := TUrl():new("http://xxxxx.tax.gov.xx") && how to 'httpS' in place of 'http'
oUrl:cUserId := "myname"
oUrl:cPassword := "mypass1234"
oConn:=TipClientHttp():New(oUrl,.t.)
//IF oConn:Open()
//cPageContent:=oConn:ReadAll() && len(cPageContent) returns 0 //oConn:Close()
//ENDIF
-how to auto login with cUserId & cPassword. (also how to validate if userid/password are valid)
after successful login (http://xxxxx.tax.gov.xx)
a] how to get the specific 'bulk-upload' tab opened/activated/clicked (it asks file to be uploaded)
b] how to get my jfile.json uploaded.
c] post validation, how to download the generated .xlsx file to diskname()+':'\folder\subfolder2\downloadedfilename.xlsx
OR
after a] & b], the user would download the generated (.xlsx) file manually. (for this http://xxxxx.tax.gov.xx has to be open/visible on screen - mouse over the 'download-file' link)
thank you
On Friday, September 2, 2022 at 8:22:25 AM UTC+5:30, timepro timesheet wrote:
hi:
my app is in xhb+dbf+ps32+wvw
from my app's billing screen, user selects an invoice (e.g. inv#:'ABC_1234/22-23' record# 44892), clicks on 'make-json' (menu to prom) to create a .json file of that invoice (jfile).
e.g. jfile=diskname()+':\TAX\INVOICE\JSON_OUT\'+jsonfilename.json
-this process is already coded & running proper.
now, can this be programmed from within my app:
1. open www.xxx.co.xx (predefined variable)
2. login with username,password & the 'captcha' (user,psw are predefined) 3. open/click the specific 'bulk-upload' tab (in the opened www.xxx.co.xx) 4. upload the 'jfile'
-www.xxx.co.xx will now validate & generate a file (embedded with qrc) to be downloaded. (options: xlsx / json / xml / zip)
5. download/save the generated 'xlsx' file (e.g. ABC_123.XLSX) to diskname()+':\TAX\INVOICE\JSON_IN folder
6. replace 'qrc_xls' field with ABC_123.XLSX in record#44892 (INVTAX.DBF)
the user does not have to click/hit any key.
(all this time, the screen would 'continue' to show inv# ABC_1234/22-23 details.)
thank youhello all:
upon scouring & poring over various threads, i managed to reached here:
(this is the first, am experimenting/coding with: turl, cPassword, tipclienthttp...)
oUrl := TUrl():new("http://xxxxx.tax.gov.xx") && how to 'httpS' in place of 'http'
oUrl:cUserId := "myname"
oUrl:cPassword := "mypass1234"
oConn:=TipClientHttp():New(oUrl,.t.)
//IF oConn:Open()
//cPageContent:=oConn:ReadAll() && len(cPageContent) returns 0 //oConn:Close()
//ENDIF
-how to auto login with cUserId & cPassword. (also how to validate if userid/password are valid)
after successful login (http://xxxxx.tax.gov.xx)
a] how to get the specific 'bulk-upload' tab opened/activated/clicked (it asks file to be uploaded)
b] how to get my jfile.json uploaded.
c] post validation, how to download the generated .xlsx file to diskname()+':'\folder\subfolder2\downloadedfilename.xlsx
OR
after a] & b], the user would download the generated (.xlsx) file manually. (for this http://xxxxx.tax.gov.xx has to be open/visible on screen - mouse over the 'download-file' link)
thank you
On Friday, September 2, 2022 at 11:44:29 PM UTC+5:30, timepro timesheet wrote:'https://websiteaddress' will open on the screen.
On Friday, September 2, 2022 at 8:22:25 AM UTC+5:30, timepro timesheet wrote:
hi:
my app is in xhb+dbf+ps32+wvw
from my app's billing screen, user selects an invoice (e.g. inv#:'ABC_1234/22-23' record# 44892), clicks on 'make-json' (menu to prom) to create a .json file of that invoice (jfile).
e.g. jfile=diskname()+':\TAX\INVOICE\JSON_OUT\'+jsonfilename.json
-this process is already coded & running proper.
now, can this be programmed from within my app:
1. open www.xxx.co.xx (predefined variable)
2. login with username,password & the 'captcha' (user,psw are predefined) 3. open/click the specific 'bulk-upload' tab (in the opened www.xxx.co.xx)
4. upload the 'jfile'
-www.xxx.co.xx will now validate & generate a file (embedded with qrc) to be downloaded. (options: xlsx / json / xml / zip)
5. download/save the generated 'xlsx' file (e.g. ABC_123.XLSX) to diskname()+':\TAX\INVOICE\JSON_IN folder
6. replace 'qrc_xls' field with ABC_123.XLSX in record#44892 (INVTAX.DBF)
the user does not have to click/hit any key.
(all this time, the screen would 'continue' to show inv# ABC_1234/22-23 details.)
thank youhello all:
upon scouring & poring over various threads, i managed to reached here: (this is the first, am experimenting/coding with: turl, cPassword, tipclienthttp...)
oUrl := TUrl():new("http://xxxxx.tax.gov.xx") && how to 'httpS' in place of 'http'
oUrl:cUserId := "myname"
oUrl:cPassword := "mypass1234"
oConn:=TipClientHttp():New(oUrl,.t.)
//IF oConn:Open()
//cPageContent:=oConn:ReadAll() && len(cPageContent) returns 0 //oConn:Close()
//ENDIF
-how to auto login with cUserId & cPassword. (also how to validate if userid/password are valid)
after successful login (http://xxxxx.tax.gov.xx)
a] how to get the specific 'bulk-upload' tab opened/activated/clicked (it asks file to be uploaded)
b] how to get my jfile.json uploaded.
c] post validation, how to download the generated .xlsx file to diskname()+':'\folder\subfolder2\downloadedfilename.xlsx
OR
after a] & b], the user would download the generated (.xlsx) file manually. (for this http://xxxxx.tax.gov.xx has to be open/visible on screen - mouse over the 'download-file' link)
thank youfor most of you, it's easy-peasy, but i am an average skilled programmer. (pre-xhb) used to code in clipper. ('i don't know what i don't know')
please would any of the xhb gurus assist me with the syntax/command for:
************************************
function loginwebsite_touploadfile
************************************
1. open 'https://websiteaddress' from inside by app's invoicing screen. (xhb+wvw+dbf+ps32)
2. auto-login with userid,password,'captcha' (userid, password are predefined)
3. open/clickon specific 'bulk-upload' tab ('bulk-upload' would be a variable)
-in the logged site, the user will browse & manually upload/download the json/xlsx file-
(return to the invoicing screen, on exiting websiteaddress)
*eofunc
thank you
On Saturday, September 3, 2022 at 9:38:02 PM UTC+5:30, timepro timesheet wrote:
On Friday, September 2, 2022 at 11:44:29 PM UTC+5:30, timepro timesheet wrote:
On Friday, September 2, 2022 at 8:22:25 AM UTC+5:30, timepro timesheet wrote:
hi:
my app is in xhb+dbf+ps32+wvw
from my app's billing screen, user selects an invoice (e.g. inv#:'ABC_1234/22-23' record# 44892), clicks on 'make-json' (menu to prom) to create a .json file of that invoice (jfile).
e.g. jfile=diskname()+':\TAX\INVOICE\JSON_OUT\'+jsonfilename.json
-this process is already coded & running proper.
now, can this be programmed from within my app:
1. open www.xxx.co.xx (predefined variable)
2. login with username,password & the 'captcha' (user,psw are predefined)
3. open/click the specific 'bulk-upload' tab (in the opened www.xxx.co.xx)
4. upload the 'jfile'
-www.xxx.co.xx will now validate & generate a file (embedded with qrc) to be downloaded. (options: xlsx / json / xml / zip)
5. download/save the generated 'xlsx' file (e.g. ABC_123.XLSX) to diskname()+':\TAX\INVOICE\JSON_IN folder
6. replace 'qrc_xls' field with ABC_123.XLSX in record#44892 (INVTAX.DBF)
the user does not have to click/hit any key.
(all this time, the screen would 'continue' to show inv# ABC_1234/22-23 details.)
thank youhello all:
upon scouring & poring over various threads, i managed to reached here: (this is the first, am experimenting/coding with: turl, cPassword, tipclienthttp...)
oUrl := TUrl():new("http://xxxxx.tax.gov.xx") && how to 'httpS' in place of 'http'
oUrl:cUserId := "myname"
oUrl:cPassword := "mypass1234"
oConn:=TipClientHttp():New(oUrl,.t.)
//IF oConn:Open()
//cPageContent:=oConn:ReadAll() && len(cPageContent) returns 0 //oConn:Close()
//ENDIF
-how to auto login with cUserId & cPassword. (also how to validate if userid/password are valid)
after successful login (http://xxxxx.tax.gov.xx)
a] how to get the specific 'bulk-upload' tab opened/activated/clicked (it asks file to be uploaded)
b] how to get my jfile.json uploaded.
c] post validation, how to download the generated .xlsx file to diskname()+':'\folder\subfolder2\downloadedfilename.xlsx
OR
after a] & b], the user would download the generated (.xlsx) file manually.
(for this http://xxxxx.tax.gov.xx has to be open/visible on screen - mouse over the 'download-file' link)
thank youfor most of you, it's easy-peasy, but i am an average skilled programmer. (pre-xhb) used to code in clipper. ('i don't know what i don't know')
please would any of the xhb gurus assist me with the syntax/command for:
************************************'https://websiteaddress' will open on the screen.
function loginwebsite_touploadfile
************************************
1. open 'https://websiteaddress' from inside by app's invoicing screen. (xhb+wvw+dbf+ps32)
2. auto-login with userid,password,'captcha' (userid, password are predefined)
3. open/clickon specific 'bulk-upload' tab ('bulk-upload' would be a variable)
-in the logged site, the user will browse & manually upload/download the json/xlsx file-
(return to the invoicing screen, on exiting websiteaddress)
*eofunc
thank youcould someone/anyone program this 'PROFESSIONALLY'?. (with a .prg file source code)
for steps 1 & 2: us$100.
for steps 1 & 2 & 3: us$250.
(my app would just call your function with the relevant parameters).
2. auto-login with userid,password,'captcha' (userid, password are predefined)
Il 22/09/2022 11:38, timepro timesheet ha scritto:
2. auto-login with userid,password,'captcha' (userid, password are
predefined)
The problem is the point 2. I don't think it is so easy or possible at all.
Il 22/09/2022 13:07, Enrico Maria Giordano ha scritto:enrico, dan thanks for the interest.
Il 22/09/2022 11:38, timepro timesheet ha scritto:
2. auto-login with userid,password,'captcha' (userid, password are
predefined)
The problem is the point 2. I don't think it is so easy or possible at all.
Agreed. How to decode a captcha? The only way is to download the image,
pass it to an OCR and read the output. While I have a program that does
something similar, captcha is made exactly to avoid such a solution: the
OCR would be fooled by the messy image.
So, no way to overcome it, IMHO.
Dan
so, if not for the captcha, (from inside my app) can it be coded to: 'open a website, auto-login with userid & password'. (website, userid, password picked from a .dbf field).
Il 22/09/2022 17:33, timepro timesheet ha scritto:
On Thursday, September 22, 2022 at 7:42:12 PM UTC+5:30, Dan wrote:
Il 22/09/2022 13:07, Enrico Maria Giordano ha scritto:
Il 22/09/2022 11:38, timepro timesheet ha scritto:Agreed. How to decode a captcha? The only way is to download the image,
2. auto-login with userid,password,'captcha' (userid, password are
predefined)
The problem is the point 2. I don't think it is so easy or possible at all.
pass it to an OCR and read the output. While I have a program that does
something similar, captcha is made exactly to avoid such a solution: the >> OCR would be fooled by the messy image.enrico, dan thanks for the interest.
So, no way to overcome it, IMHO.
Dan
so, if not for the captcha, (from inside my app) can it be coded to: 'open a website, auto-login with userid & password'. (website, userid, password picked from a .dbf field).
the user could then manually type/validate the captcha. (on the open website page).
on exiting the website, return to my app's billing screen.
also, when enrico replied 'not possible', is it with xhb+wvw or with xhb+any lib...I think that to open the page with the browser is easy, but to interact
with the page isn't. How to automagically compile the fields user/passw?
Once the browser starts, you have no control on it, if not via OLE. The
only thing I tried has been: open the page, print it, close. Not very
much... And it worked only with IE.
Oh, and don't think to load the page in a IFRAME (or FRAME) inside a
local page carefully crafted (=with a script that modifies the
FRAME/IFRAME content). This is forbidden if the loaded page is not in
the same domain of the local page (cross-domain policy). Years ago I
studied the problem and tried some hacks, but to no avail. Google
"script injection" if you are interested. Recent improvement in
browser's security make the thing even more difficult at present.
One solution could be to download the page (quite easy with xHarbour),
modify the HTML (now the page is simply a text file on your PC),
injecting a script able to compile the controls (a bit less easy), then
open in the browser the modified page that should result pre-compiled. Unsure, however. Never tried such a thing.
Dan
On Thursday, September 22, 2022 at 7:42:12 PM UTC+5:30, Dan wrote:
Il 22/09/2022 13:07, Enrico Maria Giordano ha scritto:
Il 22/09/2022 11:38, timepro timesheet ha scritto:Agreed. How to decode a captcha? The only way is to download the image,
2. auto-login with userid,password,'captcha' (userid, password are
predefined)
The problem is the point 2. I don't think it is so easy or possible at all. >>>
pass it to an OCR and read the output. While I have a program that does
something similar, captcha is made exactly to avoid such a solution: theenrico, dan thanks for the interest.
OCR would be fooled by the messy image.
So, no way to overcome it, IMHO.
Dan
so, if not for the captcha, (from inside my app) can it be coded to: 'open a website, auto-login with userid & password'. (website, userid, password picked from a .dbf field).
the user could then manually type/validate the captcha. (on the open website page).
on exiting the website, return to my app's billing screen.
also, when enrico replied 'not possible', is it with xhb+wvw or with xhb+any lib...
On Thursday, September 22, 2022 at 8:19:36 PM UTC+3, Dan wrote:
Il 22/09/2022 17:33, timepro timesheet ha scritto:
On Thursday, September 22, 2022 at 7:42:12 PM UTC+5:30, Dan wrote:
Il 22/09/2022 13:07, Enrico Maria Giordano ha scritto:
Il 22/09/2022 11:38, timepro timesheet ha scritto:Agreed. How to decode a captcha? The only way is to download the image, >> pass it to an OCR and read the output. While I have a program that does
2. auto-login with userid,password,'captcha' (userid, password are >>>> predefined)
The problem is the point 2. I don't think it is so easy or possible at all.
something similar, captcha is made exactly to avoid such a solution: theenrico, dan thanks for the interest.
OCR would be fooled by the messy image.
So, no way to overcome it, IMHO.
Dan
so, if not for the captcha, (from inside my app) can it be coded to: 'open a website, auto-login with userid & password'. (website, userid, password picked from a .dbf field).
the user could then manually type/validate the captcha. (on the open website page).
on exiting the website, return to my app's billing screen.
also, when enrico replied 'not possible', is it with xhb+wvw or with xhb+any lib...I think that to open the page with the browser is easy, but to interact with the page isn't. How to automagically compile the fields user/passw? Once the browser starts, you have no control on it, if not via OLE. The only thing I tried has been: open the page, print it, close. Not very much... And it worked only with IE.
Oh, and don't think to load the page in a IFRAME (or FRAME) inside a
local page carefully crafted (=with a script that modifies the FRAME/IFRAME content). This is forbidden if the loaded page is not in
the same domain of the local page (cross-domain policy). Years ago I studied the problem and tried some hacks, but to no avail. Google
"script injection" if you are interested. Recent improvement in
browser's security make the thing even more difficult at present.
One solution could be to download the page (quite easy with xHarbour), modify the HTML (now the page is simply a text file on your PC),
injecting a script able to compile the controls (a bit less easy), then open in the browser the modified page that should result pre-compiled. Unsure, however. Never tried such a thing.
DanIf the login is done via GET request, the user and password are always URL parameters.
If the login is done via POST request, only JavaScript code can do it, browsers are not able to "post".
Anyway, you cannot open a local .html file generated dynamically by your desktop app (see Dan's comment), but you can call your own web app to do many more things for you.
And in order to get back to the desktop app there are needed three pieces of software:
- (A) a server-side function of the website, which is able to receive a call from the website frontend, and a call the desktop app
- (B) a function of the website frontend, which is calling (A) to notify it that the user is done with the website
- (C) a function of the desktop app, which is polling periodically (A) in order to check, that the user is done with the website, or not yet
Em quinta-feira, 22 de setembro de 2022 às 11:11:56 UTC-7, Ella Stern escreveu:
On Thursday, September 22, 2022 at 8:19:36 PM UTC+3, Dan wrote:
Il 22/09/2022 17:33, timepro timesheet ha scritto:
On Thursday, September 22, 2022 at 7:42:12 PM UTC+5:30, Dan wrote:
Il 22/09/2022 13:07, Enrico Maria Giordano ha scritto:
Il 22/09/2022 11:38, timepro timesheet ha scritto:Agreed. How to decode a captcha? The only way is to download the image,
2. auto-login with userid,password,'captcha' (userid, password are >>>> predefined)
The problem is the point 2. I don't think it is so easy or possible at all.
pass it to an OCR and read the output. While I have a program that does
something similar, captcha is made exactly to avoid such a solution: theenrico, dan thanks for the interest.
OCR would be fooled by the messy image.
So, no way to overcome it, IMHO.
Dan
so, if not for the captcha, (from inside my app) can it be coded to: 'open a website, auto-login with userid & password'. (website, userid, password picked from a .dbf field).
the user could then manually type/validate the captcha. (on the open website page).
on exiting the website, return to my app's billing screen.
also, when enrico replied 'not possible', is it with xhb+wvw or with xhb+any lib...I think that to open the page with the browser is easy, but to interact with the page isn't. How to automagically compile the fields user/passw? Once the browser starts, you have no control on it, if not via OLE. The only thing I tried has been: open the page, print it, close. Not very much... And it worked only with IE.
Oh, and don't think to load the page in a IFRAME (or FRAME) inside a local page carefully crafted (=with a script that modifies the FRAME/IFRAME content). This is forbidden if the loaded page is not in the same domain of the local page (cross-domain policy). Years ago I studied the problem and tried some hacks, but to no avail. Google "script injection" if you are interested. Recent improvement in browser's security make the thing even more difficult at present.
One solution could be to download the page (quite easy with xHarbour), modify the HTML (now the page is simply a text file on your PC), injecting a script able to compile the controls (a bit less easy), then open in the browser the modified page that should result pre-compiled. Unsure, however. Never tried such a thing.
DanIf the login is done via GET request, the user and password are always URL parameters.
If the login is done via POST request, only JavaScript code can do it, browsers are not able to "post".
Anyway, you cannot open a local .html file generated dynamically by your desktop app (see Dan's comment), but you can call your own web app to do many more things for you.
And in order to get back to the desktop app there are needed three pieces of software:Using CURL you can do something like that, the unique point like said before is the captcha, I recommend you download capcha image and show it around
- (A) a server-side function of the website, which is able to receive a call from the website frontend, and a call the desktop app
- (B) a function of the website frontend, which is calling (A) to notify it that the user is done with the website
- (C) a function of the desktop app, which is polling periodically (A) in order to check, that the user is done with the website, or not yet
fields that will request the user/password, then after you have it you can goto the next step.
On Tuesday, September 27, 2022 at 10:39:13 AM UTC+5:30, lai...@paysoft.com.br wrote:
Em quinta-feira, 22 de setembro de 2022 às 11:11:56 UTC-7, Ella Stern escreveu:
On Thursday, September 22, 2022 at 8:19:36 PM UTC+3, Dan wrote:
Il 22/09/2022 17:33, timepro timesheet ha scritto:
On Thursday, September 22, 2022 at 7:42:12 PM UTC+5:30, Dan wrote:
Il 22/09/2022 13:07, Enrico Maria Giordano ha scritto:
Il 22/09/2022 11:38, timepro timesheet ha scritto:Agreed. How to decode a captcha? The only way is to download the image,
2. auto-login with userid,password,'captcha' (userid, password are
predefined)
The problem is the point 2. I don't think it is so easy or possible at all.
pass it to an OCR and read the output. While I have a program that does
something similar, captcha is made exactly to avoid such a solution: theenrico, dan thanks for the interest.
OCR would be fooled by the messy image.
So, no way to overcome it, IMHO.
Dan
so, if not for the captcha, (from inside my app) can it be coded to: 'open a website, auto-login with userid & password'. (website, userid, password picked from a .dbf field).
the user could then manually type/validate the captcha. (on the open website page).
on exiting the website, return to my app's billing screen.
also, when enrico replied 'not possible', is it with xhb+wvw or with xhb+any lib...I think that to open the page with the browser is easy, but to interact
with the page isn't. How to automagically compile the fields user/passw?
Once the browser starts, you have no control on it, if not via OLE. The
only thing I tried has been: open the page, print it, close. Not very much... And it worked only with IE.
Oh, and don't think to load the page in a IFRAME (or FRAME) inside a local page carefully crafted (=with a script that modifies the FRAME/IFRAME content). This is forbidden if the loaded page is not in the same domain of the local page (cross-domain policy). Years ago I studied the problem and tried some hacks, but to no avail. Google "script injection" if you are interested. Recent improvement in browser's security make the thing even more difficult at present.
One solution could be to download the page (quite easy with xHarbour), modify the HTML (now the page is simply a text file on your PC), injecting a script able to compile the controls (a bit less easy), then
open in the browser the modified page that should result pre-compiled. Unsure, however. Never tried such a thing.
DanIf the login is done via GET request, the user and password are always URL parameters.
If the login is done via POST request, only JavaScript code can do it, browsers are not able to "post".
Anyway, you cannot open a local .html file generated dynamically by your desktop app (see Dan's comment), but you can call your own web app to do many more things for you.
emg, dan, ella, lai...@paysoft.com.br:And in order to get back to the desktop app there are needed three pieces of software:Using CURL you can do something like that, the unique point like said before is the captcha, I recommend you download capcha image and show it around
- (A) a server-side function of the website, which is able to receive a call from the website frontend, and a call the desktop app
- (B) a function of the website frontend, which is calling (A) to notify it that the user is done with the website
- (C) a function of the desktop app, which is polling periodically (A) in order to check, that the user is done with the website, or not yet
fields that will request the user/password, then after you have it you can goto the next step.
forget about 'captcha'. are you gurus saying even 'userid, password' (variables from a .dbf) 'just cannot' be autofilled from within my app. ?
(the user will type in the captcha)
thanks.
On Tuesday, September 27, 2022 at 10:39:13 AM UTC+5:30, lai...@paysoft.com.br wrote:
Em quinta-feira, 22 de setembro de 2022 às 11:11:56 UTC-7, Ella Stern escreveu:
On Thursday, September 22, 2022 at 8:19:36 PM UTC+3, Dan wrote:
Il 22/09/2022 17:33, timepro timesheet ha scritto:
On Thursday, September 22, 2022 at 7:42:12 PM UTC+5:30, Dan wrote:
Il 22/09/2022 13:07, Enrico Maria Giordano ha scritto:
Il 22/09/2022 11:38, timepro timesheet ha scritto:Agreed. How to decode a captcha? The only way is to download the image,
2. auto-login with userid,password,'captcha' (userid, password are
predefined)
The problem is the point 2. I don't think it is so easy or possible at all.
pass it to an OCR and read the output. While I have a program that does
something similar, captcha is made exactly to avoid such a solution: theenrico, dan thanks for the interest.
OCR would be fooled by the messy image.
So, no way to overcome it, IMHO.
Dan
so, if not for the captcha, (from inside my app) can it be coded to: 'open a website, auto-login with userid & password'. (website, userid, password picked from a .dbf field).
the user could then manually type/validate the captcha. (on the open website page).
on exiting the website, return to my app's billing screen.
also, when enrico replied 'not possible', is it with xhb+wvw or with xhb+any lib...I think that to open the page with the browser is easy, but to interact
with the page isn't. How to automagically compile the fields user/passw?
Once the browser starts, you have no control on it, if not via OLE. The
only thing I tried has been: open the page, print it, close. Not very much... And it worked only with IE.
Oh, and don't think to load the page in a IFRAME (or FRAME) inside a local page carefully crafted (=with a script that modifies the FRAME/IFRAME content). This is forbidden if the loaded page is not in the same domain of the local page (cross-domain policy). Years ago I studied the problem and tried some hacks, but to no avail. Google "script injection" if you are interested. Recent improvement in browser's security make the thing even more difficult at present.
One solution could be to download the page (quite easy with xHarbour), modify the HTML (now the page is simply a text file on your PC), injecting a script able to compile the controls (a bit less easy), then
open in the browser the modified page that should result pre-compiled. Unsure, however. Never tried such a thing.
DanIf the login is done via GET request, the user and password are always URL parameters.
If the login is done via POST request, only JavaScript code can do it, browsers are not able to "post".
Anyway, you cannot open a local .html file generated dynamically by your desktop app (see Dan's comment), but you can call your own web app to do many more things for you.
emg, dan, ella, lai...@paysoft.com.br:And in order to get back to the desktop app there are needed three pieces of software:Using CURL you can do something like that, the unique point like said before is the captcha, I recommend you download capcha image and show it around
- (A) a server-side function of the website, which is able to receive a call from the website frontend, and a call the desktop app
- (B) a function of the website frontend, which is calling (A) to notify it that the user is done with the website
- (C) a function of the desktop app, which is polling periodically (A) in order to check, that the user is done with the website, or not yet
fields that will request the user/password, then after you have it you can goto the next step.
forget about 'captcha'. are you gurus saying even 'userid, password' (variables from a .dbf) 'just cannot' be autofilled from within my app. ?
(the user will type in the captcha)
thanks.
On Tuesday, September 27, 2022 at 10:01:46 PM UTC+5:30, timepro timesheet wrote:
On Tuesday, September 27, 2022 at 10:39:13 AM UTC+5:30, lai...@paysoft.com.br wrote:
Em quinta-feira, 22 de setembro de 2022 às 11:11:56 UTC-7, Ella Stern escreveu:
On Thursday, September 22, 2022 at 8:19:36 PM UTC+3, Dan wrote:
Il 22/09/2022 17:33, timepro timesheet ha scritto:
On Thursday, September 22, 2022 at 7:42:12 PM UTC+5:30, Dan wrote:
Il 22/09/2022 13:07, Enrico Maria Giordano ha scritto:
Il 22/09/2022 11:38, timepro timesheet ha scritto:Agreed. How to decode a captcha? The only way is to download the image,
2. auto-login with userid,password,'captcha' (userid, password are
predefined)
The problem is the point 2. I don't think it is so easy or possible at all.
pass it to an OCR and read the output. While I have a program that does
something similar, captcha is made exactly to avoid such a solution: theenrico, dan thanks for the interest.
OCR would be fooled by the messy image.
So, no way to overcome it, IMHO.
Dan
so, if not for the captcha, (from inside my app) can it be coded to: 'open a website, auto-login with userid & password'. (website, userid, password picked from a .dbf field).
the user could then manually type/validate the captcha. (on the open website page).
on exiting the website, return to my app's billing screen.
also, when enrico replied 'not possible', is it with xhb+wvw or with xhb+any lib...I think that to open the page with the browser is easy, but to interact
with the page isn't. How to automagically compile the fields user/passw?
Once the browser starts, you have no control on it, if not via OLE. The
only thing I tried has been: open the page, print it, close. Not very
much... And it worked only with IE.
Oh, and don't think to load the page in a IFRAME (or FRAME) inside a local page carefully crafted (=with a script that modifies the FRAME/IFRAME content). This is forbidden if the loaded page is not in
the same domain of the local page (cross-domain policy). Years ago I studied the problem and tried some hacks, but to no avail. Google "script injection" if you are interested. Recent improvement in browser's security make the thing even more difficult at present.
One solution could be to download the page (quite easy with xHarbour),
modify the HTML (now the page is simply a text file on your PC), injecting a script able to compile the controls (a bit less easy), then
open in the browser the modified page that should result pre-compiled.
Unsure, however. Never tried such a thing.
DanIf the login is done via GET request, the user and password are always URL parameters.
If the login is done via POST request, only JavaScript code can do it, browsers are not able to "post".
Anyway, you cannot open a local .html file generated dynamically by your desktop app (see Dan's comment), but you can call your own web app to do many more things for you.
emg, dan, ella, lai...@paysoft.com.br:And in order to get back to the desktop app there are needed three pieces of software:Using CURL you can do something like that, the unique point like said before is the captcha, I recommend you download capcha image and show it around
- (A) a server-side function of the website, which is able to receive a call from the website frontend, and a call the desktop app
- (B) a function of the website frontend, which is calling (A) to notify it that the user is done with the website
- (C) a function of the desktop app, which is polling periodically (A) in order to check, that the user is done with the website, or not yet
fields that will request the user/password, then after you have it you can goto the next step.
forget about 'captcha'. are you gurus saying even 'userid, password' (variables from a .dbf) 'just cannot' be autofilled from within my app. ?
(the user will type in the captcha)
thanks.ok, can this be programmed?
from inside my app: open hpps://thewebsite.abc
with the 'login' tab clicked. -something like SHELLEXECUTE( 0, 0, thewebsite/login, 0, 0, 1 ) -
the user will then input the userid, password, captcha.
tia
On Tuesday, October 18, 2022 at 7:26:39 PM UTC+5:30, lai...@paysoft.com.br wrote:
Yes, you can do that.
thanks for the revert.
would you facilitate me with the syntax/function...
-is it a 1 line statement/function/coding...
wwwtax='httpS://einvoice1.gst.gov.in/login'
i tried, but does not work: SHELLEXECUTE( 0, 0, wwwtax, 0, 0, 1 )
thanks for your effort. shellexecute(0,"open”,"https://einvoice1.gst.gov.in/login")
this does not compile.
i tried:
wwweinvoice="https://einvoice1.gst.gov.in/login" shellexecute(0,"open",wwweinvoice)
shellexecute(0,"open",wwweinvoice,0,0,1) shellexecute(0,0,"open",wwweinvoice,0,0,1)
but, none works.
this could be tried:
-open einvoice1.gst.gov.in
-right click on the 'login' tab.
-view the 'page source'
i too could, buy it's just beyond my 'pay grade'
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 406 |
Nodes: | 16 (2 / 14) |
Uptime: | 110:52:33 |
Calls: | 8,528 |
Calls today: | 7 |
Files: | 13,210 |
Messages: | 5,920,519 |