Rev as Linux Shell Script

2010-10-28 Thread Bill Andersen
I'm sorry this is so long winded.  I'm hoping it will help you understand my 
motivation...

I am a necessity programer.  I don't sell my programs, I program as a systems 
analyst to achieve results for my employer.

I have developed fairly complex solutions in FileMaker and I can program in VB, 
Lua and I've even written a few C utilities (Text manipulation).
I've written with PHP and Perl for web.  And, as part of my job, I have to 
create reports from a legacy Cobol system using ODBC and Linux shell scripting.

The problem is, I really don't know any one of these programming languages 
fluently :)

When I switch between them (sometimes within the same day), I'm always having 
to get out a book and refresh my memory about certain syntax.  Sure, I can 
remember most of the basics of program flow (If, then, else) between each one, 
but even then I sometimes type it wrong and have to go back and edit after it 
gets an error.

SO, I thought I would try finding a language I can can call the one 
programming language I'll ever need.  Along comes Rev (a couple of years ago 
for me) and I really felt like it would be a good candidate.  I can program for 
Mac, Win, Web, Linux, Mobile devices... you guys know all that.

However, a CONSIDERABLE amount of my programming is in Unix Shell script.  We 
have a legacy accounting system running on SCO Openserver (We are changing over 
to Linux in 2011).  I have a full EDI interface to one of our suppliers written 
in bash shell script AND I NEED it to be a shell type process in order for it 
to work for me. (nightly cron, headless computer, etc.)

SO!!!  The 'last' feature of Rev/LiveCode I need to be able to address is the 
ability to run LIKE a Linux shell script.

I've read how to get the runtime working as a CGI and played around enough that 
I 'can' (seemingly) make it work from a shell with the #!revolution -ui 
declaration on the first line.  However, when I get to some of the higher level 
features (FTP, ODBC, etc) I start getting errors.  I was researching how to 
possibly resolve these issues (need libraries, etc) when I found that Rev 3.5 
is the last version to support the ability to run as a CGI.

Now, my questions...

1) Am I dreaming?  Should I just move to Perl or something else and forget 
about Rev as a shell language?

2) I know LiveCode 4.5 can't do the CGI.  Would it work for a shell script 
(some UI/Graphical features obviously not available)

3) If so, can someone point me to some documentation on how to set it up 
correctly.

4) My first test was to try FTPing a file (needed for EDI) and I get errors 
when it can't locate libURLftpUploadFile.
   Where is this library and where should I put it on the Linux box?

5) I've got an Enterprise License.  Is this in violation of my license in any 
way?

Thanks

Bill

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev as Linux Shell Script

2010-10-28 Thread Bill Andersen
 If you stick to the 3.5 engine or switch to RevServer but want to do some
 net stuff not enabled by libURL, you can always shell() to cURL and be
 happy.

Yes.  However, I'm still having to work with 'non-rev' syntax (learning how 
cURL works).  As it turns out, I already know most of it (bash'ing for so 
long), but that knowledge of how to use cURL or shell out to any other Unix 
shell command (awk, sed, etc.) really won't translate over to Rev if I want to 
use it as my primary development tool.  For example, if I want to FTP a file 
from a LiveCode project developed for use on Windows, then I would be better 
off using libURL.  (Yes, I know cURL could be installed on Win, but I'm wanting 
to simplify things) So, I've got to not only work with all the Unix tools while 
developing at the 'shell' level, I've also got to learn all the LiveCode ways 
of doing the same task.  That is what I am doing, I was just hoping to to use 
Rev at the shell level (since most of my work is done there) in order to get 
more proficient with the Rev/LiveCode syntax.  Kill two birds with one stone!

So, the short answer is: No, Rev will not work well as a shell scripting 
language 'out of the box'

I've used PHP to do 'shell utilities', I sure wish Rev could act similar.  How 
nice would it be to just have one language/syntax for the bulk of your code.

Thanks to all

Bill___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Rev as Linux Shell Script

2010-10-28 Thread Bill Andersen
Thank you so much.  I will try this and let you know how it works out...

Bill

On Oct 28, 2010, at 3:03 PM, J. Landman Gay wrote:

 On 10/28/10 2:08 PM, Bill Andersen wrote:
 
 I've used PHP to do 'shell utilities', I sure wish Rev could act
 similar.  How nice would it be to just have one language/syntax for
 the bulk of your code.
 
 You can insert libURL (or any other script) into the message path so that 
 commands to the library will work with your CGI script. It takes a little bit 
 of set up.
 
 First, in the View menu in the IDE, choose to show LiveCode UI Elements in 
 lists. Then open the Application Browser and all the IDE stacks will appear. 
 Scroll to the revLibrary stack in the left-hand list, expand it, click on 
 its single card, and in the right side panel find the button revLibURL'. 
 Right-click to edit its script, then copy it.
 
 Paste the script into the stack script of a new mainstack (for this way of 
 doing it, it has to be the stack script.) Save the stack as revLibURL or 
 similar. Upload the stack to your CGI folder on the server and set its 
 permissions to 755.
 
 In your CGI script, put this near the beginning after the on startup line:
 
  start using stack revLibURL
 
 That will make the libURL script available to your CGI. After that you should 
 be able to use libURL handlers as you do in the IDE. (In theory; haven't 
 actually tried it. But that's how you create pseudo-includes.)
 
 The libURL library is updated frequently, so you'll have to repeat this 
 process every time a new version of LiveCode is released if you want to stay 
 current.
 
 -- 
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.com
 ___
 use-revolution mailing list
 use-revolution@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your subscription 
 preferences:
 http://lists.runrev.com/mailman/listinfo/use-revolution
 

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Windows 7 - any experiences?

2009-06-19 Thread Bill Andersen
 I liked Windows 7 a lot. Much snappier than Windows Vista. Lots of updated
 drivers. A smarter UAC. I would probably use it except for two problems:
1)
 I prefer the Vista/XP task bar. And 2) there is no upgrade path from RC1
to
 the shipping version of Windows 7; you will have to do a clean install
when
 it ships.

Granted, I'm running it virtualized on my Mac, but my XP Pro virtuallized
seems
to me to run considerably faster than W7.  I havent' compared it to Vista
(skipped Vista alltogether)

Windows 7   Hmm Seven... LOL

Same
Exact
Vista
Except
Number?



___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: TextWrangler

2009-06-15 Thread Bill Andersen
SoTeX :)

-Original Message-
From: use-revolution-boun...@lists.runrev.com
[mailto:use-revolution-boun...@lists.runrev.com] On Behalf Of Ken Ray
Sent: Sunday, June 14, 2009 9:24 PM
To: Use Revolution List
Subject: Re: TextWrangler

 http://sonsothunder.com/devres/revolution/downloads.htm
 
 Quirky name but I assume it stands for Sons of Thunder Software / MindLube
 games eXternal Editor.

Right; it was originally MLXEditor, but Alex Rice had stopped doing anything
with Rev and it kind of laid dormant. I spoke with him and asked if I could
revive it and add to it and he gave me the green light. But I felt I should
keep the MLXEditor in the name...

Although enough time has passed now that it could probably be renamed if
someone wants to suggest something.

:-)

Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.com/


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: WorkGroup Manager

2009-06-03 Thread Bill Andersen
 This is a little obscure, but I have a client who is using Apple's
WorkGroup
 Manager who is claiming that they (admin) set the permissions of my
 [Revolution] application to read/write.  Then, when the user logs in they
 don't have permissions to run the application.  They claim this is not an
 issue with any other application they have.

Dan,

  Shouldn't that be read/execute?  They don't need to write to it - as you
  can't write to the rev application - as I found out this week :()

Bill


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Best Practices Question

2009-05-28 Thread Bill Andersen
andre wrote:
I use globals when I need sharing the data all across multiple
scripts, stacks and the like and the data must be forgotten between
runs. So, I use it for wide spread temporary data but these days I use
only one global and that global is an array where I can put anything I
want and still keep the global clutter low.

Hmm, that's a good idea.  That would certianly unclutter the top of
some scripts!

 And I use customprops with data that needs remembering or are multiple
 line. If I need to store the data I am using, I will use a custom
 property or if I am fiddling with some constant or some data that will
 be used by my software as opposed from data that is inputed from
 keyboard or other data sources, then I will use a custom property.
 Common uses for me is storing templates and pieces of messages to be
 assembled later and presented to the user. I also store binary chunks
 in custom properties when needed. For example, storing curl.exe inside
 a custom property and pipeing it out case the windows user does not
 have curl installed and I need it.

This is one area I am having issues.  I'm new enough to Rev that I 
didn't realize fields on my Preferece Page (DB IP Address, DB Name, etc.)
wouldn't be remembered between sessions when I make a Standalone!

Can I take what the user enters in the fields for their Preferences
(database's IP Address, DB Name, etc.) and then assign them to a Custom
Property before they exit the standalone.  Will that keep the data?

OR, do I have to store that in a prefs text file and just parse it
at runtime? What do others do?

Bill


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Best Practices Question

2009-05-27 Thread Bill Andersen
Can someone point me to a Best Practices or good itermediate tutorial
on programming in Rev.  I've been able to do quite a bit and can use
the dictionary to learn how to use the language, but I'm having trouble
understanding how most people use Globals, Custom Properties, etc.

I've read pro and cons on using globals.  I've tried to write functions
and pass params around to avoid them (which I think is best), but then
there are times a global seems to be a better idea... OR would a Custom
Property be better?  I just don't know how others would do it.  I've
looked through a lot of examples and it seems it is all over the board!

I know it isn't written in stone (and really a personal preference),
but has someone put together a Best Practices document?

We really need a Rev for Dummies book!

Bill
 


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Best Practices Question

2009-05-27 Thread Bill Andersen
Devin,

  Great stuff.  Very helpful.  If nothing else to confirm I'm not as lost
  as I feel sometimes.  I find I do 90% or more of what you listed.  I guess
  just from experience with other languages!

 Declare your local variables and enable the variable checking
 by default option.  It will help prevent typos and cut down
 your debugging time.

  Variable Checking is one of the first things I found and turned on.
  I really like C because of its structure, but for the life of me
  I just can't think that way and get anything done in C.  I'm very
  familiar with VB (I wrote our in-house EDI transaction processing
  from scratch in VB...  Yikes!) and the first line of any of
  my projects in VB is Option Explicit.

  However, Variable Checking by default throws a stick in the spokes
  when you download other peoples work and accidentally hit the compile
  button when viewing their code LOL!  (OK, OK, just don't hit save!!!)

 There! That's probably more than you bargained for. And I'm sure  
 others will chime in with more advice. We all have plenty of that, for  
 free. :-)

  I'm still reading the links you sent and Yes, this is a great group.

  Thanks to all!

Bill


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Best Practices Question

2009-05-27 Thread Bill Andersen
Richmond wrote:
 I do think what is needed is a Rev for people carrying all
 sorts of confusing baggage over from other programming languages
 and/or environments book.

No doubt!  I think Rev would be easier to learn if I had NO experience
programming.  I really like it, but I must admit, some of the approaches
taken are too easy.  I can't figure it out because it is right in front
of me!

Not to start a flame war, but it is sort of like Mac and Windows.  I got
my first Mac in 1984 and started thinking the Mac way early on.  Then I
got a job programming on Windows (hated it).  Now, I use Windows every day
and have migrated to a different way of doing things (The MS Way!)

My wife uses our Mac at home and I have always had a Win machine.  This last
year, I bought ME a new iMac 24 (got her one too) for Chrstmas.  I find
I sometimes make things way to hard when I have to re-learn the way a Mac
does something.  I forgot how just plain sensible most things are on Mac.

I guess Rev is sort of like that.  (and sometimes not!)

Bill


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Launching .rev files on WinXP

2009-05-22 Thread Bill Andersen
OK, I guess I need the long weekend more than I realized...

I have 3.5.0 build 870 on my WinXP Pro computer.  When I double click
on a .rev file, it luanches the Rev IDE, but it doesn't load the file.

I must go to FileOpen and select the file.  Then it will open.

I right clicked on the .rev file and said Open with to see if it
might correct the problem, but I don't even have the Revolution.exe
file as an option.  I browsed to the .exe and selected it, but
it still won't show up in the list of available programs to open up
the file...

Anyone else seen this?

Bill
 

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Launching .rev files on WinXP

2009-05-22 Thread Bill Andersen
 1) Open Windows Explorer
 2) Select Tools  Folder Options from the pulldown menu
 3) Click on the File Types tab
 4) hilite the REV Extension (typing REV will locate the line)
 5) Click the 'Advanced' button
 6) Select the 'Open' action and click the 'Edit...' button
 Now...
 In the 'Application used to perform action:' field, browse to the rev
 folder for which version of RunRev you want launched for ALL .rev files.
 The result of editing this, should look like this:

C:\Program Files\Revolution Studio\3.5.0-gm-2\Revolution.exe %1

 The %1 parameter is the file that is being selected to open by you.

Mark, 

  Yes, that worked great.  Thank you.

  The weird part is, the Advanced button didn't show up at first.  The
  button was actually Restore.  There was a note that said the .rev
  files would be using the application for .rav and I could click restore
  to set it back to the default .rev  Man, I have no idea how that
happened.

  Thanks

Bill


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Gender [was: Re: Cancel a repeat with a button]

2009-05-15 Thread Bill Andersen
 hehehe -- I've been forging my husband's signature on his paychecks for so

 long now that if he ever had to deposit his own I don't think they'd be 
 accepted!  Our names are NOT similar...  Ditto for the IR... er... 

As if the bank looks at signatures any more!  Several years ago (at a
previous
employer), 92 payroll checks were sent out WITHOUT any signature at all.
(I know, different than an endorsement, but still)

Out of 92 employees, there were 8 different banks involved and one check
cashing service...

The number of checks refused... ZERO!

Now that is funny/scary!

BA

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Other stacks opening besides the one selected

2009-05-15 Thread Bill Andersen
 I will correct myself about files loading automatically, I was
 thinking of lower down in the folder hierarchy. Nonetheless, common
 sense would seem to indicate that storing data files in the Program
 Files directory would seem a Bad Idea.

A agree.  Not to mention the problems Vista has with users writing
files in the Program Files folder.  Will it really be in the
Program Files directory? Or will it be vertualized?  Or will you
simply be denied access?  Depends on lots of variables and how
Vista is setup...

The Program Files folder is for Program Files, not data.  Most other
Windows programs will put you in [My]Documents by default.

BA

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution