implement a new browser
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 26
- Joined: Thu Feb 23, 2012 7:09 pm
implement a new browser
Hi,
I would like to know if implemeting a new browser with livecode was possible, and if it was difficult to do? ( how many line codes?)
I want a new browser, cause i use a website, which edits travel tickets, ( the tickets are edited in .asp extension)
I want, that every time a ticket is edited, to extract the datas i need to an external file( or in rev).
Ticket number / Name customer / Price passenger / tax passenger / Price car / tax car / total price
If it is too difficult, how much could it cost approximatively to make it do by someone? thanks
I would like to know if implemeting a new browser with livecode was possible, and if it was difficult to do? ( how many line codes?)
I want a new browser, cause i use a website, which edits travel tickets, ( the tickets are edited in .asp extension)
I want, that every time a ticket is edited, to extract the datas i need to an external file( or in rev).
Ticket number / Name customer / Price passenger / tax passenger / Price car / tax car / total price
If it is too difficult, how much could it cost approximatively to make it do by someone? thanks
Re: implement a new browser
Hi Tal,
LiveCode comes with a nice Browser example stack!
Menu: Help: Example stacks and Resources -> Folder "Examples": Browser Sampler.rev
Best
Klaus
LiveCode comes with a nice Browser example stack!
Menu: Help: Example stacks and Resources -> Folder "Examples": Browser Sampler.rev
Best
Klaus
-
- Posts: 26
- Joined: Thu Feb 23, 2012 7:09 pm
Re: implement a new browser
Ok thanks, you think it is easy to customize it like i said in my previous post : adding new internet browser functionnalities
Tal
Tal
Re: implement a new browser
Hi Tal,
yes, this is possible.
If this is easy or not, I cannot say
Please check the example stack and get used to the commands and functions that "control"
a browser object in LiveCode. then you can decide if your modification are easy or not
Best
Klaus
yes, this is possible.
If this is easy or not, I cannot say

Please check the example stack and get used to the commands and functions that "control"
a browser object in LiveCode. then you can decide if your modification are easy or not

Best
Klaus
-
- Posts: 26
- Joined: Thu Feb 23, 2012 7:09 pm
Re: implement a new browser
Hi,
I looked at the example browser, it is good one, i am checking how to do what i want, so first i am trying to extract data from a simple pdf file :
But i didnt succeed, if someone can do that?
Tal
I looked at the example browser, it is good one, i am checking how to do what i want, so first i am trying to extract data from a simple pdf file :
I get the browserid and then i try to save or extract data from it using jscripts :put revBrowserOpen(the windowId of this stack, "http://www.senat.fr/rap/r08-441/r08-4411.pdf") into tBrowserId
orget revBrowserExecuteScript(sBrowserId, ";")
get revBrowserCallScript(tBrowserId, ";")
But i didnt succeed, if someone can do that?
Tal
-
- Posts: 26
- Joined: Thu Feb 23, 2012 7:09 pm
Re: implement a new browser
i also tried this :
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-441 ... C:\Program Files (x86)\RunRev\LiveCode 5.0.2\sav","downloadComplete"
No error, but the folder is empty...
Tal
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-441 ... C:\Program Files (x86)\RunRev\LiveCode 5.0.2\sav","downloadComplete"
No error, but the folder is empty...
Tal
Re: implement a new browser
Hi Tal,
is neither a valid JavaScript nor the name of a JavaScript function!
Check the dictionary for "revBrowserExecuteScript" and "revBrowserCallScript".
Best
Klaus
I don't know much about JavaScript, but I guess that a simple semicolon ;tal_is_back wrote:...orget revBrowserExecuteScript(sBrowserId, ";")...get revBrowserCallScript(tBrowserId, ";")
is neither a valid JavaScript nor the name of a JavaScript function!

Check the dictionary for "revBrowserExecuteScript" and "revBrowserCallScript".
Best
Klaus
Re: implement a new browser
Hi Tal,
The Windows BACKSLASH in pathnames is only necessary when you do a SHELL call on Windows.
2.C:\Program Files (x86)\RunRev\LiveCode 5.0.2\sav
is this ("sav") the FOLDER where you want to download the PDF to?
If yes, you need to specify a FILENAME here, not a target folder:
THis should work:
...
## watch linebreak!
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-441 ... C:/Program Files (x86)/RunRev/LiveCode 5.0.2/sav/New PDF File from Net.PDF","downloadComplete"
...
Best
Klaus
1. Alway use the SLASH / as a pathdelimiter in LiveCode.tal_is_back wrote:i also tried this :
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-441 ... C:\Program Files (x86)\RunRev\LiveCode 5.0.2\sav","downloadComplete"
No error, but the folder is empty...
Tal
The Windows BACKSLASH in pathnames is only necessary when you do a SHELL call on Windows.
2.C:\Program Files (x86)\RunRev\LiveCode 5.0.2\sav
is this ("sav") the FOLDER where you want to download the PDF to?
If yes, you need to specify a FILENAME here, not a target folder:
THis should work:
...
## watch linebreak!
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-441 ... C:/Program Files (x86)/RunRev/LiveCode 5.0.2/sav/New PDF File from Net.PDF","downloadComplete"
...
Best
Klaus
-
- Posts: 26
- Joined: Thu Feb 23, 2012 7:09 pm
Re: implement a new browser
Thanks, i succeeded doing like that :
set the defaultfolder to "C:\save "
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-4411.pdf",test
So the file test is saved in my t folder
it can be a solution, i have to automate it for each specific filei wanna save.
The second step is to find a way in rev to directly extract data from pdf file...
Tal
set the defaultfolder to "C:\save "
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-4411.pdf",test
So the file test is saved in my t folder
it can be a solution, i have to automate it for each specific filei wanna save.
The second step is to find a way in rev to directly extract data from pdf file...
Tal
Re: implement a new browser
Hi Tal,
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-4411.pdf","test"
And always use a SLASH / in LiveCode as the path delimiter, in case I did not mention this yet!
OK, setting the defaultfolder will do, but directly setting the filename without changing the defaultfolder is more elegant
so you could extract the exact date and time of the download if necessary.
Think about what you need and ask again here
Please post here if you found a solution!
Best
Klaus
Important hint! Use QUOTES around the filename:tal_is_back wrote: set the defaultfolder to "C:\save "
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-4411.pdf",test
libURLDownloadToFile "http://www.senat.fr/rap/r08-441/r08-4411.pdf","test"
And always use a SLASH / in LiveCode as the path delimiter, in case I did not mention this yet!

OK, setting the defaultfolder will do, but directly setting the filename without changing the defaultfolder is more elegant

Ther are several ways to automatically save the files like setting the name to something with "the seconds",tal_is_back wrote:it can be a solution, i have to automate it for each specific filei wanna save.
so you could extract the exact date and time of the download if necessary.
Think about what you need and ask again here

Uhh! That's not an easy task and I wish you good luck!tal_is_back wrote:The second step is to find a way in rev to directly extract data from pdf file...
Please post here if you found a solution!

Best
Klaus
Re: implement a new browser
You may just want to shell to a freeware commandline application to do thatThe second step is to find a way in rev to directly extract data from pdf file...
http://www.foolabs.com/xpdf/home.html
-
- Posts: 26
- Joined: Thu Feb 23, 2012 7:09 pm
Re: implement a new browser
Thats the automation i wanna do : It is a website, which edit travel ticket in .asp to be printed, i want that everytime a ticket is edited ---> save the file or extract the datasTher are several ways to automatically save the files like setting the name to something with "the seconds",
so you could extract the exact date and time of the download if necessary.
Think about what you need and ask again here
Finaly, thats what i need, a table containing that datas : Ticket number / Name customer / Price passenger / tax passenger / Price car / tax car / total price
YEs, maybe there is a way to call that software from revolution?You may just want to shell to a freeware commandline application to do that
http://www.foolabs.com/xpdf/home.html
Re: implement a new browser
See the shell function in the documentation.