Livecode???? and .SPL files

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

tal_is_back
Posts: 26
Joined: Thu Feb 23, 2012 7:09 pm

Livecode???? and .SPL files

Post by tal_is_back » Thu Feb 23, 2012 7:18 pm

Hi everyone,

I was a revolution studio user few months ago, and i was used to go often to this forum, so i know the basis and a little more of this software but, when i used it, it was called " revolution studio", now i see "livecode", is it nearly the same? if i buy the new version, which one do i have to download? which version is the most complete and look likes revolution studio?

Second question a little more for development, the files with the extension .SPL which are recorded ih the spool folder, when files are printed;
does revolution can decode it to text or something which can be read?

Thank you all

PS : i have put the file in attachment

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Livecode???? and .SPL files

Post by Mark » Fri Feb 24, 2012 12:58 pm

Hi,

Sometimes a SPL file contains postscript data. You can convert such a file to PDF. It is also possible that such a file contains plain text, but this is very rare, e.g. only if you're printing from the DOS prompt. In all other cases, you may need special software to convert the file, if it is possible at all.

Why exactly would you like to do this? Perhaps another solution is possible, e.g. let people upload a specific file format to a print server and have the print server print the file by itself after reading it into LiveCode and doing whatever you need to do.

Regading licenses: LiveCode is still the same as Revolution but the licensing scheme has changed completely. There is no real comparison possible between the old and the new licensing scheme. Just have a look at the store and order what suits you needs. Btw if the old version of Revolution works for you, then there is no reason to upgrade.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

tal_is_back
Posts: 26
Joined: Thu Feb 23, 2012 7:09 pm

Re: Livecode???? and .SPL files

Post by tal_is_back » Fri Feb 24, 2012 4:54 pm

Hi,

thank you, i have not revolution studio anymore, what license do you think i must buy to have the same functionnalities than before?

I have uploaded the spl file, maybe you can say me if it can be converted easily? i have already tried with "actmask spl batch converter" but with no succes.

I want to do this to simplify the accounting, english is not my natural language, so i ll try to explain it clearly :

- People use an internet site to make and print "travel ticket"
- So they only have to click on the print button, when the travel ticket is opened on firefox for example, the file printed has .asp extension.
- for the accounting (finance gestion), someone take the paper ticket( already printed) and write it on excel to make his calculations

--> So i wanna find a solution to make it automaticly, when they print the ticket, the datas needed (ticket number, customer name, prices...)must be stored automaticly, so after i can use it (with livecode now) and make the finance gestion automaticly

I hope you have understood me? lol

tal_is_back
Posts: 26
Joined: Thu Feb 23, 2012 7:09 pm

Re: Livecode???? and .SPL files

Post by tal_is_back » Fri Feb 24, 2012 4:59 pm

sorry the file is too big and i can not upload it (290ko when compressed) and 256 allowed

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Livecode???? and .SPL files

Post by Mark » Fri Feb 24, 2012 5:07 pm

Hi,

I think we should start from a different perspective. Suppose that we get this to work, how are you going to insert the data automatically into Excel?

Dropbox is an excellent way to share files. Just create an account and put your files into your public Dropbox folder. Post a public link to the file in your Dropbox in the forum.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

tal_is_back
Posts: 26
Joined: Thu Feb 23, 2012 7:09 pm

Re: Livecode???? and .SPL files

Post by tal_is_back » Fri Feb 24, 2012 10:02 pm

Hi,

here is the file (it is what contains the folder spool/printers after printing one .asp file) :

u/63992719/00006.spl

I put only the end of link cause ("Your account does not have permission to post links or domain/page references.")

if i have all the data i need, ill make a program on rev, it will make a repeat loop with all the files containning the data, and ill extract the datas i need, first ill put them into a table and ill make all the calculations in the rev application, so not really need excel if it works ( even if i think i can also export on excel after with livecode?)

What i wanna do may contain many complications i think, but maybe step by step it can succeed :)

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Livecode???? and .SPL files

Post by mwieder » Fri Feb 24, 2012 10:35 pm

A. Files exist in the spool folder only as a temporary buffer until they have been printed. If you want to grab information from the spool files, you have to get them before the printer is finished. Otherwise they will be deleted from the spool folder.

B. The data files in the spool folder may or may not contain the information you need. Many times a printed ticket will contain a bitmap image of the ticket information, not the text itself.

So in order for your plan to work, you will need to A) grab the files from the spool folder before they disappear and B) ensure that they contain the information you need.

For the second criterion, the form

Code: Select all

put url("binfile:" && pathToTheFile) into tTicketData
should do the trick, and you're on your own from there out finding the information you want. But because of issue A I'm sorry, but I don't see much chance of this project being successful.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Livecode???? and .SPL files

Post by Mark » Fri Feb 24, 2012 10:46 pm

Hi,

Your SPL file is in ZIMF format, which is a raw print format. More info about ZIMF can be found here.

It would be quite difficult to convert this file. There are billions of sites mentioning the search term "ZIMF" to attract more visitors, but I don't think a ZIMF converter exists.

I believe it would be easier to set up a web page with a simple form and have people buying tickets enter the data in the web form. The web form could send the data directly to your LiveCode standalone, which would serve as a... server. Read the LiveCode documentation about sockets and learn how to make a simple web server or use PHP and a simple MySQL database.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

tal_is_back
Posts: 26
Joined: Thu Feb 23, 2012 7:09 pm

Re: Livecode???? and .SPL files

Post by tal_is_back » Fri Feb 24, 2012 11:16 pm

HI,

I understand what you mean, but i cant not modify the web site, it is private, and the datas i need are sent by a server, i can only see the result, which is a .asp file.

I was searching on internet, and they talk about saving automaticly the web page, firefox has a module which do that "auto save document", but no chance it works for all pages of the site, except .asp pages.

Maybe, if you have an idea how to save that page automaticly?

Another question, i have talked about make a repeat loop of files in a folder, can rev do that?

Thank you,

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Livecode???? and .SPL files

Post by Mark » Fri Feb 24, 2012 11:23 pm

Hi,

You don't understand what I am saying. Who is going to push the print button? That's a human being, right? The same human being can go to another website and enter the data of the ticket manually and click on the submit button. Simple. If you don't think this makes sense, then you need to explain exactly why not.

Obviously, LiveCode can loop through files. There is the files function, which returns a list of files in the default folder.

Code: Select all

put the files into myList
repeat for each line myFile in myList
  put the defaultFolder & slash & myFile into myPath
  // do something with file myPath here
end repeat
Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Livecode???? and .SPL files

Post by sturgis » Fri Feb 24, 2012 11:30 pm

There might be another direction to look at also.. Doesn't the site that tickets are purchased from send a confirmation email with all the required data? If so, either a) have the user forward the email to a specially set up email address for accounting purposes, or b) if you have control of your smtp/pop servers see if the admins can set up a filter that will auto cc the incoming emails from that specific site to a special email address for accounting.

Just a thought.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Livecode???? and .SPL files

Post by mwieder » Fri Feb 24, 2012 11:33 pm

Yet another approach: write a printer driver so that the user can select to print to your application instead of to the real printer.

But from what I've seen of what you have planned, I'd have to say that if this were my project I'd turn it down as a waste of effort. The work you're going to put into this far outweighs the work of copying a ticket number and pasting it into Excel.

tal_is_back
Posts: 26
Joined: Thu Feb 23, 2012 7:09 pm

Re: Livecode???? and .SPL files

Post by tal_is_back » Fri Feb 24, 2012 11:37 pm

Hi mwieder,

For the A problem, it is already resolved, you can modify an option on the print server, which do that files are not deleted.

So the B problem remains, i have put an attachement if you wanna see the printed file.

Mark, there are 2 problems for what you propose:
1- the humain being ( who fill the informations and click on the print button), must not lose time and do another thing unfortunately
2- It is not that datas, that i need, cause when they fill customer information ( name, town, departure date, arrival date), it is sent to a server which calculate new informations ( price, taxs, ticket number), and this is thist new informations that i need, they are only on the .asp file and not before, i hope you have understood what i wanna explain.

Thank you all,

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Livecode???? and .SPL files

Post by Mark » Fri Feb 24, 2012 11:42 pm

Hi,

I like Sturgis' idea. Depending on the e-mail client used, it might be easy to write a VBScript or AppleScript that parses the e-mail.

Mwieder, if I were managing a finance department of a big company or research institute, I would be happy to automate whatever there is to automate.

It is not clear to me what OP is doing, though. Apparently, he is not in the finance department. No, I don't understand your latest explanation. Can you write a few more sentences? What kind of company are you doing this project for? What is the purpose of this project?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Livecode???? and .SPL files

Post by mwieder » Fri Feb 24, 2012 11:46 pm

Mark-

I do automation for a living. There is a tradeoff between the amount of time it takes to automate a process and the effort saved in running the automated result.

Other than that, I agree with your points completely.

Post Reply