Re: shell command to identify wireless printer

2010-10-12 Thread Peter Brigham MD
I can probably get this to work, since my handler already relies on  
asking the user once for the USB printer identification then storing  
it so the user never has to be asked again. If I can identify the  
wireless network I can associate a printer with it, store that  
printername, and then proceed.


However, I don't understand much at all about command-line stuff. I ran
put shell(/System/Library/PrivateFrameworks/Apple80211.framework/ 
Versions/Current/Resources/airport-I)
and I get an error. What command should I use to operate on this  
filepath? And what's the -I at the end? It's not part of the filename.


-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


On Oct 9, 2010, at 12:24 AM, Mike Bonner wrote:

Can you come at it from a different direction?  Can you check  
current SSID
against a printer list to select which printer you want? Assuming  
you always
go to the same set of networks, this should have a similar affect  
yes?  Set
it up once, save the printer name, next time you need to print check  
the

current ssid and select the appropriate printer name.

YOu can get the current ssid with the following command line.

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/ 
Current/Resources/airport

-I

MOre info than you need, but easy to parse.

On Fri, Oct 8, 2010 at 9:51 PM, Peter Brigham MD pmb...@gmail.com  
wrote:


The printername gives the name of the printer currently selected in  
the
print dialog, ie, the default printer. On my MacBook, this will be  
the last
printer used. But that will not necessarily be the name of the  
currently
connected printer, if I have changed venues. I'm trying to find a  
way to
discover the name of the printer that is currently connected to the  
Mac. I
can do this with a rather complex handler I cobbled together if the  
the
printer is plugged in via USB, but I'm struggling to find a way of  
getting
the name of a printer that is currently connected wirelessly over  
an Airport

router. It turns out that neither lpstat nor lpq seem to do this.

Any further ideas? Anyone?

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig http://home.comcast.net/%7Epmbrig



On Oct 8, 2010, at 5:00 PM, J. Landman Gay wrote:

On 10/8/10 12:30 PM, Peter Brigham MD wrote:


The availablePrinters shows the list of printers you have named  
and have
drivers for -- it's what appears in the print dialog list, from  
which
you choose the printer you want to use. I want to know  
automatically
which printer my laptop is connected to at the moment so I can  
bypass

the print dialog entirely and send all printing to that printer.



Isn't that the printername?

--
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


___
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: shell command to identify wireless printer

2010-10-12 Thread Mike Bonner
-I is for information, just a command line switch, as you say, no part of
the filename.  airport -I (cap I)  make sure the space is there.
If you want to see the other switches, switch to that directory in terminal
manually run the command with the -h switch.
./airport -h
and it will show a short help listing. (can also do ./airport --help with
the double dash before help)
What error are you getting, and can you make it work from terminal?

Hmm, interesting. On my macbook it works great, fine, wonderful (snow
leopard). On my mac pro (leopard) I get an error when trying to use the -I
switch.

airport(7424) malloc: *** error for object 0x1053a0: double free
*** set a breakpoint in malloc_error_break to debug

Is that the error you get?  The main differences in my 2 machines is the OS,
leopard versus snow, and my mac pro is a wired connect no wireless hooked up
at all at the moment.

I'll see if I can find an alternate (reliable) way to get the current SSID.


On Tue, Oct 12, 2010 at 5:45 AM, Peter Brigham MD pmb...@gmail.com wrote:

 I can probably get this to work, since my handler already relies on asking
 the user once for the USB printer identification then storing it so the user
 never has to be asked again. If I can identify the wireless network I can
 associate a printer with it, store that printername, and then proceed.

 However, I don't understand much at all about command-line stuff. I ran
 put
 shell(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport-I)
 and I get an error. What command should I use to operate on this filepath?
 And what's the -I at the end? It's not part of the filename.


 -- Peter

 Peter M. Brigham
 pmb...@gmail.com
 http://home.comcast.net/~pmbrig http://home.comcast.net/%7Epmbrig


 On Oct 9, 2010, at 12:24 AM, Mike Bonner wrote:

  Can you come at it from a different direction?  Can you check current SSID
 against a printer list to select which printer you want? Assuming you
 always
 go to the same set of networks, this should have a similar affect yes?
  Set
 it up once, save the printer name, next time you need to print check the
 current ssid and select the appropriate printer name.

 YOu can get the current ssid with the following command line.


 /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
 -I

 MOre info than you need, but easy to parse.

 On Fri, Oct 8, 2010 at 9:51 PM, Peter Brigham MD pmb...@gmail.com
 wrote:

  The printername gives the name of the printer currently selected in the
 print dialog, ie, the default printer. On my MacBook, this will be the
 last
 printer used. But that will not necessarily be the name of the currently
 connected printer, if I have changed venues. I'm trying to find a way to
 discover the name of the printer that is currently connected to the Mac.
 I
 can do this with a rather complex handler I cobbled together if the the
 printer is plugged in via USB, but I'm struggling to find a way of
 getting
 the name of a printer that is currently connected wirelessly over an
 Airport
 router. It turns out that neither lpstat nor lpq seem to do this.

 Any further ideas? Anyone?

 -- Peter

 Peter M. Brigham
 pmb...@gmail.com
 http://home.comcast.net/~pmbrig http://home.comcast.net/%7Epmbrig 
 http://home.comcast.net/%7Epmbrig




 On Oct 8, 2010, at 5:00 PM, J. Landman Gay wrote:

 On 10/8/10 12:30 PM, Peter Brigham MD wrote:


  The availablePrinters shows the list of printers you have named and
 have
 drivers for -- it's what appears in the print dialog list, from which
 you choose the printer you want to use. I want to know automatically
 which printer my laptop is connected to at the moment so I can bypass
 the print dialog entirely and send all printing to that printer.


 Isn't that the printername?

 --
 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

  ___
 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:
 

Re: shell command to identify wireless printer

2010-10-12 Thread Mike Bonner
Ignore any duplicates that show up, forgot to clean up last message and its
being held for moderator approval, so don't know if they'll magically appear
or not. This email is easier to read anyway. I'm actually awake now!

Try this:
   get shell(cd /usr/sbin;system_profiler SPNetworkDataType |grep -i
signature)
   set the itemdel to =
   put the last item of it into yourplacetostoreit

It grabs the hardware signature of the router and splits out the last item
which is the routers mac address. Should be a more reliable method of
tagging what network you're on. SSID may not be unique since so many people
never change the default.

This should work for wired or wireless.

I don't know how likely it is you'll have more than one valid connection at
a time, if its a possibility for you, might consider testing it to see if it
contains more than one line.

Also running virtual machines could throw this off I guess, but it shouldn't
be too bad to get a handle on things.

If nothing else, don't split off the mac address and use the entire result
as your matching text.  If there IS more than 1 valid result, and you do use
the entire thing as your match text, also might consider a sort since I
can't test if system_profiler always lists in the exact same order.
___
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: shell command to identify wireless printer

2010-10-12 Thread Peter Brigham MD

On Oct 12, 2010, at 10:17 AM, Mike Bonner wrote:

Ignore any duplicates that show up, forgot to clean up last message  
and its
being held for moderator approval, so don't know if they'll  
magically appear

or not. This email is easier to read anyway. I'm actually awake now!

Try this:
  get shell(cd /usr/sbin;system_profiler SPNetworkDataType |grep -i
signature)
  set the itemdel to =
  put the last item of it into yourplacetostoreit

It grabs the hardware signature of the router and splits out the  
last item

which is the routers mac address. Should be a more reliable method of
tagging what network you're on. SSID may not be unique since so many  
people

never change the default.

This should work for wired or wireless.


Thanks, I'll experiment with that.

I don't know how likely it is you'll have more than one valid  
connection at
a time, if its a possibility for you, might consider testing it to  
see if it

contains more than one line.

Also running virtual machines could throw this off I guess, but it  
shouldn't

be too bad to get a handle on things.

If nothing else, don't split off the mac address and use the entire  
result
as your matching text.  If there IS more than 1 valid result, and  
you do use
the entire thing as your match text, also might consider a sort  
since I

can't test if system_profiler always lists in the exact same order.


-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig



___
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: shell command to identify wireless printer

2010-10-08 Thread Peter Brigham MD
The availablePrinters shows the list of printers you have named and  
have drivers for -- it's what appears in the print dialog list, from  
which you choose the printer you want to use. I want to know  
automatically which printer my laptop is connected to at the moment so  
I can bypass the print dialog entirely and send all printing to that  
printer. I have a handler that detects which printer I'm plugged into  
using USB and sets the printer to that automatically, but I'm trying  
to expand it to include connected wireless printers on the network.


I think this capability should ideally be built into the OS for all  
laptops -- I can't be the only one who uses my laptop with different  
printers in different locations. Having to choose the proper printer  
every time I change venues should be unnecessary, it should be pretty  
easy for the system to do it for me, at least as an option in the  
printing preferences. In the absence of a system fix, I can at least  
build it into my Rev (er, LiveCode) projects.


-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


On Oct 8, 2010, at 1:58 AM, Dar Scott wrote:

Does 'the availablePrinters' in LiveCode provide anything useful?   
Maybe its name give some indication that it is connected wirelessly.


Dar Scott

On Oct 7, 2010, at 4:12 PM, Peter Brigham MD wrote:

I'm looking for the shell command that would include in its output  
something that would identify a printer that is currently  
wirelessly connected to my MacBook. I can use shell(ioreg) to get  
info on a printer connected via USB (after some parsing), but my  
wireless printer connection doesn't show up in the ioreg listing.  
What command can I use to see how the system identifies a wireless  
printer? I need to be able to confirm before printing from a stack  
that the wireless connection to the printer is up and running.


If it matters, the wireless connection is not a Bonjour connection  
-- it's a PC wireless network. I can print fine using the printer,  
so the connection is good, and functional.


-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig
___
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


___
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: shell command to identify wireless printer

2010-10-08 Thread J. Landman Gay

On 10/8/10 12:30 PM, Peter Brigham MD wrote:

The availablePrinters shows the list of printers you have named and have
drivers for -- it's what appears in the print dialog list, from which
you choose the printer you want to use. I want to know automatically
which printer my laptop is connected to at the moment so I can bypass
the print dialog entirely and send all printing to that printer.


Isn't that the printername?

--
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


Re: shell command to identify wireless printer

2010-10-08 Thread Peter Brigham MD
The printername gives the name of the printer currently selected in  
the print dialog, ie, the default printer. On my MacBook, this will be  
the last printer used. But that will not necessarily be the name of  
the currently connected printer, if I have changed venues. I'm trying  
to find a way to discover the name of the printer that is currently  
connected to the Mac. I can do this with a rather complex handler I  
cobbled together if the the printer is plugged in via USB, but I'm  
struggling to find a way of getting the name of a printer that is  
currently connected wirelessly over an Airport router. It turns out  
that neither lpstat nor lpq seem to do this.


Any further ideas? Anyone?

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig



On Oct 8, 2010, at 5:00 PM, J. Landman Gay wrote:


On 10/8/10 12:30 PM, Peter Brigham MD wrote:
The availablePrinters shows the list of printers you have named and  
have

drivers for -- it's what appears in the print dialog list, from which
you choose the printer you want to use. I want to know automatically
which printer my laptop is connected to at the moment so I can bypass
the print dialog entirely and send all printing to that printer.


Isn't that the printername?

--
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: shell command to identify wireless printer

2010-10-08 Thread Mike Bonner
Can you come at it from a different direction?  Can you check current SSID
against a printer list to select which printer you want? Assuming you always
go to the same set of networks, this should have a similar affect yes?  Set
it up once, save the printer name, next time you need to print check the
current ssid and select the appropriate printer name.

YOu can get the current ssid with the following command line.

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
-I

MOre info than you need, but easy to parse.

On Fri, Oct 8, 2010 at 9:51 PM, Peter Brigham MD pmb...@gmail.com wrote:

 The printername gives the name of the printer currently selected in the
 print dialog, ie, the default printer. On my MacBook, this will be the last
 printer used. But that will not necessarily be the name of the currently
 connected printer, if I have changed venues. I'm trying to find a way to
 discover the name of the printer that is currently connected to the Mac. I
 can do this with a rather complex handler I cobbled together if the the
 printer is plugged in via USB, but I'm struggling to find a way of getting
 the name of a printer that is currently connected wirelessly over an Airport
 router. It turns out that neither lpstat nor lpq seem to do this.

 Any further ideas? Anyone?

 -- Peter

 Peter M. Brigham
 pmb...@gmail.com
 http://home.comcast.net/~pmbrig http://home.comcast.net/%7Epmbrig



 On Oct 8, 2010, at 5:00 PM, J. Landman Gay wrote:

  On 10/8/10 12:30 PM, Peter Brigham MD wrote:

 The availablePrinters shows the list of printers you have named and have
 drivers for -- it's what appears in the print dialog list, from which
 you choose the printer you want to use. I want to know automatically
 which printer my laptop is connected to at the moment so I can bypass
 the print dialog entirely and send all printing to that printer.


 Isn't that the printername?

 --
 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

___
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: shell command to identify wireless printer

2010-10-07 Thread Mike Bonner
lpq should do what you want.  Will show all print queues and their status
for example, my wireless printer returns

_3500_4500_Series_MAC:002000148b45 is ready
no entries

no entries of course meaning that there are no queued documents. I didn't
try shutting my printer down to see if the status would change though, so
your mileage may vary.

On Thu, Oct 7, 2010 at 4:12 PM, Peter Brigham MD pmb...@gmail.com wrote:

 I'm looking for the shell command that would include in its output
 something that would identify a printer that is currently wirelessly
 connected to my MacBook. I can use shell(ioreg) to get info on a printer
 connected via USB (after some parsing), but my wireless printer connection
 doesn't show up in the ioreg listing. What command can I use to see how the
 system identifies a wireless printer? I need to be able to confirm before
 printing from a stack that the wireless connection to the printer is up and
 running.

 If it matters, the wireless connection is not a Bonjour connection -- it's
 a PC wireless network. I can print fine using the printer, so the connection
 is good, and functional.

 -- Peter

 Peter M. Brigham
 pmb...@gmail.com
 http://home.comcast.net/~pmbrig http://home.comcast.net/%7Epmbrig
 ___
 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: shell command to identify wireless printer

2010-10-07 Thread Peter Brigham MD
lpq I'm not sure of -- it gives some odd output here with my home  
wireless printer. But a search sent me in the direction of lpstat,  
which looks promising. I'll test it out in the next few days. Thanks


-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig


On Oct 7, 2010, at 6:21 PM, Mike Bonner wrote:

lpq should do what you want.  Will show all print queues and their  
status

for example, my wireless printer returns

_3500_4500_Series_MAC:002000148b45 is ready
no entries

no entries of course meaning that there are no queued documents. I  
didn't
try shutting my printer down to see if the status would change  
though, so

your mileage may vary.

On Thu, Oct 7, 2010 at 4:12 PM, Peter Brigham MD pmb...@gmail.com  
wrote:



I'm looking for the shell command that would include in its output
something that would identify a printer that is currently wirelessly
connected to my MacBook. I can use shell(ioreg) to get info on a  
printer
connected via USB (after some parsing), but my wireless printer  
connection
doesn't show up in the ioreg listing. What command can I use to see  
how the
system identifies a wireless printer? I need to be able to confirm  
before
printing from a stack that the wireless connection to the printer  
is up and

running.

If it matters, the wireless connection is not a Bonjour connection  
-- it's
a PC wireless network. I can print fine using the printer, so the  
connection

is good, and functional.

-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig http://home.comcast.net/%7Epmbrig
___
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


___
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: shell command to identify wireless printer

2010-10-07 Thread Dar Scott
Does 'the availablePrinters' in LiveCode provide anything useful?   
Maybe its name give some indication that it is connected wirelessly.


Dar Scott

On Oct 7, 2010, at 4:12 PM, Peter Brigham MD wrote:

I'm looking for the shell command that would include in its output  
something that would identify a printer that is currently  
wirelessly connected to my MacBook. I can use shell(ioreg) to get  
info on a printer connected via USB (after some parsing), but my  
wireless printer connection doesn't show up in the ioreg listing.  
What command can I use to see how the system identifies a wireless  
printer? I need to be able to confirm before printing from a stack  
that the wireless connection to the printer is up and running.


If it matters, the wireless connection is not a Bonjour connection  
-- it's a PC wireless network. I can print fine using the printer,  
so the connection is good, and functional.


-- Peter

Peter M. Brigham
pmb...@gmail.com
http://home.comcast.net/~pmbrig
___
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: Shell command return 255

2010-06-23 Thread Ken Ray


 How to know from where the command is executed. In terminal put which
 command, and we get the entire path to the command.
 To test from the shell /bin/sh into the Terminal. Put /bin/sh and press
 enter. Now we are in the same shell that is called from shell and from Rev.
 Test your command here, if here is ok, copy the commandline and exec from
 Rev. Put exit to return to your normal shell into the Terminal.

That's great to know, Josep... thanks!


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


Re: Shell command return 255

2010-06-20 Thread JosepM

Hi,

Reply myself... and explain a little so I think can be usefully for
others...

The solution is that we must specify from where we want exec the command.

MacOSX Shell execute by default from the shell /bin/sh, that isn't the
shell from the Terminal, so testing commandlines from the terminal that
produces correct results, from the shell can produce error.

How to know from where the command is executed. In terminal put which
command, and we get the entire path to the command.
To test from the shell /bin/sh into the Terminal. Put /bin/sh and press
enter. Now we are in the same shell that is called from shell and from Rev.
Test your command here, if here is ok, copy the commandline and exec from
Rev. Put exit to return to your normal shell into the Terminal.

In my case the correct commandline for exec from /bin/sh.

put (/usr/local/bin/dot -Tjpg -o /users/jos/desktop/graph.jpg
/users/jos/desktop/test01.dot) into tCommand

Shell in Rev return the exit code into the Result and the error message
into the it. Checking both you can view the error code and error message.
But if you specify a incorrect path the shell, then return empty and no
action success, while testing the same commandline into the Terminal shell,
can produce a correct result, confusing yourself. :)
 

Salut,
Josep
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Shell-command-return-255-tp2262032p2262051.html
Sent from the Revolution - User mailing list archive at Nabble.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


Re: Shell Command with Sudo

2010-06-13 Thread Peter Alcibiades


Richmond Mathewson-2 wrote:
 
 
 This is all very charming, but I wonder how one would
 effect this from a standalone on an end-user's machine . . .  :)
 
 

You'd have to write an install or first use shell script.  Get the user,
then the root password, then write an extra line to /etc/sudoers.  The
advantage, though it will not matter to many, is that you don't store the
password in the app and don't have to supply it at each use of the commands,
and that you have restricted your privileges to one named user and one
variant of one command.  

Justin's solution is very nice, agreed.  Probably more practical and
certainly easier to do.  But, you do end up storing the password, and what
commands can be executed is not limited, nor is which user limited.  

Or maybe this is wrong?  That is what the effect, I think, would be on
Debian, which ships without sudo built in.  Maybe these distros that ship
with sudo are preconfigured to allow any user to sudo with their own login
password?  In which case they can do sudo su -?  I don't much like that idea
either, that cannot be surely?

-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Shell-Command-with-Sudo-tp2251593p2253279.html
Sent from the Revolution - User mailing list archive at Nabble.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


Re: Shell Command with Sudo

2010-06-12 Thread Justin Sloan
Thanks to all who replied. With you help and some additional research
I came up with a solution.

Mac OS X bash shell only allows results from commands to be piped in
to another command, including sudo, not plain text. The solution is to
set a bash variable (pw=password) and echo the variable to pipe it
into sudo (echo $pw | sudo -S command). In Rev you must set the
variable and pipe it in on the same shell() call. Like this:

shell(pw=  tPassword  ; echo $pw | sudo -S command)

Works like a charm, and it's an elegant solution without a lot of
hashed code. I have not tested this on other Unix based systems but
the command should work on any system with bash as the default shell.


Happy coding!
 - Justin


On Fri, Jun 11, 2010 at 6:51 PM, David Bovill da...@vaudevillecourt.tv wrote:
 Don't think expect is the right way to do this - best would be to use an ssh
 key (seem to remember that is how I used to do this back when i was on Linux
 with Metacard), or else to write a bash script as a text file and then get
 rev to execute that.

 On 11 June 2010 16:33, Andre Garzia an...@andregarzia.com wrote:

 Justin,

 I always though you could not pipe passwords into sudo. One way to do this
 kind of stuff is to use the expect tool.

 http://expect.sourceforge.net/

 With expect you can automate many command line things.

 ___
 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: Shell Command with Sudo

2010-06-12 Thread Peter Alcibiades

Is there a reason you cannot use the NOPASSWD option in sudo?  Maybe this is
not how it works in OSX, but what you'd normally do is to edit /etc/sudoers
to allow this particular user to perform this particular command with the no
password option, and its done.  If you do this, the command can be limited
to one with specific options.  For instance, you can allow shutdown with the
-h option, but not the -r option.  No-one has to know the root password then
and it is not written anyplace.  Yes, you do have to know it to edit
/etc/sudoers.
-- 
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Shell-Command-with-Sudo-tp2251593p2252593.html
Sent from the Revolution - User mailing list archive at Nabble.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


Re: Shell Command with Sudo

2010-06-12 Thread Richmond

On 06/12/2010 12:08 PM, Peter Alcibiades wrote:

Is there a reason you cannot use the NOPASSWD option in sudo?  Maybe this is
not how it works in OSX, but what you'd normally do is to edit /etc/sudoers
to allow this particular user to perform this particular command with the no
password option, and its done.  If you do this, the command can be limited
to one with specific options.  For instance, you can allow shutdown with the
-h option, but not the -r option.  No-one has to know the root password then
and it is not written anyplace.  Yes, you do have to know it to edit
/etc/sudoers.
   


This is all very charming, but I wonder how one would
effect this from a standalone on an end-user's machine . . .  :)
___
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: Shell Command with Sudo

2010-06-12 Thread Justin Sloan
Peter,

That is a good suggestion if the application was not meant for mass
deployment. Otherwise each machine's sudoers file would have to be
edited accordingly, which would be a bummer for users that do not know
how to do so. And that is likely the majority of Mac users. I would
venture to say that the majority of Mac users never even opened the
Terminal.

The solution is elegant, I believe, in that it will work on any Mac OS
X machine and takes advantage of Bash' s flexibility with Rev's shell
structure.

Happy coding!
 - Justin


On Sat, Jun 12, 2010 at 12:11 PM, Richmond richmondmathew...@gmail.com wrote:
 On 06/12/2010 12:08 PM, Peter Alcibiades wrote:

 Is there a reason you cannot use the NOPASSWD option in sudo?  Maybe this
 is
 not how it works in OSX, but what you'd normally do is to edit
 /etc/sudoers
 to allow this particular user to perform this particular command with the
 no
 password option, and its done.  If you do this, the command can be limited
 to one with specific options.  For instance, you can allow shutdown with
 the
 -h option, but not the -r option.  No-one has to know the root password
 then
 and it is not written anyplace.  Yes, you do have to know it to edit
 /etc/sudoers.


 This is all very charming, but I wonder how one would
 effect this from a standalone on an end-user's machine . . .  :)
 ___
 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: Shell Command with Sudo

2010-06-11 Thread Jim Sims

On Jun 11, 2010, at 12:35 PM, Justin Sloan wrote:

 Hello All,
 
 I am trying to run a shell() command in revStudio in order to execute some 
 terminal commands as the superuser on a Mac. An Ubuntu terminal will accept 
 the superuser password using a pipe, such as pass | sudo -S command, but 
 Mac's terminal will not accept the password on the same line.
 
 Is there a way to run multiple commands from a single rev shell() call? Or, 
 can I somehow followup a shell() call with the password?

I went to  http://www.mail-archive.com/use-revolution@lists.runrev.com/info.html
In the search field I put:multiple shell commands os x

It returned a few items that might be of help for you, at least worth a try:

---
As an alternative solution, one could use multiple shell commands
separated by a semi-colon:

get shell(cd /etc/ ; ls)
---
atb,
sims



___
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: Shell Command with Sudo

2010-06-11 Thread Andre Garzia
Justin,

I always though you could not pipe passwords into sudo. One way to do this
kind of stuff is to use the expect tool.

http://expect.sourceforge.net/

With expect you can automate many command line things.

HTH

Andre

On Fri, Jun 11, 2010 at 7:35 AM, Justin Sloan sloan.jus...@gmail.comwrote:

 Hello All,

 I am trying to run a shell() command in revStudio in order to execute some
 terminal commands as the superuser on a Mac. An Ubuntu terminal will accept
 the superuser password using a pipe, such as pass | sudo -S command, but
 Mac's terminal will not accept the password on the same line.

 Is there a way to run multiple commands from a single rev shell() call? Or,
 can I somehow followup a shell() call with the password?

 Thanks,

 Justin___
 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




-- 
http://www.andregarzia.com All We Do Is Code.
___
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: Shell Command with Sudo

2010-06-11 Thread David Bovill
Don't think expect is the right way to do this - best would be to use an ssh
key (seem to remember that is how I used to do this back when i was on Linux
with Metacard), or else to write a bash script as a text file and then get
rev to execute that.

On 11 June 2010 16:33, Andre Garzia an...@andregarzia.com wrote:

 Justin,

 I always though you could not pipe passwords into sudo. One way to do this
 kind of stuff is to use the expect tool.

 http://expect.sourceforge.net/

 With expect you can automate many command line things.

___
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: shell in RevMedia

2010-03-22 Thread Peter Alcibiades

It works fine in Linux.  I tried

   put shell(ls)

and it supplied a file listing of the directory.

Peter
-- 
View this message in context: 
http://n4.nabble.com/shell-in-RevMedia-tp1678302p1678621.html
Sent from the Revolution - User mailing list archive at Nabble.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


Re: shell

2010-01-20 Thread Hershel Fisch
Thanks, but the link is dead.
Hershel


On 1/18/10 6:36 PM, Alex Tweedly a...@tweedly.net wrote:

 stephen barncard wrote:
 My info was taken from an old Nabble forum were Alex offered his stack. It
 doesn't seem to be on his site or Rev Online anymore - perhaps you could
 write him.
   
 They were on the old RevOnline (pre Rev 3.0). I had some problems
 getting stacks on the new RevOnline, but will try again soon.
 
 In the meantime, you can find them at
 
 http://www.tweedly.org/UDP echo server - released.rev
 http://www.tweedly.org/UDP echo client - released.rev
 
 (please do not look at anything else on that web site. under
 construction wouldn't even begin to describe it ...).
 
 -- Alex.
 ___
 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: shell

2010-01-20 Thread Alex Tweedly

Hershel Fisch wrote:

Thanks, but the link is dead.
Hershel

  
Most likely it is (as Stephen warned) a problem due to my poor choice of 
file name - the spaces confuse automatic link-clicking. Copy/paste the 
whole URL (from http: ... all the way to ... .rev) and see if that fixes 
it (it does for me).


Sorry for the inconvenience, I'll pick better names next time.
-- Alex.

___
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: shell

2010-01-20 Thread stephen barncard
I got it to work by pasting the whole thing into the adr line of a browser
and it filled in the appropriate URLEncoding (as browsers for some time have
done)
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/20 Alex Tweedly a...@tweedly.net

 Hershel Fisch wrote:

 Thanks, but the link is dead.
 Hershel



 Most likely it is (as Stephen warned) a problem due to my poor choice of
 file name - the spaces confuse automatic link-clicking. Copy/paste the whole
 URL (from http: ... all the way to ... .rev) and see if that fixes it (it
 does for me).

 Sorry for the inconvenience, I'll pick better names next time.

 -- Alex.

 ___
 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: shell

2010-01-19 Thread Luis

He he.. U is for User...

The protocol is is 'Unreliable' in the sense that there is very  
little in the way of guaranteeing data integrity, more like a shotgun  
approach to data transmission.
It relieves some of the TCP overhead which is why some online games  
use UDP instead of TCP to reduce latency. Any occasional hiccup is  
tolerated by the User.


Cheers,

Luis.


On 18 Jan 2010, at 20:18, Andre Garzia wrote:


be aware of the U in UDP... it means unreliable.

Is there any reason for UDP and not TCP?

(PS: haven't read the previous thread, I am just saying that  
because last
time I coded with UDP I ended up having some very interesting  
experience

with duplicated datagrams and dropped datagrams)

On Mon, Jan 18, 2010 at 6:13 PM, stephen barncard 
stephenrevoluti...@barncard.com wrote:


Alex Tweedly has a sample UDP (datagram) stack at Rev Online
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/18 Hershel Fisch hersh...@syp2u4c.com

Hi, after knocking my head against the wall I decided to try to  
go via
sockets, but I have some misunderstandings for unpredicted  
behavior, now

my

questions if somebody could give a full statement example?
Thanks, Hershel


On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:


Hi Herschel,

I am unfamiliar with Hylafax.  I don't think shell is going to  
cut

it for your needs.  What you may need is open process, write to
process and read from process.  Open process is kind of like
opening a non-visible terminal, where the state of the program  
opened
as a process persists throughout your read/write interactions  
with it.


If you have a CLI client for hylafax for OS X  Windows, then  
you can
use that as the process to open.  If the only CLI client you  
have for
hylafax is on the server, then you will need to run remote  
sessions to

the server.  On OS X you could try 'talking' to the remote hylafax
client via ssh opened via open process.  If that works, you've  
got a

start.  On Windows you would then have to use something like plink
(part of the Putty suite of ssh programs for windows).

A final option might be to use the Expect program locally to  
talk to
the remote hylafax client.  I have never used Expect, but I  
imagine it

would be more complex to use than open process + ssh.

It's going to be convoluted, but it might work.

Bernard

On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch  
hersh...@syp2u4c.com

wrote:

My server is FreeBSD or OSX, Client is OSX and Win.


What is the problem with writing multiple arguments?  Do you mean
multiple successive shell commands, or multiple arguments to one
program?


I want to write a GUI to connect to the server. Now I see in  
Rev, when

a
shell command is issued its sent and returns the prompt, if I  
need to
respond to that prompt then it issues a different shell session  
and

not

a
continuation of the previous one, e.g. I want to connect to a  
server

or

change user, put shell(su - userABC) it returns password that

means

that

it wants a password to continue now where and who can I provide a

password
it should continue the current session? In terminal I just type  
it in

and

its done.

___
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


___
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





--
http://www.andregarzia.com All We Do Is Code.
___
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: shell

2010-01-19 Thread Jim Ault
OK, it has been said that I would chime in at some point, and so here  
it is.


I use UDP for several networking configurations, now and in the past.
The computers in one configuration were located in Las Vegas, New  
York, London, and Vancouver BC.

Another configuration is mostly West Coast USA.

I have seen virtually no packet loss or corruption using Rev stacks  
and apps that I have written over the last 4 years.  The apps run  
cross platform, on the same and different networks.  I am always  
sending data files that have to be accurate.


The reason for this reliability... I crafted ACK loops, resend logic,  
socket management,  plus multi-part data packet routines.
This means that each packet is acknowledged and resent until success,  
then the next packet is sent.  This way all packets arrive in the same  
sequence as the originating data source. Using UDP is so fast that I  
rarely detect transmission failures ( I write log files ) and that is  
usually do to ISP or internet down times.


UDP is so fast that using the ACK loops is still many times faster  
than TCP.


I also have designed code loops that recover from any socket errors  
that would stop operation, thus avoiding manually requesting that the  
operating system reset sockets.


Another essential routine that is called at the end of all socket  
operations is killOpenSockets to reduce the number of open sockets  
to less than 20.  The reason this is important is that sockets are  
controlled by the operating system, such as Win XP.  There are lots of  
high-numbered sockets (eg. 34221, 56449) that are opened simply by  
using UDP or TCP.  If more than 50 are left open the operating system  
does sockets more and more slowly, making it almost impossible to keep  
repeat loops from becoming infinite.


One last bit of caution needs to be taken. You need to measure the  
limitations of the networking equipment and computers.  Routing  
traffic means that you need to measure the maximum packet size that  
will flow through the network, then subtract about 20% for reliability  
insurance.  Now you send packets at or below that maximum, using multi- 
part packet sizing if necessary.  I have found that 8K-20% (yes, very  
small) works for me.


Vonage and Skype don't need to resend packets except for the voice and  
audio, but do for the user data, etc.


Hope this helps someone.

Jim Ault
Las Vegas
___
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: shell

2010-01-19 Thread Bernard Devlin
Thanks, Jim.  Very interesting reading.

Bernard

On Tue, Jan 19, 2010 at 10:37 AM, Jim Ault jimaultw...@yahoo.com wrote:
 OK, it has been said that I would chime in at some point, and so here it is.
___
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: shell

2010-01-18 Thread Hershel Fisch
Hi, after knocking my head against the wall I decided to try to go via
sockets, but I have some misunderstandings for unpredicted behavior, now my
questions if somebody could give a full statement example?
Thanks, Hershel


On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:

 Hi Herschel,
 
 I am unfamiliar with Hylafax.  I don't think shell is going to cut
 it for your needs.  What you may need is open process, write to
 process and read from process.  Open process is kind of like
 opening a non-visible terminal, where the state of the program opened
 as a process persists throughout your read/write interactions with it.
 
 If you have a CLI client for hylafax for OS X  Windows, then you can
 use that as the process to open.  If the only CLI client you have for
 hylafax is on the server, then you will need to run remote sessions to
 the server.  On OS X you could try 'talking' to the remote hylafax
 client via ssh opened via open process.  If that works, you've got a
 start.  On Windows you would then have to use something like plink
 (part of the Putty suite of ssh programs for windows).
 
 A final option might be to use the Expect program locally to talk to
 the remote hylafax client.  I have never used Expect, but I imagine it
 would be more complex to use than open process + ssh.
 
 It's going to be convoluted, but it might work.
 
 Bernard
 
 On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com wrote:
 My server is FreeBSD or OSX, Client is OSX and Win.
 
 What is the problem with writing multiple arguments?  Do you mean
 multiple successive shell commands, or multiple arguments to one
 program?
 
 I want to write a GUI to connect to the server. Now I see in Rev, when a
 shell command is issued its sent and returns the prompt, if I need to
 respond to that prompt then it issues a different shell session and not a
 continuation of the previous one, e.g. I want to connect to a server or
 change user, put shell(su - userABC) it returns password that means that
 it wants a password to continue now where and who can I provide a password
 it should continue the current session? In terminal I just type it in and
 its done.
 ___
 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: shell

2010-01-18 Thread stephen barncard
Alex Tweedly has a sample UDP (datagram) stack at Rev Online
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/18 Hershel Fisch hersh...@syp2u4c.com

 Hi, after knocking my head against the wall I decided to try to go via
 sockets, but I have some misunderstandings for unpredicted behavior, now my
 questions if somebody could give a full statement example?
 Thanks, Hershel


 On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:

  Hi Herschel,
 
  I am unfamiliar with Hylafax.  I don't think shell is going to cut
  it for your needs.  What you may need is open process, write to
  process and read from process.  Open process is kind of like
  opening a non-visible terminal, where the state of the program opened
  as a process persists throughout your read/write interactions with it.
 
  If you have a CLI client for hylafax for OS X  Windows, then you can
  use that as the process to open.  If the only CLI client you have for
  hylafax is on the server, then you will need to run remote sessions to
  the server.  On OS X you could try 'talking' to the remote hylafax
  client via ssh opened via open process.  If that works, you've got a
  start.  On Windows you would then have to use something like plink
  (part of the Putty suite of ssh programs for windows).
 
  A final option might be to use the Expect program locally to talk to
  the remote hylafax client.  I have never used Expect, but I imagine it
  would be more complex to use than open process + ssh.
 
  It's going to be convoluted, but it might work.
 
  Bernard
 
  On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com
 wrote:
  My server is FreeBSD or OSX, Client is OSX and Win.
 
  What is the problem with writing multiple arguments?  Do you mean
  multiple successive shell commands, or multiple arguments to one
  program?
 
  I want to write a GUI to connect to the server. Now I see in Rev, when a
  shell command is issued its sent and returns the prompt, if I need to
  respond to that prompt then it issues a different shell session and not
 a
  continuation of the previous one, e.g. I want to connect to a server or
  change user, put shell(su - userABC) it returns password that means
 that
  it wants a password to continue now where and who can I provide a
 password
  it should continue the current session? In terminal I just type it in
 and
  its done.
  ___
  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

___
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: shell

2010-01-18 Thread Andre Garzia
be aware of the U in UDP... it means unreliable.

Is there any reason for UDP and not TCP?

(PS: haven't read the previous thread, I am just saying that because last
time I coded with UDP I ended up having some very interesting experience
with duplicated datagrams and dropped datagrams)

On Mon, Jan 18, 2010 at 6:13 PM, stephen barncard 
stephenrevoluti...@barncard.com wrote:

 Alex Tweedly has a sample UDP (datagram) stack at Rev Online
 -
 Stephen Barncard
 San Francisco
 http://houseofcubes.com/disco.irev


 2010/1/18 Hershel Fisch hersh...@syp2u4c.com

  Hi, after knocking my head against the wall I decided to try to go via
  sockets, but I have some misunderstandings for unpredicted behavior, now
 my
  questions if somebody could give a full statement example?
  Thanks, Hershel
 
 
  On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:
 
   Hi Herschel,
  
   I am unfamiliar with Hylafax.  I don't think shell is going to cut
   it for your needs.  What you may need is open process, write to
   process and read from process.  Open process is kind of like
   opening a non-visible terminal, where the state of the program opened
   as a process persists throughout your read/write interactions with it.
  
   If you have a CLI client for hylafax for OS X  Windows, then you can
   use that as the process to open.  If the only CLI client you have for
   hylafax is on the server, then you will need to run remote sessions to
   the server.  On OS X you could try 'talking' to the remote hylafax
   client via ssh opened via open process.  If that works, you've got a
   start.  On Windows you would then have to use something like plink
   (part of the Putty suite of ssh programs for windows).
  
   A final option might be to use the Expect program locally to talk to
   the remote hylafax client.  I have never used Expect, but I imagine it
   would be more complex to use than open process + ssh.
  
   It's going to be convoluted, but it might work.
  
   Bernard
  
   On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com
  wrote:
   My server is FreeBSD or OSX, Client is OSX and Win.
  
   What is the problem with writing multiple arguments?  Do you mean
   multiple successive shell commands, or multiple arguments to one
   program?
  
   I want to write a GUI to connect to the server. Now I see in Rev, when
 a
   shell command is issued its sent and returns the prompt, if I need to
   respond to that prompt then it issues a different shell session and
 not
  a
   continuation of the previous one, e.g. I want to connect to a server
 or
   change user, put shell(su - userABC) it returns password that
 means
  that
   it wants a password to continue now where and who can I provide a
  password
   it should continue the current session? In terminal I just type it in
  and
   its done.
   ___
   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
 
 ___
 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




-- 
http://www.andregarzia.com All We Do Is Code.
___
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: shell

2010-01-18 Thread stephen barncard
I'm sure we will hear from Jim Ault soon about this -- he's been working
recently with both TCP and UDP packets.
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/18 Andre Garzia an...@andregarzia.com

 be aware of the U in UDP... it means unreliable.

 Is there any reason for UDP and not TCP?

 (PS: haven't read the previous thread, I am just saying that because last
 time I coded with UDP I ended up having some very interesting experience
 with duplicated datagrams and dropped datagrams)

 On Mon, Jan 18, 2010 at 6:13 PM, stephen barncard 
 stephenrevoluti...@barncard.com wrote:

  Alex Tweedly has a sample UDP (datagram) stack at Rev Online
  -
  Stephen Barncard
  San Francisco
  http://houseofcubes.com/disco.irev
 
 
  2010/1/18 Hershel Fisch hersh...@syp2u4c.com
 
   Hi, after knocking my head against the wall I decided to try to go via
   sockets, but I have some misunderstandings for unpredicted behavior,
 now
  my
   questions if somebody could give a full statement example?
   Thanks, Hershel
  
  
   On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:
  
Hi Herschel,
   
I am unfamiliar with Hylafax.  I don't think shell is going to cut
it for your needs.  What you may need is open process, write to
process and read from process.  Open process is kind of like
opening a non-visible terminal, where the state of the program opened
as a process persists throughout your read/write interactions with
 it.
   
If you have a CLI client for hylafax for OS X  Windows, then you can
use that as the process to open.  If the only CLI client you have for
hylafax is on the server, then you will need to run remote sessions
 to
the server.  On OS X you could try 'talking' to the remote hylafax
client via ssh opened via open process.  If that works, you've got
 a
start.  On Windows you would then have to use something like plink
(part of the Putty suite of ssh programs for windows).
   
A final option might be to use the Expect program locally to talk to
the remote hylafax client.  I have never used Expect, but I imagine
 it
would be more complex to use than open process + ssh.
   
It's going to be convoluted, but it might work.
   
Bernard
   
On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com
   wrote:
My server is FreeBSD or OSX, Client is OSX and Win.
   
What is the problem with writing multiple arguments?  Do you mean
multiple successive shell commands, or multiple arguments to one
program?
   
I want to write a GUI to connect to the server. Now I see in Rev,
 when
  a
shell command is issued its sent and returns the prompt, if I need
 to
respond to that prompt then it issues a different shell session and
  not
   a
continuation of the previous one, e.g. I want to connect to a server
  or
change user, put shell(su - userABC) it returns password that
  means
   that
it wants a password to continue now where and who can I provide a
   password
it should continue the current session? In terminal I just type it
 in
   and
its done.
___
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
  
  ___
  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
 



 --
 http://www.andregarzia.com All We Do Is Code.
 ___
 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: shell

2010-01-18 Thread stephen barncard
By the way, Skype uses UDP
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/18 stephen barncard stephenrevoluti...@barncard.com

 I'm sure we will hear from Jim Ault soon about this -- he's been working
 recently with both TCP and UDP packets.

 -
 Stephen Barncard
 San Francisco
 http://houseofcubes.com/disco.irev


 2010/1/18 Andre Garzia an...@andregarzia.com

 be aware of the U in UDP... it means unreliable.

 Is there any reason for UDP and not TCP?

 (PS: haven't read the previous thread, I am just saying that because last
 time I coded with UDP I ended up having some very interesting experience
 with duplicated datagrams and dropped datagrams)

 On Mon, Jan 18, 2010 at 6:13 PM, stephen barncard 
 stephenrevoluti...@barncard.com wrote:

  Alex Tweedly has a sample UDP (datagram) stack at Rev Online
  -
  Stephen Barncard
  San Francisco
  http://houseofcubes.com/disco.irev
 
 
  2010/1/18 Hershel Fisch hersh...@syp2u4c.com
 
   Hi, after knocking my head against the wall I decided to try to go via
   sockets, but I have some misunderstandings for unpredicted behavior,
 now
  my
   questions if somebody could give a full statement example?
   Thanks, Hershel
  
  
   On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:
  
Hi Herschel,
   
I am unfamiliar with Hylafax.  I don't think shell is going to cut
it for your needs.  What you may need is open process, write to
process and read from process.  Open process is kind of like
opening a non-visible terminal, where the state of the program
 opened
as a process persists throughout your read/write interactions with
 it.
   
If you have a CLI client for hylafax for OS X  Windows, then you
 can
use that as the process to open.  If the only CLI client you have
 for
hylafax is on the server, then you will need to run remote sessions
 to
the server.  On OS X you could try 'talking' to the remote hylafax
client via ssh opened via open process.  If that works, you've got
 a
start.  On Windows you would then have to use something like plink
(part of the Putty suite of ssh programs for windows).
   
A final option might be to use the Expect program locally to talk to
the remote hylafax client.  I have never used Expect, but I imagine
 it
would be more complex to use than open process + ssh.
   
It's going to be convoluted, but it might work.
   
Bernard
   
On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com
 
   wrote:
My server is FreeBSD or OSX, Client is OSX and Win.
   
What is the problem with writing multiple arguments?  Do you mean
multiple successive shell commands, or multiple arguments to one
program?
   
I want to write a GUI to connect to the server. Now I see in Rev,
 when
  a
shell command is issued its sent and returns the prompt, if I need
 to
respond to that prompt then it issues a different shell session and
  not
   a
continuation of the previous one, e.g. I want to connect to a
 server
  or
change user, put shell(su - userABC) it returns password that
  means
   that
it wants a password to continue now where and who can I provide a
   password
it should continue the current session? In terminal I just type it
 in
   and
its done.
___
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
  
  ___
  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
 



 --
 http://www.andregarzia.com All We Do Is Code.
 ___
 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: shell

2010-01-18 Thread Jim Sims

On Jan 18, 2010, at 9:18 PM, Andre Garzia wrote:

 be aware of the U in UDP... it means unreliable.
 
 Is there any reason for UDP and not TCP?
 
 (PS: haven't read the previous thread, I am just saying that because last
 time I coded with UDP I ended up having some very interesting experience
 with duplicated datagrams and dropped datagrams)

Amen Brother, been there with you and done that.

sims

[sims is trying to organize a group attendance to a Bob Dylan Concert in the UK 
- Get in touch with sims if 
interested]___
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: shell

2010-01-18 Thread Mark Wieder
stephen-

Monday, January 18, 2010, 12:27:51 PM, you wrote:

 By the way, Skype uses UDP

Yes, but a voice stream has typically a 3kHz bandwidth and dropped
packets don't make much of a difference.

-- 
-Mark Wieder
 mwie...@ahsoftware.net

___
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: shell (cell phone rant)

2010-01-18 Thread stephen barncard
To be fair, Skype's bandwidth (audio wise) sounds a lot better than 3k.
That's a value like the horrible cellphone audio bandwidth (which is far
worse than POTS). Skype is  MUCH better sounding than either.
Most of the communication companies don't give a hoot about clarity or
quality of the conversation as long as it gets there and people put up with
it. The state of telephone communications audio is at an all-time low. How
many times have you had to say WHat? when using a cellphone?  This just
didn't happen with the old wired phones nearly as much. I hate the frickin'
cellphone and use it every day. It's probably slowly killing me.

The wired phones would NEVER drop a call, the biggest insult of all. Usually
it's not a signal strength issue at all; most of the time users get randomly
booted and cut off because the bandwidth narrows from the traffic load.
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/18 Mark Wieder mwie...@ahsoftware.net

 stephen-

 Monday, January 18, 2010, 12:27:51 PM, you wrote:

  By the way, Skype uses UDP

 Yes, but a voice stream has typically a 3kHz bandwidth and dropped
 packets don't make much of a difference.

 --
 -Mark Wieder
  mwie...@ahsoftware.net

 ___
 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: shell (cell phone rant)

2010-01-18 Thread Mikey
It doesn't help that the phones sux0rz, either.  I have two phones on my
hip, and the new one, the expensive one, sounds like crap.  Bluetooth
headsets sound like crap.



-- 
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
  and did a little diving.
And God said, This is good.
___
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: shell (cell phone rant)

2010-01-18 Thread stephen barncard
Which is my point. Between You Toob and MP3s and cell phones, the 'general
public' is often only exposed to distorted (and disfigured) sound and video
sources -- the 'dumbing down' of quality to where there is no quality
reference available and so this noise ends up being what is considered
'acceptable'.

For someone like me who has worked with quality audio for 50 years, it's
painful. I don't tolerate bad sound in clubs either - I will walk out.
The Rickshaw Stop in  San Francisco was one of the worst I have ever heard
in my life.  Brick Wall Limiting and kill sound levels combined. No
dynamics. Acoustic songs and Electric rockers all sound alike in a painful
collage of pain.  And I had my 25db pro earplugs in and still couldn't
escape the pain.  All these people will be SO deaf in about 5 years. Sad.
Nobody seems to care.

 And one of the best sounding venues in town is the old Fillmore (and both
Yoshi's nightclubs)
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/18 Mikey mikeyt...@gmail.com

 It doesn't help that the phones sux0rz, either.  I have two phones on my
 hip, and the new one, the expensive one, sounds like crap.  Bluetooth
 headsets sound like crap.



 --
 On the first day, God created the heavens and the Earth
 On the second day, God created the oceans.
 On the third day, God put the animals on hold for a few hours,
  and did a little diving.
 And God said, This is good.
 ___
 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: shell (cell phone rant)

2010-01-18 Thread Mark Wieder
stephen-

Monday, January 18, 2010, 12:48:42 PM, you wrote:

 To be fair, Skype's bandwidth (audio wise) sounds a lot better than 3k.

We spent an hour and a half on a Skype video conversation halfway
around the world with a friend in Germany yesterday with crystal-clear
reception. My vision of the future is the POTS companies going out of
business and Skype buying them up to provide wired service.

-- 
-Mark Wieder
 mwie...@ahsoftware.net

___
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: shell

2010-01-18 Thread Hershel Fisch



On 1/18/10 3:13 PM, stephen barncard stephenrevoluti...@barncard.com
wrote:

 Alex Tweedly has a sample UDP (datagram) stack at Rev Online
Could you be a bit more precise please? Didn't find it.
Hershel
 -
 Stephen Barncard
 San Francisco
 http://houseofcubes.com/disco.irev
 
 
 2010/1/18 Hershel Fisch hersh...@syp2u4c.com
 
 Hi, after knocking my head against the wall I decided to try to go via
 sockets, but I have some misunderstandings for unpredicted behavior, now my
 questions if somebody could give a full statement example?
 Thanks, Hershel
 
 
 On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:
 
 Hi Herschel,
 
 I am unfamiliar with Hylafax.  I don't think shell is going to cut
 it for your needs.  What you may need is open process, write to
 process and read from process.  Open process is kind of like
 opening a non-visible terminal, where the state of the program opened
 as a process persists throughout your read/write interactions with it.
 
 If you have a CLI client for hylafax for OS X  Windows, then you can
 use that as the process to open.  If the only CLI client you have for
 hylafax is on the server, then you will need to run remote sessions to
 the server.  On OS X you could try 'talking' to the remote hylafax
 client via ssh opened via open process.  If that works, you've got a
 start.  On Windows you would then have to use something like plink
 (part of the Putty suite of ssh programs for windows).
 
 A final option might be to use the Expect program locally to talk to
 the remote hylafax client.  I have never used Expect, but I imagine it
 would be more complex to use than open process + ssh.
 
 It's going to be convoluted, but it might work.
 
 Bernard
 
 On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com
 wrote:
 My server is FreeBSD or OSX, Client is OSX and Win.
 
 What is the problem with writing multiple arguments?  Do you mean
 multiple successive shell commands, or multiple arguments to one
 program?
 
 I want to write a GUI to connect to the server. Now I see in Rev, when a
 shell command is issued its sent and returns the prompt, if I need to
 respond to that prompt then it issues a different shell session and not
 a
 continuation of the previous one, e.g. I want to connect to a server or
 change user, put shell(su - userABC) it returns password that means
 that
 it wants a password to continue now where and who can I provide a
 password
 it should continue the current session? In terminal I just type it in
 and
 its done.
 ___
 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
 
 ___
 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: shell

2010-01-18 Thread stephen barncard
My info was taken from an old Nabble forum were Alex offered his stack. It
doesn't seem to be on his site or Rev Online anymore - perhaps you could
write him.

sqb
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/18 Hershel Fisch hersh...@syp2u4c.com




 On 1/18/10 3:13 PM, stephen barncard stephenrevoluti...@barncard.com
 wrote:

  Alex Tweedly has a sample UDP (datagram) stack at Rev Online
 Could you be a bit more precise please? Didn't find it.
 Hershel
  -
  Stephen Barncard
  San Francisco
  http://houseofcubes.com/disco.irev
 
 
  2010/1/18 Hershel Fisch hersh...@syp2u4c.com
 
  Hi, after knocking my head against the wall I decided to try to go via
  sockets, but I have some misunderstandings for unpredicted behavior, now
 my
  questions if somebody could give a full statement example?
  Thanks, Hershel
 
 
  On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:
 
  Hi Herschel,
 
  I am unfamiliar with Hylafax.  I don't think shell is going to cut
  it for your needs.  What you may need is open process, write to
  process and read from process.  Open process is kind of like
  opening a non-visible terminal, where the state of the program opened
  as a process persists throughout your read/write interactions with it.
 
  If you have a CLI client for hylafax for OS X  Windows, then you can
  use that as the process to open.  If the only CLI client you have for
  hylafax is on the server, then you will need to run remote sessions to
  the server.  On OS X you could try 'talking' to the remote hylafax
  client via ssh opened via open process.  If that works, you've got a
  start.  On Windows you would then have to use something like plink
  (part of the Putty suite of ssh programs for windows).
 
  A final option might be to use the Expect program locally to talk to
  the remote hylafax client.  I have never used Expect, but I imagine it
  would be more complex to use than open process + ssh.
 
  It's going to be convoluted, but it might work.
 
  Bernard
 
  On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com
  wrote:
  My server is FreeBSD or OSX, Client is OSX and Win.
 
  What is the problem with writing multiple arguments?  Do you mean
  multiple successive shell commands, or multiple arguments to one
  program?
 
  I want to write a GUI to connect to the server. Now I see in Rev, when
 a
  shell command is issued its sent and returns the prompt, if I need to
  respond to that prompt then it issues a different shell session and
 not
  a
  continuation of the previous one, e.g. I want to connect to a server
 or
  change user, put shell(su - userABC) it returns password that
 means
  that
  it wants a password to continue now where and who can I provide a
  password
  it should continue the current session? In terminal I just type it in
  and
  its done.
  ___
  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
 
  ___
  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

___
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: shell

2010-01-18 Thread Alex Tweedly

stephen barncard wrote:

My info was taken from an old Nabble forum were Alex offered his stack. It
doesn't seem to be on his site or Rev Online anymore - perhaps you could
write him.
  
They were on the old RevOnline (pre Rev 3.0). I had some problems 
getting stacks on the new RevOnline, but will try again soon.


In the meantime, you can find them at

http://www.tweedly.org/UDP echo server - released.rev
http://www.tweedly.org/UDP echo client - released.rev

(please do not look at anything else on that web site. under 
construction wouldn't even begin to describe it ...).


-- Alex.
___
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: shell

2010-01-18 Thread stephen barncard
look out for spaces in the link --- automatic clickable links will be wrong
with spaces.
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev


2010/1/18 Alex Tweedly a...@tweedly.net

 stephen barncard wrote:

 My info was taken from an old Nabble forum were Alex offered his stack. It
 doesn't seem to be on his site or Rev Online anymore - perhaps you could
 write him.


 They were on the old RevOnline (pre Rev 3.0). I had some problems getting
 stacks on the new RevOnline, but will try again soon.

 In the meantime, you can find them at

 http://www.tweedly.org/UDP echo server - released.rev
 http://www.tweedly.org/UDP echo client - released.rev

 (please do not look at anything else on that web site. under construction
 wouldn't even begin to describe it ...).

 -- Alex.

 ___
 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: shell

2010-01-13 Thread Hershel Fisch
Thanks, I think this is what I'll try to do. I hope its going to work.
Hershel


On 1/7/10 5:12 AM, Bernard Devlin bdrun...@gmail.com wrote:

 Hi Herschel,
 
 I am unfamiliar with Hylafax.  I don't think shell is going to cut
 it for your needs.  What you may need is open process, write to
 process and read from process.  Open process is kind of like
 opening a non-visible terminal, where the state of the program opened
 as a process persists throughout your read/write interactions with it.
 
 If you have a CLI client for hylafax for OS X  Windows, then you can
 use that as the process to open.  If the only CLI client you have for
 hylafax is on the server, then you will need to run remote sessions to
 the server.  On OS X you could try 'talking' to the remote hylafax
 client via ssh opened via open process.  If that works, you've got a
 start.  On Windows you would then have to use something like plink
 (part of the Putty suite of ssh programs for windows).
 
 A final option might be to use the Expect program locally to talk to
 the remote hylafax client.  I have never used Expect, but I imagine it
 would be more complex to use than open process + ssh.
 
 It's going to be convoluted, but it might work.
 
 Bernard
 
 On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com wrote:
 My server is FreeBSD or OSX, Client is OSX and Win.
 
 What is the problem with writing multiple arguments?  Do you mean
 multiple successive shell commands, or multiple arguments to one
 program?
 
 I want to write a GUI to connect to the server. Now I see in Rev, when a
 shell command is issued its sent and returns the prompt, if I need to
 respond to that prompt then it issues a different shell session and not a
 continuation of the previous one, e.g. I want to connect to a server or
 change user, put shell(su - userABC) it returns password that means that
 it wants a password to continue now where and who can I provide a password
 it should continue the current session? In terminal I just type it in and
 its done.
 ___
 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: shell

2010-01-07 Thread Bernard Devlin
Hi Herschel,

I am unfamiliar with Hylafax.  I don't think shell is going to cut
it for your needs.  What you may need is open process, write to
process and read from process.  Open process is kind of like
opening a non-visible terminal, where the state of the program opened
as a process persists throughout your read/write interactions with it.

If you have a CLI client for hylafax for OS X  Windows, then you can
use that as the process to open.  If the only CLI client you have for
hylafax is on the server, then you will need to run remote sessions to
the server.  On OS X you could try 'talking' to the remote hylafax
client via ssh opened via open process.  If that works, you've got a
start.  On Windows you would then have to use something like plink
(part of the Putty suite of ssh programs for windows).

A final option might be to use the Expect program locally to talk to
the remote hylafax client.  I have never used Expect, but I imagine it
would be more complex to use than open process + ssh.

It's going to be convoluted, but it might work.

Bernard

On Wed, Jan 6, 2010 at 6:36 PM, Hershel Fisch hersh...@syp2u4c.com wrote:
 My server is FreeBSD or OSX, Client is OSX and Win.

 What is the problem with writing multiple arguments?  Do you mean
 multiple successive shell commands, or multiple arguments to one
 program?

 I want to write a GUI to connect to the server. Now I see in Rev, when a
 shell command is issued its sent and returns the prompt, if I need to
 respond to that prompt then it issues a different shell session and not a
 continuation of the previous one, e.g. I want to connect to a server or
 change user, put shell(su - userABC) it returns password that means that
 it wants a password to continue now where and who can I provide a password
 it should continue the current session? In terminal I just type it in and
 its done.
___
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: shell

2010-01-06 Thread Hershel Fisch
First of all thanks,


On 1/5/10 9:07 AM, Bernard Devlin bdrun...@gmail.com wrote:

 Hi Hershel,
 
 The way to work with remote shells is with rsh or ssh.  I'm assuming
 that your client platform is os x or linux, and your server platform
 is linux.
My server is FreeBSD or OSX, Client is OSX and Win.
 
 What is the problem with writing multiple arguments?  Do you mean
 multiple successive shell commands, or multiple arguments to one
 program?

I want to write a GUI to connect to the server. Now I see in Rev, when a
shell command is issued its sent and returns the prompt, if I need to
respond to that prompt then it issues a different shell session and not a
continuation of the previous one, e.g. I want to connect to a server or
change user, put shell(su - userABC) it returns password that means that
it wants a password to continue now where and who can I provide a password
it should continue the current session? In terminal I just type it in and
its done.
Now when I'll know how to do it in Rev, then I can develop the majority of
front end GUI's for server's, like the one I want to do now, a Hylafax+
admin and user client.

Thanks in advanced, Hershel
 
 Bernard
 
 On Wed, Dec 30, 2009 at 5:28 PM, Hershel Fisch hersh...@syp2u4c.com wrote:
 Hi, I¹d like to write an admin gui for hylafax+, any advise on how to issue
 remote shell commands?
 As well how to write multiple arguments via shell?
 Thanks, Hershel
 ___
 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: shell

2010-01-06 Thread Sarah Reichelt
 I want to write a GUI to connect to the server. Now I see in Rev, when a
 shell command is issued its sent and returns the prompt, if I need to
 respond to that prompt then it issues a different shell session and not a
 continuation of the previous one, e.g. I want to connect to a server or
 change user, put shell(su - userABC) it returns password that means that
 it wants a password to continue now where and who can I provide a password
 it should continue the current session? In terminal I just type it in and
 its done.

Here is a command I use for setting the system clock on OS X.
It builds a multi-line set of shell commands, including the su
password, then sends them to the Rev shell() function as a single
command.

on setClock pPassword, pDate, pTime
   -- build the command lines
    put #!/bin/sh  cr into tScript
    put pw=  quote  pPassword  quote  cr after tScript
    put echo $pw | sudo -S date   pDate  pTime  cr after tScript

    -- do the command  get the result
    put shell(tScript) into tCheck
end setClock

To alter to use your command, change the following line:
put echo $pw | sudo -S date   tDate  tTime  cr after tScript

Leave everything up to  including the -S, then put your command 
it's parameters in place of my date command.

HTH,
Sarah
___
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: shell

2010-01-05 Thread Bernard Devlin
Hi Hershel,

Sorry I didn't see your post until now (it went into my spam folder -
thanks Google!)

The way to work with remote shells is with rsh or ssh.  I'm assuming
that your client platform is os x or linux, and your server platform
is linux.

What is the problem with writing multiple arguments?  Do you mean
multiple successive shell commands, or multiple arguments to one
program?

Bernard

On Wed, Dec 30, 2009 at 5:28 PM, Hershel Fisch hersh...@syp2u4c.com wrote:
 Hi, I¹d like to write an admin gui for hylafax+, any advise on how to issue
 remote shell commands?
 As well how to write multiple arguments via shell?
 Thanks, Hershel
___
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: shell access in on-rev - please do not complain anymore

2009-05-04 Thread Bill Marriott
This was one of the first policies to be changed... you can get SSH (shell) 
access on request, no problem, with on-Rev. p.s.: The Founder's offer is 
still available until 11:59 GMT Tuesday I think.


runrev260...@m-r-d.de wrote in message 
news:00036331.49ff0...@the-office.us...
 Hi,

 i do not know, what web hosting does mean in the other countries.
 But if i buy a web hosting package here in germany, then it is normal, 
 that i do not get full shell access.
 If i want full control of the server including shell access i have to 
 purchase a server or a virtual server package.
 On-rev offers lot more than normal web hosting. So i cannot understand why 
 so many people are complaining about the
 missing shell access. Btw. before purchasing on-rev everyone can see the 
 feature chart of on-rev. There is nothing to
 read about shell access.

 Okay, if there would be the possibility to use some command line tools 
 like magick this would be fine.
 But i, for one, want a system, which is not vulnerable because everyone 
 gets (full) shell access.

 Sorry, but i am just in a bad temper at the moment and i am sick of 
 reading messages complaining about a missing feature
 which was even not promised by Runrev.

 I do not know how much you pay for other web hosting packages, but with 
 the on-rev founder offer i can spent about 130,- Euros a month.




___
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: shell xyz in the background OS X

2008-08-20 Thread Bernard Devlin
Hi Klaus,

On Unix it would be normal to have to set a shell file to be executable
(chmod +x mynewshellfile.sh) or else one is likely to get the permission
denied error.  I guess that is the same with OS X.

Bernard



 Then I tried to execute the file directly in the terminal and got:
 Permission denied

 What can I do to get it to work in Rev?

 Thanks in advance!


___
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: shell xyz in the background OS X

2008-08-20 Thread Klaus Major

Hi Bernard


Hi Klaus,

On Unix it would be normal to have to set a shell file to be  
executable
(chmod +x mynewshellfile.sh) or else one is likely to get the  
permission

denied error.  I guess that is the same with OS X.


YEAH!
That was it, and it was obviously too obvious :-)

Thanks a lot!


Bernard


Regards from germany

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de


___
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: shell xyz in the background OS X

2008-08-20 Thread Mark Smith
Klaus, you might also consider using open process. This can be  
useful (depending on the shell command you're using) because you can  
then set up a non-blocking send in time loop to monitor progress and  
get the output.


Best,

Mark
On 20 Aug 2008, at 10:53, Klaus Major wrote:


Hi all,

I just found this gem in the Rev docs:
Tip:  The shell function blocks Revolution until it is completed.  
If you want to run a shell
command in the background, write the shell script to a text file  
then execute it with the

launch command.

But cannot get it to work.

What I did:
1. put the tempname  .sh into shell_file
I think sh is the correct suffix, since the FInder show the  
SHELL icon for this file.

2. set the filetype to 
3. wrote the correct shell command to url(file:  shell_file)
4. Tried:
launch shell_file  ## seems to be the right syntax but see below...
launch document shell_file
and even:
launch shell_file with /usr/bin

No chance.

Then I tried to execute the file directly in the terminal and got:
Permission denied

What can I do to get it to work in Rev?

Thanks in advance!


Best

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de


___
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: shell xyz in the background OS X

2008-08-20 Thread Klaus Major

Hi Mark,

Klaus, you might also consider using open process. This can be  
useful (depending on the shell command you're using) because you can  
then set up a non-blocking send in time loop to monitor progress and  
get the output.


Rigfht now we are just using ditto to let the users copy files from  
a to b and back.


But now I can change our code, so the users can work on while copying  
large files,

mainly uncompressed DV video files.

But that's a good idea, will surely archive it!

Thanks, Mark!


Best,

Mark


Best

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de


___
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: Shell Command Help

2008-05-27 Thread Sarah Reichelt
On Wed, May 28, 2008 at 6:34 AM, RevList [EMAIL PROTECTED] wrote:
 I am trying to write a GUI interface for an application that I run in
 Terminal.

 In Terminal, if I run
 /Users/slynch/Desktop/FCPUTIL_GUI/fcputil -S getstats

 I get the following returned
  8.300 413.000 4.000 0.317 1.042 1366.000 100.000 129757.000 0.000
 1497612288.000


 When I create a button with the following script in Rev
 On MouseUp
  put Shell(/Users/slynch/Desktop/FCPUTIL_GUI/fcputil -S getstats) into
 tShellCommand
  put Shell(tShellCommand) into tFilesList
  answer tFilesList
 End MouseUp

 I get this returned
 /bin/sh: line 1:8300: command not found


The first line is executing the shell command.
Then the second line is trying the execute the command:
   Shell(/Users/slynch/Desktop/FCPUTIL_GUI/fcputil -S getstats)
which is a valid Rev command, but not a valid shell command.

Try this:

on MouseUp
  put /Users/slynch/Desktop/FCPUTIL_GUI/fcputil -S getstats into tShellCommand
  put Shell(tShellCommand) into tFilesList
  answer tFilesList
end MouseUp

Cheers,
Sarah
___
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: Shell Command Help

2008-05-27 Thread RevList
How to use Revolution use-revolution@lists.runrev.com on May 27, 2008 at
1:54 PM -0700 wrote:

on MouseUp
  put /Users/slynch/Desktop/FCPUTIL_GUI/fcputil -S getstats into
tShellCommand
  put Shell(tShellCommand) into tFilesList
  answer tFilesList
end MouseUp

Duh.  What a dumb question.  Of course.  I couldn't even debug my own
error.  
Sorry about that.  I am good now.

Stewart.


Notice of Confidentiality:
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review re-transmission dissemination or other use of or
taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited.  If you received
this in error please contact the sender immediately by return electronic
transmission and then immediately delete this transmission including all
attachments without copying distributing or disclosing same.


___
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: shell command callback question

2008-04-25 Thread Josh Mellicker

I have just one more question on this:

Is there any empirical way to determine when a shell process has  
completed?


(Other than trying to figure it out by parsing the returned text)

This would be analogous, I guess, to when in Terminal, it returns you  
to the regular prompt.



On Apr 24, 2008, at 2:19 AM, Mark Smith wrote:

Josh, there's a couple of ways to deal with this, but, as of 2.9, at  
last we can read and write interactively to processes on OS X, so I  
do things like this:



to encode an audio file with the flac command line encoder,

on flacEncode pInfile, pOutfile
 put flac  pInfile  -o  pOutfile into tProc
 open process tProc for update -- this starts the process working

-- this is often better done with a send in time handler and a  
callback

-- but shows how it works

 put 0 into tPercDone
 repeat until tPercDone = 100
   wait 250 millisecs with messages
   read from process tProc until empty
   put it into tProcOutput
   ...
   statements to parse out the percentage complete from tProcOutput
  ...
  put tPercDone
 end repeat
 close process tProc

end flacEncode

---

Another option is to open /bin/bash as a process, so you can then  
read and write to it as if it were  the 'terminal' app.


best,

Mark


On 24 Apr 2008, at 05:33, Josh Mellicker wrote:
When you execute a shell command in Terminal in OS X, (in  
appropriate cases) you get text back as the command executes. For  
example, when searching a hard drive, even though the entire  
process takes a while, at each moment it finds a matching file, it  
echoes it to the terminal, so you get a little feedback while  
you're waiting.


However, in Revolution, when I execute a shell command, nothing is  
returned until the entire command is finishing executing, at which  
point I get all the echoed text at once.


I am brand new at this and probably missing something obvious...  
how do you set up a callback so you get the echoed text in real  
time?

___
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


___
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: shell command callback question

2008-04-25 Thread Mark Smith
Josh, it depends on the particular things you're doing - many (like  
the flac encoder in my example) exit when they're done, so you can  
check 'the open processes', but some things persist.


Best,

Mark

On 25 Apr 2008, at 20:54, Josh Mellicker wrote:

I have just one more question on this:

Is there any empirical way to determine when a shell process has  
completed?


(Other than trying to figure it out by parsing the returned text)

This would be analogous, I guess, to when in Terminal, it returns  
you to the regular prompt.



On Apr 24, 2008, at 2:19 AM, Mark Smith wrote:

Josh, there's a couple of ways to deal with this, but, as of 2.9,  
at last we can read and write interactively to processes on OS X,  
so I do things like this:



to encode an audio file with the flac command line encoder,

on flacEncode pInfile, pOutfile
 put flac  pInfile  -o  pOutfile into tProc
 open process tProc for update -- this starts the process working

-- this is often better done with a send in time handler and a  
callback

-- but shows how it works

 put 0 into tPercDone
 repeat until tPercDone = 100
   wait 250 millisecs with messages
   read from process tProc until empty
   put it into tProcOutput
   ...
   statements to parse out the percentage complete from tProcOutput
  ...
  put tPercDone
 end repeat
 close process tProc

end flacEncode

---

Another option is to open /bin/bash as a process, so you can  
then read and write to it as if it were  the 'terminal' app.


best,

Mark


On 24 Apr 2008, at 05:33, Josh Mellicker wrote:
When you execute a shell command in Terminal in OS X, (in  
appropriate cases) you get text back as the command executes. For  
example, when searching a hard drive, even though the entire  
process takes a while, at each moment it finds a matching file,  
it echoes it to the terminal, so you get a little feedback while  
you're waiting.


However, in Revolution, when I execute a shell command, nothing  
is returned until the entire command is finishing executing, at  
which point I get all the echoed text at once.


I am brand new at this and probably missing something obvious...  
how do you set up a callback so you get the echoed text in real  
time?

___
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


___
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: shell command callback question

2008-04-24 Thread Mark Smith
Josh, there's a couple of ways to deal with this, but, as of 2.9, at  
last we can read and write interactively to processes on OS X, so I  
do things like this:



to encode an audio file with the flac command line encoder,

on flacEncode pInfile, pOutfile
  put flac  pInfile  -o  pOutfile into tProc
  open process tProc for update -- this starts the process working

-- this is often better done with a send in time handler and a  
callback

-- but shows how it works

  put 0 into tPercDone
  repeat until tPercDone = 100
wait 250 millisecs with messages
read from process tProc until empty
put it into tProcOutput
...
statements to parse out the percentage complete from tProcOutput
   ...
   put tPercDone
  end repeat
  close process tProc

end flacEncode

---

Another option is to open /bin/bash as a process, so you can then  
read and write to it as if it were  the 'terminal' app.


best,

Mark


On 24 Apr 2008, at 05:33, Josh Mellicker wrote:
When you execute a shell command in Terminal in OS X, (in  
appropriate cases) you get text back as the command executes. For  
example, when searching a hard drive, even though the entire  
process takes a while, at each moment it finds a matching file, it  
echoes it to the terminal, so you get a little feedback while  
you're waiting.


However, in Revolution, when I execute a shell command, nothing is  
returned until the entire command is finishing executing, at which  
point I get all the echoed text at once.


I am brand new at this and probably missing something obvious...  
how do you set up a callback so you get the echoed text in real  
time?

___
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: shell command callback question

2008-04-24 Thread Josh Mellicker

Thanks Mark!

That's exactly what I needed!


On Apr 24, 2008, at 2:19 AM, Mark Smith wrote:

Josh, there's a couple of ways to deal with this, but, as of 2.9, at  
last we can read and write interactively to processes on OS X, so I  
do things like this:



to encode an audio file with the flac command line encoder,

on flacEncode pInfile, pOutfile
 put flac  pInfile  -o  pOutfile into tProc
 open process tProc for update -- this starts the process working

-- this is often better done with a send in time handler and a  
callback

-- but shows how it works

 put 0 into tPercDone
 repeat until tPercDone = 100
   wait 250 millisecs with messages
   read from process tProc until empty
   put it into tProcOutput
   ...
   statements to parse out the percentage complete from tProcOutput
  ...
  put tPercDone
 end repeat
 close process tProc

end flacEncode

---

Another option is to open /bin/bash as a process, so you can then  
read and write to it as if it were  the 'terminal' app.


best,

Mark


On 24 Apr 2008, at 05:33, Josh Mellicker wrote:
When you execute a shell command in Terminal in OS X, (in  
appropriate cases) you get text back as the command executes. For  
example, when searching a hard drive, even though the entire  
process takes a while, at each moment it finds a matching file, it  
echoes it to the terminal, so you get a little feedback while  
you're waiting.


However, in Revolution, when I execute a shell command, nothing is  
returned until the entire command is finishing executing, at which  
point I get all the echoed text at once.


I am brand new at this and probably missing something obvious...  
how do you set up a callback so you get the echoed text in real  
time?

___
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


___
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: Shell commands on Windows XP Home Edition

2007-08-09 Thread Mark Wieder
Mark-

 First, (systemVersion = NT 5.1) tells me only XP.  Is there someway I 
 can further distinguish Pro from Home?

You might try something like

get the number of lines of shell(systeminfo)
if it  2 then
  -- it's pro
else
  -- it's home
end if

 Third, does a master cross-reference exist somewhere that enumerates what 
 shell commands are compatible from Win 2000 through to Vista?

rotfl

-- 
 Mark Wieder
 [EMAIL PROTECTED]



___
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: Shell commands on Windows XP Home Edition

2007-08-09 Thread Ken Ray
On Thu, 09 Aug 2007 20:27:41 +, Mark E. Powell wrote:

 First, (systemVersion = NT 5.1) tells me only XP.  Is there someway 
 I can further distinguish Pro from Home?

Well, you can read the data from the prodspec.ini file in the 
System32 directory, which is supposed to never be modified or 
deleted. So you can do this:

function XPType
  put (specialFolderPath(37)  /prodspec.ini) into tINIFile
  if there is a file tINIFile then
put url (file:  tINIFile) into tData
if tData contains Windows XP Professional then
  return Pro
else
  return Home
end if
  else
return Error: File not found.
  end if
end XPType

 Second, if anyone has dealt with this phenomenon before I would like 
 to know how you succeeded in infusing an XP Home client with XP Pro 
 command line capability.

Well, in some cases you're allowed to distribute certain command line 
apps with your distribution (you'd have to check Microsoft's site for 
that). But in general, I'd assume that if it's not on both versions, 
you should go with a third party utility you can bundle.
 
 Third, does a master cross-reference exist somewhere that enumerates 
 what shell commands are compatible from Win 2000 through to Vista?

Not AFAIK, but it would be great if someone knew where one was...

Ken Ray
Sons of Thunder Software, Inc.
Email: [EMAIL PROTECTED]
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


Re: shell command problem

2007-05-29 Thread Thierry


Hi  Thomas ,

You have to read the result of the shell() function.

get shell(...) or
put shell(...) into x

HTH
Thierry


Can someone guide me in the correct use of the shell command on OSX.


I have tried to set the shellcommand to /bin/ired with no result.

This is my script:
ON mouseUp
put field myControl2 into tControl
IF tControl is not  THEN
put the shellcommand into tShellPath
set the shellcommand to /bin/ired
shell (field myControl2)
-- put quote  ired - send   quote  Robosapien V2   
quote Quote  D  Quote into tred

-- shell (tred)
set the shellcommand to tShellPath
ELSE
revspeak OH OH
END IF
END mouseUp



___
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: shell command problem

2007-05-29 Thread Mark Schonewille

Hi Thomas,

I get handler not found instead of can't set property. At which  
line exactly does the error occur? Why don't you have hints in your  
error message? The hint line contains important information about the  
cause of the problem.


Have you tried executing the foloowing line?

put shell(/bin/iRed  fld myControl2)

If this doesn't work, either the command line utility is not where  
you think you have put it or the contents of the field is incorrect.  
If it does work, something is wrong with your script.


Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Get your store on-line within minutes with Salery Web Store software.  
Download at http://www.salery.biz


Op 29-mei-2007, om 16:40 heeft Thomas McGrath III het volgende  
geschreven:



Can someone guide me in the correct use of the shell command on OSX.

I have an app called iRed which comes with a command line  
application that I copied to the bin folder on my machine and from  
a terminal window I can execute the following ired -send  
Robosapien V2 D which works great. iRed is a program that can  
send IR codes via a USB device called irTrans to my Robosapien V2  
robot.


Everything works fine from within iRed controlling the robot.
Everything works fine from the terminal window.
Everything also works fine using an applescript:
try
tell application iRed to send ir Code D of RC Robosapien V2
on error
beep
end try

 Everything also works storing the applescript in a custom prop in  
REV and then DOing the applescript.


The only thing I can't seem to figure out is how to run a command  
line directly from within REV. The docs say if I am having trouble  
to try the command line directly in a terminal window and it does  
indeed work fine.


snip script  errors

___
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: shell command problem

2007-05-29 Thread Thomas McGrath III

Hi Thierry,

Yes thanks, it looks like I was forgetting that the shell evals to a  
string. I fixed this and now I am not getting the error anymore but  
the command is still not executing.


I am getting the intro text that pops up when the iRed command  
application runs, you know, (ired Version 2.0  usage: ired -send  
etc.) which tells me I am communicating with it but not getting any  
result.


Any ideas???

Thanks again,

Tom

On May 29, 2007, at 11:48 AM, Thierry wrote:



Hi  Thomas ,

You have to read the result of the shell() function.

get shell(...) or
put shell(...) into x

HTH
Thierry


Can someone guide me in the correct use of the shell command on OSX.


I have tried to set the shellcommand to /bin/ired with no result.

This is my script:
ON mouseUp
put field myControl2 into tControl
IF tControl is not  THEN
put the shellcommand into tShellPath
set the shellcommand to /bin/ired
shell (field myControl2)
-- put quote  ired - send   quote  Robosapien V2   
quote Quote  D  Quote into tred

-- shell (tred)
set the shellcommand to tShellPath
ELSE
revspeak OH OH
END IF
END mouseUp



___
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: shell command problem

2007-05-29 Thread Thomas McGrath III

Mark,

Thanks I tried combining the path and command and am now getting the  
iRed app to respond but not execute the command.


I can get this to work directly from the terminal application.

I will mess around with this tonight.

Thanks Mark,


Tom

On May 29, 2007, at 12:53 PM, Mark Schonewille wrote:


Hi Thomas,

I get handler not found instead of can't set property. At which  
line exactly does the error occur? Why don't you have hints in your  
error message? The hint line contains important information about  
the cause of the problem.


Have you tried executing the foloowing line?

put shell(/bin/iRed  fld myControl2)

If this doesn't work, either the command line utility is not where  
you think you have put it or the contents of the field is  
incorrect. If it does work, something is wrong with your script.


Best,

Mark

--

Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz

Get your store on-line within minutes with Salery Web Store  
software. Download at http://www.salery.biz


Op 29-mei-2007, om 16:40 heeft Thomas McGrath III het volgende  
geschreven:



Can someone guide me in the correct use of the shell command on OSX.

I have an app called iRed which comes with a command line  
application that I copied to the bin folder on my machine and from  
a terminal window I can execute the following ired -send  
Robosapien V2 D which works great. iRed is a program that can  
send IR codes via a USB device called irTrans to my Robosapien  
V2 robot.


Everything works fine from within iRed controlling the robot.
Everything works fine from the terminal window.
Everything also works fine using an applescript:
try
tell application iRed to send ir Code D of RC Robosapien V2
on error
beep
end try

 Everything also works storing the applescript in a custom prop  
in REV and then DOing the applescript.


The only thing I can't seem to figure out is how to run a command  
line directly from within REV. The docs say if I am having trouble  
to try the command line directly in a terminal window and it does  
indeed work fine.


snip script  errors

___
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: Shell and rsync

2007-05-29 Thread chris bohnert

Brent,

Rsync will use ssh by default.  If you're stuck with just using the ssh
transport (similar to doing an scp) then you should try 'Open Process'
followed by 'write to process'.  But  this bug,
http://quality.runrev.com/qacenter/show_bug.cgi?id=3196, may get in your
way.

If you can put rsyncd on the remote server then you have one of two
options.  You can use the --password-file option on the command line or
you can try setting the environment variable 'RSYNC_PASSWORD'.

--
cb

On 5/29/07, Brent Anderson [EMAIL PROTECTED] wrote:


Hello.

I'm looking into a way to execute rsync on Mac OS X from Revolution
via shell. One of the rsync targets will be a remote server. The
problem I'm facing here is that I can't pass a password to access the
server from rsync. Although I could use public key authentication, I
don't want to have to worry about handling the certificates outside
of Revolution.

In short, how does one pass a password into rsync so that Revolution
can properly use it?

Thanks,
Brent Anderson
___
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: shell command problem

2007-05-29 Thread Thomas McGrath III

Correct method found!!!

ON mouseUp
put field myControl2 into tControl
IF tControl is not  THEN
put shell(/bin/iRed  fld myControl2)
ELSE
revspeak OH OH
-- other error correction here
END IF
END mouseUp

with

 -send Robosapien V2 square

in field myControl2 instead of ( iRed -send Robosapien V2  
square). Apparently using the path and command works and then the  
iRed is not needed before the command.



It now works and I am using Revolution to completely control the  
Robosapien V2 Robot from Sharper image and also the Alive  
Chimpanzee as well. This opens up the option to have a Chimp alert  
me to new email or other environmental controls as well as to create  
software to allow or give the impression of Artificial Personality.  
I prefer AP over AI since the personality is the better part for most  
people any way and not the intelligence.


I had already figured out how to control the robot via speech  
recognition and Applescript as well as using a USB keypad (iKeys) and  
iCal for timed events etc. but I wanted to accomplish it with having  
to have the iRed application open and since they provided the  
CommandLine app version of iRed that seemed the best way to go. Now  
it is running smoothly and I need to put it all together and finalize  
the interface.


Once I am finished putting this all together I will upload to my user  
area with details on how to accomplish this wonderful treat.



Thanks Mark and Thierry.


Tom
___
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: shell command problem

2007-05-29 Thread Thomas McGrath III
Actually without the iRed application being open I can not get this  
to work via the command line. With the app open I can get it to work  
with both the command line and with applescript. I don't see the  
benefit of one over the other.


I have sent iRed an email to find out what their iRed commandline  
version is capable of.


Thanks for the help,

Tom McGrath


On May 29, 2007, at 5:16 PM, Thomas McGrath III wrote:


ON mouseUp
put field myControl2 into tControl
IF tControl is not  THEN
put shell(/bin/iRed  fld myControl2)
ELSE
revspeak OH OH
-- other error correction here
END IF
END mouseUp

with

 -send Robosapien V2 square



___
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: shell() in a separate thread with callback message at exit?

2007-03-12 Thread Joel Guillod

Here is an example script that does a ping. The handler includes the
post-processing of the result, but you can just ignore that.

function checkPing pIP
...
   put ping -c1 -npIP into tShellCmd
   put tFileName   21  after tShellCmd


Thank you a lot Sarah. Your code let me discover the wait .. with  
messages which I have never been aware of (the old Hypercard  
practice?). This can actually do the job I am searching for. Also,  
your example raises two questions:


1.- Is there somewhere some documentation on synchronous/asynchronos  
parallel/threaded Transcript execution? I would like to learn about  
other such great features native in Transcript...


2.- I understand the shell command you wrote up to ping -c1 -n  
192.168.0.1 and even the  mandatory for executing the shell in a  
separate thread but I dont understand the 21 . Could you  
explain? Do you have a good MacOSX/Un*x tutorial on the shell commands?


Best to you,

Joël___
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: shell() in a separate thread with callback message at exit?

2007-03-11 Thread David Bovill

This is an important feature request - no?

I am not sure how to do this - I have suspected you may be able to do this
with some clever shell scripting - but not cracked it for things that you
need results from. You can put a shell into the background using  ie
think, and you could look into the screen command, but the only ways I
figured on doing this properly is to have a separate program running and
executing the shell. This program can then talk to Rev using sockets or some
other technique.

On 10/03/07, Joel Guillod [EMAIL PROTECTED] wrote:


 What platforms are you supporting?

 If it is Mac only then I think you can achieve this using an
 AppleScript and AppleEvents.

 Let me know and I'll let you have more details.

Yes, I would be very pleased to get the details for MacOSX. Also I
need to support this feature under Windows but let us start with the
Mac solution.

Thanks a lot,
Joel


 All the Best
 Dave

 On 8 Mar 2007, at 11:20, Joel Guillod wrote:

 How can I implement the following features:

 - invoque a shell command in a separate thread, i.e. a non
 blocking shell during execution of the command;
 - receive a callback message with the output and the error result
 when the thread exits?

 This would be some function similar to the load command, i.e.:

shellExecute commandLine [with message callbackMessage]

 where ...

___
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: shell() in a separate thread with callback message at exit?

2007-03-11 Thread Sarah Reichelt

On 3/8/07, Joel Guillod [EMAIL PROTECTED] wrote:

How can I implement the following features:

- invoque a shell command in a separate thread, i.e. a non blocking
shell during execution of the command;
- receive a callback message with the output and the error result
when the thread exits?

This would be some function similar to the load command, i.e.:

shellExecute commandLine [with message callbackMessage]

where
   The commandLine is a string or an expression that evaluates to a
string.
   The callbackMessage is the name of a message to send after the
shell exited.

The callbackMessage signature would be:

   on callbackMessage pCmdOutput,pCmdError,pShellError

where
   - pCmdOutput is the value returned by the shell function, i.e. the
result of the sdtout commandLine, including any error messages the
commandLine generates.
   - pCmdError is the error the command generate (sdterr under unix).
   - pShellError is the shell command's exit code.



Hi Joel,

This isn't exactly what you described, but here is how I do it. Start
the shell command running in the background but directing it's output
to a text file. Then have a loop to check for this text file until it
appears or until a time out period has elapsed.

Here is an example script that does a ping. The handler includes the
post-processing of the result, but you can just ignore that.

function checkPing pIP
   put specialFolderPath(Desktop)  /ping.txt into tFileName
   if there is a file tFileName then delete file tFileName

   put ping -c1 -npIP into tShellCmd
   put tFileName   21  after tShellCmd
   get shell(tShellCmd)

   put 0 into timeCheck
   repeat 50 times
   wait 1 tick with messages
   if there is a file tFileName then
   put URL (file:  tFileName) into tRes
   if tRes is empty then next repeat  -- file created but no result yet

   put wordOffset(loss, tRes) into tWord
   if tWord = 0 then next repeat -- file created but result
not complete

put word tWord-2 of tRes into tPercent
   if tPercent = 0% then return true
   else return false
   end if
   end repeat

   if there is a file tFileName then delete file tFileName
   return false
end checkPing

Cheers,
Sarah
___
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: shell() in a separate thread with callback message at exit?

2007-03-10 Thread Joel Guillod

What platforms are you supporting?

If it is Mac only then I think you can achieve this using an  
AppleScript and AppleEvents.


Let me know and I'll let you have more details.


Yes, I would be very pleased to get the details for MacOSX. Also I  
need to support this feature under Windows but let us start with the  
Mac solution.


Thanks a lot,
Joel



All the Best
Dave

On 8 Mar 2007, at 11:20, Joel Guillod wrote:


How can I implement the following features:

- invoque a shell command in a separate thread, i.e. a non  
blocking shell during execution of the command;
- receive a callback message with the output and the error result  
when the thread exits?


This would be some function similar to the load command, i.e.:

   shellExecute commandLine [with message callbackMessage]

where ...


___
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: shell() in a separate thread with callback message at exit?

2007-03-08 Thread Dave

Hi,

What platforms are you supporting?

If it is Mac only then I think you can achieve this using an  
AppleScript and AppleEvents.


Let me know and I'll let you have more details.

All the Best
Dave

On 8 Mar 2007, at 11:20, Joel Guillod wrote:


How can I implement the following features:

- invoque a shell command in a separate thread, i.e. a non blocking  
shell during execution of the command;
- receive a callback message with the output and the error result  
when the thread exits?


This would be some function similar to the load command, i.e.:

   shellExecute commandLine [with message callbackMessage]

where
  The commandLine is a string or an expression that evaluates to a  
string.
  The callbackMessage is the name of a message to send after the  
shell exited.


The callbackMessage signature would be:

  on callbackMessage pCmdOutput,pCmdError,pShellError

where
  - pCmdOutput is the value returned by the shell function, i.e.  
the result of the sdtout commandLine, including any error messages  
the commandLine generates.

  - pCmdError is the error the command generate (sdterr under unix).
  - pShellError is the shell command's exit code.


If I remember well the externals API allows for such threading and  
callback but I am not a C expert. Could anyone give me refs/ 
pointers to a solution? I need a multiplatform solution.


Thanks a lot !  Joël


___
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: Shell commands are blocking -- work around?

2006-11-14 Thread Kay C Lan

Me, I'd just create a separate 'Search Stack'. Not a substack, but a
separate standalone so that it has it's own process id and memory. I've used
this technique with great success for a DB searcher. My 'Individual Record'
stack has a link to my 'Bulk Search' stack. A bulk or All search can take up
to 5 min and I can leave it to do it's thing whilst I work with the
'Individual Record' stack. I don't have any bell or whistle to let me know
when the Bulk Search is over - I can usually tell because the table field is
filled in, but I'm sure it would be easy to add. From my 'Bulk Search' stack
clicking on any line (1 record) will immediately send an individual search
and display the result in the 'Individual Record' stack - split second fast.

Just another option.
___
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: Shell commands are blocking -- work around?

2006-11-13 Thread Sivakatirswami

John: your idea of using a cron is excellent I would probably just have
Revolution write directly to cron (as I have this already set up...)
and pass the parameter along with it. Though i think I will use this for
other tasks, not this one. But that's definitely a keeper.

Sarah: I'll try using your method first, why don't
you use send in 1 second until the file is not empty or something like
that, instead of a repeat loop with wait?

BTW: from man sh, REDIRECTION Section
The mysterious part.. still archane, but there's a touch of light here.
and lots of other stuff in man sh, if you have the stomach for bash.

=
Note  that  the order of redirections is significant.  For example, the
   command
  ls  dirlist 21
   directs both standard output and standard error to  the  file
dirlist,
   while the command

  ls 21  dirlist

   directs  only the standard output to file dirlist, because the
standard
   error was duplicated as standard output before the standard
output  was
   redirected to dirlist.
=

Sivakatirswami


Sarah Reichelt wrote:

On 11/11/06, Sivakatirswami [EMAIL PROTECTED] wrote:

Some on our team are *nix nerds and if I need a powerdrill to add
to my tool box they are, being long time masters of the unix
patchwork quilt method of micro programs and  pipes...  more than
happy to give me a little bash script. OK so, my cmd line skills
are slowly improving and I can install these widgets in

/usr/local/bin/some_cool_tool.sh  # on my OSX box, G4 Powerbook

e.g.

SEARCH_PATTERN=$1 locate index.shtml | while read INDEX_FILE; do 
fgrep -H -i $SEARCH_PATTERN $INDEX_FILE done | more exit 0


(wow, that is s concise!)

and  then in Revolution set up a button:

on mouseUp put empty into fld results set the shellCommand to
/bin/sh put /usr/local/bin/web_content_search.sh  quote  fld
findString  quote into tShellCmd put shell (tShellcmd) into fld
results end mouseUp

It all works, is very sweet And it is a  *lot* faster than using 
transcript for the same job. *but* Only problem is: it is

blocking... and this is documented behavior:



Here is my way around this problem. The example below is for a ping
 command, but I'm sure you can adapt it to your stuff.

As you can see, I direct the output of the shell command to a 
temporary text file. The second part of the shell command containing 
the 21  is the relevant section. I don't understand it but it 
works :-) The rest of the script just loops around checking to see if

 there is anything in this file and then parsing the result. Since it
 uses wait with messages, it is non-blocking.

HTH, Sarah

function checkPing pIP put specialFolderPath(Desktop)  /ping.txt
into tFileName if there is a file tFileName then delete file
tFileName

put ping -c1 -npIP into tShellCmd put tFileName  
21  after tShellCmd get shell(tShellCmd)

put 0 into timeCheck repeat 50 times add 1 to timeCheck wait 1 tick
with messages if there is a file tFileName then put URL (file: 
tFileName) into tRes if tRes is empty then next repeat  -- file
created but no result yet

put wordOffset(loss, tRes) into tWord if tWord = 0 then next repeat
-- file created but result not complete

-- if there is a file tFileName then delete file tFileName put word
tWord-2 of tRes into tPercent if tPercent = 0% then return true 
else return false end if end repeat


if there is a file tFileName then delete file tFileName return false 
end checkPing ___ 
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: Shell commands are blocking -- work around?

2006-11-13 Thread Geir A. Myrestrand

Sarah Reichelt wrote:


Here is my way around this problem. The example below is for a ping
command, but I'm sure you can adapt it to your stuff.

As you can see, I direct the output of the shell command to a
temporary text file. The second part of the shell command containing
the 21  is the relevant section. I don't understand it but it
works :-)


21 means that you want anything sent to stderr (2) redirected to 
stdout (1), meaning that stdout now will be both stdout and stderr.


The trailing  simply means that you want to run it in the background, 
and you're then free to run other commands while this command is running 
in the background.



Geir A. Myrestrand

___
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: Shell commands are blocking -- work around?

2006-11-13 Thread Sarah Reichelt

Sarah: I'll try using your method first, why don't
you use send in 1 second until the file is not empty or something like
that, instead of a repeat loop with wait?


I guess I could have done it that way, but I would have to incorporate
a check for reading a file that was not yet complete, or for a file
reading error, if it was still in use by the shell. This works very
quickly if there is a connection, and handles a failure smoothly.



BTW: from man sh, REDIRECTION Section
The mysterious part.. still archane, but there's a touch of light here.
and lots of other stuff in man sh, if you have the stomach for bash.

=
Note  that  the order of redirections is significant.  For example, the
command
   ls  dirlist 21
directs both standard output and standard error to  the  file
dirlist,
while the command

   ls 21  dirlist

directs  only the standard output to file dirlist, because the
standard
error was duplicated as standard output before the standard
output  was
redirected to dirlist.
=



Thanks for this info, I'm getting worried now, because I almost
understand it :-)

Sarah
___
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: Shell commands are blocking -- work around?

2006-11-13 Thread Sarah Reichelt

On 11/14/06, Geir A. Myrestrand [EMAIL PROTECTED] wrote:

Sarah Reichelt wrote:

 Here is my way around this problem. The example below is for a ping
 command, but I'm sure you can adapt it to your stuff.

 As you can see, I direct the output of the shell command to a
 temporary text file. The second part of the shell command containing
 the 21  is the relevant section. I don't understand it but it
 works :-)

21 means that you want anything sent to stderr (2) redirected to
stdout (1), meaning that stdout now will be both stdout and stderr.

The trailing  simply means that you want to run it in the background,
and you're then free to run other commands while this command is running
in the background.


Thanks Geir, I think I get it now, but I keep it in my scrapbook,
because I would never remember it.

Cheers,
Sarah
___
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: Shell commands are blocking -- work around?

2006-11-12 Thread John Craig
You could write a request to a text file and have a cron job (maybe 
running every couple of minutes) pick up the request from the text file, 
do the processing and write the results to a result file.  You can then 
poll the result file from your rev app.


I've use this technique many times with PHP.

Hope this info is of use.

JC


Sivakatirswami wrote:

Some on our team are *nix nerds and if I need a powerdrill to add to my
tool box they are, being long time masters of the unix  patchwork quilt
method of micro programs and  pipes...  more than happy to give me
a little bash script. OK so, my cmd line skills are slowly improving and
 I can install these widgets in

/usr/local/bin/some_cool_tool.sh  # on my OSX box, G4 Powerbook

e.g.

SEARCH_PATTERN=$1
locate index.shtml | while read INDEX_FILE; do
  fgrep -H -i $SEARCH_PATTERN $INDEX_FILE
done | more
exit 0

(wow, that is s concise!)

and  then in Revolution set up a button:

on mouseUp
  put empty into fld results
  set the shellCommand to /bin/sh
  put /usr/local/bin/web_content_search.sh  quote  fld 
findString  quote

into tShellCmd
  put shell (tShellcmd) into fld results
end mouseUp

It all works, is very sweet And it is a  *lot* faster than using 
transcript
 for the same job. *but* Only problem is: it is blocking... and this 
is documented behavior:


The current handler pauses until the shell returns its result. If the
command was successful but did not return anything, the shell function
returns empty.

I tried this:

on mouseUp
  put empty into fld results
  send searchWebContent to me in 1 second
end mouseUp

on searchWebContent
  set the shellCommand to /bin/sh
  put /usr/local/bin/web_content_search.sh   quote  fld 
findString  quote into tShellCmd

  put shell (tShellcmd) into fld results
end searchWebContent

That also works, but it is still blocking.

Any work arounds? Goal: production environment where we want
to fire off some long processes, go back to work, come back
after a few minutes and pick up the results.

(open and read contents, check for a string in 10,000+ index.shtml
files, return results-hits) OK, so, its already super fast, by a
magnitude  of 20 times faster than the same dig  in BBEdit,
but still, in those 2 minutes I could be getting some work done.

Does this go to the old problem we face  with Rev being a
single  threaded  app? (I don't know exactly what that means,
but Andre keeps waving that flag! and this smells like a case in 
point...)


Of course I can just open the terminal in OSX and run the cmd there and
go  back  to work in Revolution, but that breaks the integration.
(have to cut and  paste results into Rev... to carry on)

it would really be great (am i dreaming?) if Process #1 went off to get
my Hot Thai Special, while I went back to work (Process # 2) and
then later Process #1 rings a bell saying Lunch has arrived!

i.e. background process completion notification interrupts
foreground operations where  interrupt is a desired behavior.
ala Ghost on OSX

I do a lot of in house RAD data processing apps and there's too much
thumbtwiddly while waiting for results...

 IT rapsters singing:

Files get big, bigger and bigger
Directories grow, grow and grow...
the busy cursors spin, spin, spin...
work done in one hour goes, down, down, down...

Sivakatirswami
www.himalayanacademy.com

Get Hinduism Today Digital Edition. It's Free!
http://www.hinduismtoday.com/digital/

___
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: Shell commands are blocking -- work around?

2006-11-12 Thread Sarah Reichelt

On 11/11/06, Sivakatirswami [EMAIL PROTECTED] wrote:

Some on our team are *nix nerds and if I need a powerdrill to add to my
tool box they are, being long time masters of the unix  patchwork quilt
method of micro programs and  pipes...  more than happy to give me
a little bash script. OK so, my cmd line skills are slowly improving and
  I can install these widgets in

/usr/local/bin/some_cool_tool.sh  # on my OSX box, G4 Powerbook

e.g.

SEARCH_PATTERN=$1
locate index.shtml | while read INDEX_FILE; do
   fgrep -H -i $SEARCH_PATTERN $INDEX_FILE
done | more
exit 0

(wow, that is s concise!)

and  then in Revolution set up a button:

on mouseUp
   put empty into fld results
   set the shellCommand to /bin/sh
   put /usr/local/bin/web_content_search.sh  quote  fld findString
 quote
into tShellCmd
   put shell (tShellcmd) into fld results
end mouseUp

It all works, is very sweet And it is a  *lot* faster than using
transcript
  for the same job. *but* Only problem is: it is blocking... and this is
documented behavior:



Here is my way around this problem. The example below is for a ping
command, but I'm sure you can adapt it to your stuff.

As you can see, I direct the output of the shell command to a
temporary text file. The second part of the shell command containing
the 21  is the relevant section. I don't understand it but it
works :-) The rest of the script just loops around checking to see if
there is anything in this file and then parsing the result. Since it
uses wait with messages, it is non-blocking.

HTH,
Sarah

function checkPing pIP
   put specialFolderPath(Desktop)  /ping.txt into tFileName
   if there is a file tFileName then delete file tFileName

   put ping -c1 -npIP into tShellCmd
   put tFileName   21  after tShellCmd
   get shell(tShellCmd)

   put 0 into timeCheck
   repeat 50 times
   add 1 to timeCheck
   wait 1 tick with messages
   if there is a file tFileName then
   put URL (file:  tFileName) into tRes
   if tRes is empty then next repeat  -- file created but no result yet

   put wordOffset(loss, tRes) into tWord
   if tWord = 0 then next repeat -- file created but result
not complete

   -- if there is a file tFileName then delete file tFileName
   put word tWord-2 of tRes into tPercent
   if tPercent = 0% then return true
   else return false
   end if
   end repeat

   if there is a file tFileName then delete file tFileName
   return false
end checkPing
___
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: Shell

2006-10-26 Thread Hershel Fisch
On 10/21/06 10:33 PM, Sarah Reichelt [EMAIL PROTECTED] wrote:

 put #!/bin/sh  cr into tScript
 put pw=  quote  tPass  quote  cr after tScript
 put echo $pw | sudo -S - postgres  cr after tScript
 put /usr/local/bin/postmaster -D /usr/local/pgsql/data -i  cr after tScript
 put shell(tScript) into tCheck


This is the result
sudo: '-' requires an argument
usage: sudo -K | -L | -V | -h | -k | -l | -v
usage: sudo [-HPSb] [-p prompt] [-u username|#uid]
{ -e file [...] | -i | -s | command }
postmaster cannot access the server configuration file
/usr/local/pgsql/data/postgresql.conf: Permission denied

Thanks, Hershel

___
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: Shell

2006-10-21 Thread Sarah Reichelt

Try this:

put #!/bin/sh  cr into tScript
put pw=  quote  tPass  quote  cr after tScript
put echo $pw | sudo -S - postgres  cr after tScript
put /usr/local/bin/postmaster -D /usr/local/pgsql/data -i  cr after tScript
put shell(tScript) into tCheck  -- do the command  get the result

The tPass variable must contain your admin password.

Cheers,
Sarah


On 10/19/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Quoting Sarah Reichelt [EMAIL PROTECTED]:

 I have never used PostgreSQL, so I don't know how you normally start
 it. However from the error message, it appears that you don't start it
 with sudo, just with a standard user's login.

 Can you start PostgreSQL as normal from the Terminal and post the
 commands you use (blanking out any password). Then we can see how that
 needs to be altered to work directly from Rev.

 One other point: the message box does not always act exactly the same
 as a script in an object, so for testing, I suggest you make a button
 and do this in a mouseUp handler.

 Cheers,
 Sarah
first of all thanks for your response and sorry for the delay, accidently I
posted my password and had to change it immediatly and some how my computer
got locked and took a while till i got back to business plus the holidays.
Ok, I open terminal, quote
Hershel-Fischs-Computer:~ hershelfisch$ su - postgres
Password:
Hershel-Fischs-Computer:~ postgres$ /usr/local/bin/postmaster -D /usr/local/
pgsql/data -i
and quote
Thanks a million, Hersel Fisch

LOG:  database system was shut down at 2006-10-18 16:19:56 EDT
LOG:  checkpoint record is at 0/AD3C8C
LOG:  redo record is at 0/AD3C8C; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 1469; next OID: 17250
LOG:  database system is ready



 On 10/5/06, Hershel Fisch [EMAIL PROTECTED] wrote:
  On 10/4/06 6:51 AM, Sarah Reichelt [EMAIL PROTECTED] wrote:
  Thanks,
   this is what I put into the message box
 
  put #!/bin/sh  cr into tScript put pw=  quote  vehachhkl  quote
 
  cr after tScript
  put echo $pw | sudo -S /usr/local/bin/postmaster -D /usr/local/pgsql/data
 -
  i  cr after tScript
  put shell(tScript)
 
  This is the result for the above script
  Password:
  root execution of the PostgreSQL server is not permitted.
  The server must be started under an unprivileged user ID to prevent
  possible system security compromise.  See the documentation for
  more information on how to properly start the server.
 
  --put #!/bin/sh  cr into tScript
  put pw=  quote  vehachhkl  quote  cr after tScript
  put echo $pw | sudo -S /usr/local/bin/postmaster -D /usr/local/pgsql/data
 -
  i  cr after tScript
  put shell(tScript)
 
  And this is the result for this script, I'm wondering.
  1
  But it doesn't open postgres
  Thanks again.
  Hershel
 
 
   On 10/4/06, Hershel Fisch [EMAIL PROTECTED] wrote:
   Hi, I'd greatly appreciate if some one can help me out on this one.
   How do I write this command with the shell function, I would write it
 in
   terminal as follows
  
   Su -  myUsr
   Password:
   And another command.
  
   Now the question is that every line above is a different entry
   If I put
   Put shell(su - myUsr) in the message box this is the result
   Password's: Sorry
  
   And also if I understand correctly every command with the shell
function
 is
   a different terminal and does not correspond to the previous shell
 reply, is
   that true? If so how do I write that every command should correspond to
 the
   previously respond?
  
  
   You have to construct the shell commands as a single string and do it
   all at once. Here's an example of how to use sudo to set the system
   clock, but just put whatever you want after the -S.
  
   put #!/bin/sh  cr into tScript
   put pw=  quote  tPass  quote  cr after tScript
   put echo $pw | sudo -S date   tDate  tTime  cr after tScript
   -- build the command lines, the command you need to run goes after the
 -S
   put shell(tScript) into tCheck  -- do the command  get the result
  
   You have to quote your admin password, but you can ask for that when
   running the script, or store it in a custom property.
  
   HTH,
   Sarah
   ___
   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
 
 ___
 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





-
This mail sent 

Re: Shell

2006-10-18 Thread hershf
Quoting Sarah Reichelt [EMAIL PROTECTED]:

 I have never used PostgreSQL, so I don't know how you normally start
 it. However from the error message, it appears that you don't start it
 with sudo, just with a standard user's login.
 
 Can you start PostgreSQL as normal from the Terminal and post the
 commands you use (blanking out any password). Then we can see how that
 needs to be altered to work directly from Rev.
 
 One other point: the message box does not always act exactly the same
 as a script in an object, so for testing, I suggest you make a button
 and do this in a mouseUp handler.
 
 Cheers,
 Sarah
first of all thanks for your response and sorry for the delay, accidently I 
posted my password and had to change it immediatly and some how my computer 
got locked and took a while till i got back to business plus the holidays.
Ok, I open terminal, quote
Hershel-Fischs-Computer:~ hershelfisch$ su - postgres
Password:
Hershel-Fischs-Computer:~ postgres$ /usr/local/bin/postmaster -D /usr/local/
pgsql/data -i
and quote
Thanks a million, Hersel Fisch

LOG:  database system was shut down at 2006-10-18 16:19:56 EDT
LOG:  checkpoint record is at 0/AD3C8C
LOG:  redo record is at 0/AD3C8C; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 1469; next OID: 17250
LOG:  database system is ready

 
 
 On 10/5/06, Hershel Fisch [EMAIL PROTECTED] wrote:
  On 10/4/06 6:51 AM, Sarah Reichelt [EMAIL PROTECTED] wrote:
  Thanks,
   this is what I put into the message box
 
  put #!/bin/sh  cr into tScript put pw=  quote  vehachhkl  quote
 
  cr after tScript
  put echo $pw | sudo -S /usr/local/bin/postmaster -D /usr/local/pgsql/data
 -
  i  cr after tScript
  put shell(tScript)
 
  This is the result for the above script
  Password:
  root execution of the PostgreSQL server is not permitted.
  The server must be started under an unprivileged user ID to prevent
  possible system security compromise.  See the documentation for
  more information on how to properly start the server.
 
  --put #!/bin/sh  cr into tScript
  put pw=  quote  vehachhkl  quote  cr after tScript
  put echo $pw | sudo -S /usr/local/bin/postmaster -D /usr/local/pgsql/data
 -
  i  cr after tScript
  put shell(tScript)
 
  And this is the result for this script, I'm wondering.
  1
  But it doesn't open postgres
  Thanks again.
  Hershel
 
 
   On 10/4/06, Hershel Fisch [EMAIL PROTECTED] wrote:
   Hi, I'd greatly appreciate if some one can help me out on this one.
   How do I write this command with the shell function, I would write it
 in
   terminal as follows
  
   Su -  myUsr
   Password:
   And another command.
  
   Now the question is that every line above is a different entry
   If I put
   Put shell(su - myUsr) in the message box this is the result
   Password's: Sorry
  
   And also if I understand correctly every command with the shell 
function
 is
   a different terminal and does not correspond to the previous shell
 reply, is
   that true? If so how do I write that every command should correspond to
 the
   previously respond?
  
  
   You have to construct the shell commands as a single string and do it
   all at once. Here's an example of how to use sudo to set the system
   clock, but just put whatever you want after the -S.
  
   put #!/bin/sh  cr into tScript
   put pw=  quote  tPass  quote  cr after tScript
   put echo $pw | sudo -S date   tDate  tTime  cr after tScript
   -- build the command lines, the command you need to run goes after the
 -S
   put shell(tScript) into tCheck  -- do the command  get the result
  
   You have to quote your admin password, but you can ask for that when
   running the script, or store it in a custom property.
  
   HTH,
   Sarah
   ___
   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
 
 ___
 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
 




-
This mail sent through IMP: http://horde.org/imp/
___
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: shell vs. process

2006-10-10 Thread Andrew


On 10/10/2006, at 6:52, Trevor DeVore wrote:


On Oct 9, 2006, at 4:23 PM, Luis wrote:

Any of you network gurus know if ping is possible with Rev right now 
using sockets?


It isn't possible under a traditional UNIX system. You need to be able 
to open a raw socket and AFAIK Rev has no way to do it. It also 
requires root access. Currently you would need the help of an external 
or other process.


Under OSX I believe there is an alternative method (never used it 
myself) that allows you to use a datagram socket rather than a raw one. 
This negates the need for root access but I still don't think Rev would 
give you access to this functionality.


Windows may be different again - not really my area.

HTH,

Andrew

___
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: shell vs. process

2006-10-10 Thread Dar Scott


On Oct 9, 2006, at 11:52 PM, Trevor DeVore wrote:

Any of you network gurus know if ping is possible with Rev right  
now using sockets?


The short answer is no.

Well, sometimes things sneak into Rev when I'm not looking.

Some computers have some service you can use like a ping and some are  
ping-like.  I imagine the pinging computer might have a local service  
for doing pings.  I don't think those count.


I have blocked ping on some servers, but normally this is and should  
be on.


I'd use shell() with the ping utility on OS X and Windows.

Dar
___
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: shell vs. process

2006-10-10 Thread Luis

Ok, there's my confidence in my Transcript abilities shot... :)

Let me know how it goes!

Cheers,

Luis.


Trevor DeVore wrote:

On Oct 9, 2006, at 4:23 PM, Luis wrote:


Hiya,

ICMPd sends the data packets in either TCP or UDP over that port 
number, check IANA: http://www.iana.org/assignments/port-numbers


I wrote some code to assemble the data packet on Saturday so I will give 
it a try over TCP.  I'll let you know how it goes.



--Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


___
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: shell vs. process

2006-10-10 Thread Luis
Have you tried on another site/IP address? I usually use Cisco, they 
don't block pings.


Cheers,

Luis.


Trevor DeVore wrote:

On Oct 9, 2006, at 4:23 PM, Luis wrote:


Hiya,

ICMPd sends the data packets in either TCP or UDP over that port 
number, check IANA: http://www.iana.org/assignments/port-numbers


Here is the packet structure: 
http://www.techbooksforfree.com/intro_to_data_com/page253.html


Luis,

How sure are you that ping over port 5813 using TCP should work on any 
system setup to look for ICMP echo mmessages?  I tried opening a socket 
to google over that port and I get a socketTimeout.


open socket 66.102.7.99:5813

If I run ping from terminal (OS X) then the ping to the same address 
works.  I can see in my traffic watcher (see below) that the protocol 
being used is ICMP (Protocol: 1).


Any of you network gurus know if ping is possible with Rev right now 
using sockets?



--Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


Traffic Watcher Data:


ICMP Echo Request packet from 10.0.1.2 to 66.102.7.99 (64 bytes)
IP Header:
Version: 4; Header Length: 20; TOS: 0; Packet Length: 84
Identifier: 12052; Fragment Offset: 0
Time To Live: 64; Protocol: 1; Header Checksum: 63178
ICMP Header:
Type: 8; Code: 0; Checksum: 63770
Identifier: 0; Sequence Number: 12834
Data:
08 00 F9 1A  0C B3 00 00  45 2B 32 22  00 07 8F DA  E+2
08 09 0A 0B  0C 0D 0E 0F  10 11 12 13  14 15 16 17  
18 19 1A 1B  1C 1D 1E 1F  20 21 22 23  24 25 26 27   !#$%'
28 29 2A 2B  2C 2D 2E 2F  30 31 32 33  34 35 36 37  ()*+,-./01234567
___
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: shell vs. process

2006-10-10 Thread Trevor DeVore

On Oct 10, 2006, at 1:54 AM, Luis wrote:

Have you tried on another site/IP address? I usually use Cisco,  
they don't block pings.


The IP isn't blocking pings since using ping from the OS X terminal  
works fine for that same IP address.


--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


___
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: shell vs. process

2006-10-10 Thread Trevor DeVore

On Oct 10, 2006, at 1:24 AM, Dar Scott wrote:


On Oct 9, 2006, at 11:52 PM, Trevor DeVore wrote:

Any of you network gurus know if ping is possible with Rev right  
now using sockets?


The short answer is no.

Well, sometimes things sneak into Rev when I'm not looking.


Bummer.

Some computers have some service you can use like a ping and some  
are ping-like.  I imagine the pinging computer might have a local  
service for doing pings.  I don't think those count.


I have blocked ping on some servers, but normally this is and  
should be on.


I'd use shell() with the ping utility on OS X and Windows.


That is what I have been using too.  I just thought it would be neat  
to have our own little socket version.  I think I am going to  
incorporate Sarah's method for not locking things up.  That was a  
neat solution.


--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


___
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: shell vs. process

2006-10-09 Thread Trevor DeVore


On Oct 8, 2006, at 10:34 AM, Luis wrote:


Hiya,

Ping runs over ICMP, the ICMPD to be precise (Port 5813) and  
insofar as I can see we can open

sockets in Revolution.


Only TCP and UDP protocols.  There doesn't seem to be a way to  
specify ICMP.  I've been meaning to file a feature request for this  
but haven't done so yet.


--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


___
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: shell vs. process

2006-10-09 Thread Luis
ICMPd is the daemon ('shell app') that runs the request over that  
port. It would be a case of recreating the ICMPd functionality in  
Rev, all it's doing is sending specifically formed packets over that  
port that servers/routers/etc running their own ICMPd will respond to.


It's a small app. If anyone else is interested then I might have a  
look at the code (should be able to get a hold of the C/C++ source  
code) and attempt to translate it to Transcript. Not too sure how  
tight I can get the timings, but it should be accurate enough.


Cheers,

Luis.


On 9 Oct 2006, at 17:42, Trevor DeVore wrote:



On Oct 8, 2006, at 10:34 AM, Luis wrote:


Hiya,

Ping runs over ICMP, the ICMPD to be precise (Port 5813) and  
insofar as I can see we can open

sockets in Revolution.


Only TCP and UDP protocols.  There doesn't seem to be a way to  
specify ICMP.  I've been meaning to file a feature request for this  
but haven't done so yet.


--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


___
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: shell vs. process

2006-10-09 Thread Trevor DeVore

On Oct 9, 2006, at 3:37 PM, Luis wrote:

ICMPd is the daemon ('shell app') that runs the request over that  
port. It would be a case of recreating the ICMPd functionality in  
Rev, all it's doing is sending specifically formed packets over  
that port that servers/routers/etc running their own ICMPd will  
respond to.


It's a small app. If anyone else is interested then I might have a  
look at the code (should be able to get a hold of the C/C++ source  
code) and attempt to translate it to Transcript. Not too sure how  
tight I can get the timings, but it should be accurate enough.


Luis,

I'm no expert in this area and I would love to learn that you can  
write your own ping utility in Rev.  I researched this a few days ago  
in an attempt to do so.  Creating the actual ICMP echo request  
message isn't a big deal in Rev.  I *think* the problem you would  
have is when that message gets wrapped up in the IP Datagram  
structure which I believe Rev does when you write to a socket.  The  
docs say that Rev's open socket command only uses TCP and UDP so  
there doesn't seem to be a way to send data over a socket that  
identifies itself as the ICMP protocol.  I would think that ping  
daemons would only watch for traffic that was send using the ICMP  
protocol but I don't know.



--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


___
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: shell vs. process

2006-10-09 Thread Luis

Hiya,

ICMPd sends the data packets in either TCP or UDP over that port  
number, check IANA: http://www.iana.org/assignments/port-numbers


Here is the packet structure: http://www.techbooksforfree.com/ 
intro_to_data_com/page253.html


Hope that helps!

Cheers,

Luis.


On 10 Oct 2006, at 0:10, Trevor DeVore wrote:


On Oct 9, 2006, at 3:37 PM, Luis wrote:

ICMPd is the daemon ('shell app') that runs the request over that  
port. It would be a case of recreating the ICMPd functionality in  
Rev, all it's doing is sending specifically formed packets over  
that port that servers/routers/etc running their own ICMPd will  
respond to.


It's a small app. If anyone else is interested then I might have a  
look at the code (should be able to get a hold of the C/C++ source  
code) and attempt to translate it to Transcript. Not too sure how  
tight I can get the timings, but it should be accurate enough.


Luis,

I'm no expert in this area and I would love to learn that you can  
write your own ping utility in Rev.  I researched this a few days  
ago in an attempt to do so.  Creating the actual ICMP echo request  
message isn't a big deal in Rev.  I *think* the problem you would  
have is when that message gets wrapped up in the IP Datagram  
structure which I believe Rev does when you write to a socket.  The  
docs say that Rev's open socket command only uses TCP and UDP  
so there doesn't seem to be a way to send data over a socket that  
identifies itself as the ICMP protocol.  I would think that ping  
daemons would only watch for traffic that was send using the ICMP  
protocol but I don't know.



--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


___
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: shell vs. process

2006-10-09 Thread Trevor DeVore

On Oct 9, 2006, at 4:23 PM, Luis wrote:


Hiya,

ICMPd sends the data packets in either TCP or UDP over that port  
number, check IANA: http://www.iana.org/assignments/port-numbers


I wrote some code to assemble the data packet on Saturday so I will  
give it a try over TCP.  I'll let you know how it goes.



--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


___
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: shell vs. process

2006-10-09 Thread Trevor DeVore

On Oct 9, 2006, at 4:23 PM, Luis wrote:


Hiya,

ICMPd sends the data packets in either TCP or UDP over that port  
number, check IANA: http://www.iana.org/assignments/port-numbers


Here is the packet structure: http://www.techbooksforfree.com/ 
intro_to_data_com/page253.html


Luis,

How sure are you that ping over port 5813 using TCP should work on  
any system setup to look for ICMP echo mmessages?  I tried opening a  
socket to google over that port and I get a socketTimeout.


open socket 66.102.7.99:5813

If I run ping from terminal (OS X) then the ping to the same address  
works.  I can see in my traffic watcher (see below) that the protocol  
being used is ICMP (Protocol: 1).


Any of you network gurus know if ping is possible with Rev right now  
using sockets?



--
Trevor DeVore
Blue Mango Learning Systems - www.bluemangolearning.com
[EMAIL PROTECTED]


Traffic Watcher Data:


ICMP Echo Request packet from 10.0.1.2 to 66.102.7.99 (64 bytes)
IP Header:
Version: 4; Header Length: 20; TOS: 0; Packet Length: 84
Identifier: 12052; Fragment Offset: 0
Time To Live: 64; Protocol: 1; Header Checksum: 63178
ICMP Header:
Type: 8; Code: 0; Checksum: 63770
Identifier: 0; Sequence Number: 12834
Data:
08 00 F9 1A  0C B3 00 00  45 2B 32 22  00 07 8F DA  E+2
08 09 0A 0B  0C 0D 0E 0F  10 11 12 13  14 15 16 17  
18 19 1A 1B  1C 1D 1E 1F  20 21 22 23  24 25 26 27   !#$%'
28 29 2A 2B  2C 2D 2E 2F  30 31 32 33  34 35 36 37  ()*+,-./01234567
___
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: shell vs. process

2006-10-08 Thread Luis

Hiya,

Ping runs over ICMP, the ICMPD to be precise (Port 5813) and insofar  
as I can see we can open

sockets in Revolution. It should be a case of creating a data packet and
sending it through (the Echo Request) to the IP address you're Pinging
to and listening for the 'Echo Reply' (which should be identical to the
initial Echo Request). The Echo Request follows a specific format (four
32bit packets?) so you'd need to recreate that. I haven't looked through
the binary tools in Revolution, so I'm not too sure how this would be
strung together.
If you're Pinging an 'address' (by which I mean the human readable form
of the IP address) then you'd need to get that translated into the IP
address for the packet send.

Another way round: If you want to 'Ping' a specific IP address (which
doesn't change AND you have access to the server) you could create a
small Revolution app for the other end (the server end) that will
respond to your 'Ping' request form your 'client' app (essentially,
you're recreating a two-way only Ping system with the Revolution sockets
at your disposal) so you needn't rely on shell/system calls.

Or: Use 'get URL' (or 'put URL') in Rev with a web address that exits -
If there's no data then either the site is down or the line is not up.

I know it's not exactly 'shell vs process' related, but I thought it
might help with avoiding a shell call just to check the line (via Ping).

Cheers,

Luis.


Sarah Reichelt wrote:


In Revolution, which function is better for calling a long-running
external process and reading data from the process in a non-blocking
format, for instance, streaming the output from tcpdump into a text
display?

Looking at the docs, it appears that process is what I want, but  
I saw

something that says that open process on OS X is only useful for
launching applications...not launching background command-line  
processes

and reading their output to stdout as one would expect to do on a
Unix-style platform. Since I am targeting OS X, I need to know how
others handle this.




Getting to this thread a bit late, but here is how I do a ping without
blocking anything else. It is very quick if the ping is successful,
but it's the failure delay that has to be allowed for.

___
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: shell vs. process

2006-10-06 Thread Andrew


On 05/10/2006, at 22:50, Mark Wieder wrote:


Hey! That's cheating! Darn - here I thought you had an example of how
to ping using sockets...


You need raw sockets for that (at least under UNIX like OSs) and I 
don't think there is a built in way to open a raw socket from 
Revolution.


Andrew

___
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: shell vs. process

2006-10-05 Thread Mark Wieder
Sarah-

Wednesday, October 4, 2006, 6:05:47 PM, you wrote:

 Getting to this thread a bit late, but here is how I do a ping without
 blocking anything else. It is very quick if the ping is successful,
 but it's the failure delay that has to be allowed for.

Hey! That's cheating! Darn - here I thought you had an example of how
to ping using sockets...

-- 
-Mark Wieder
 [EMAIL PROTECTED]

___
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: Shell

2006-10-04 Thread Sarah Reichelt

On 10/4/06, Hershel Fisch [EMAIL PROTECTED] wrote:

Hi, I'd greatly appreciate if some one can help me out on this one.
How do I write this command with the shell function, I would write it in
terminal as follows

Su -  myUsr
Password:
And another command.

Now the question is that every line above is a different entry
If I put
Put shell(su - myUsr) in the message box this is the result
Password's: Sorry

And also if I understand correctly every command with the shell function is
a different terminal and does not correspond to the previous shell reply, is
that true? If so how do I write that every command should correspond to the
previously respond?



You have to construct the shell commands as a single string and do it
all at once. Here's an example of how to use sudo to set the system
clock, but just put whatever you want after the -S.

put #!/bin/sh  cr into tScript
put pw=  quote  tPass  quote  cr after tScript
put echo $pw | sudo -S date   tDate  tTime  cr after tScript
-- build the command lines, the command you need to run goes after the -S
put shell(tScript) into tCheck  -- do the command  get the result

You have to quote your admin password, but you can ask for that when
running the script, or store it in a custom property.

HTH,
Sarah
___
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: Shell

2006-10-04 Thread Hershel Fisch
On 10/4/06 6:51 AM, Sarah Reichelt [EMAIL PROTECTED] wrote:
Thanks,
 this is what I put into the message box

put #!/bin/sh  cr into tScript put pw=  quote  vehachhkl  quote 
cr after tScript
put echo $pw | sudo -S /usr/local/bin/postmaster -D /usr/local/pgsql/data -
i  cr after tScript
put shell(tScript)

This is the result for the above script
Password:
root execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise.  See the documentation for
more information on how to properly start the server.

--put #!/bin/sh  cr into tScript
put pw=  quote  vehachhkl  quote  cr after tScript
put echo $pw | sudo -S /usr/local/bin/postmaster -D /usr/local/pgsql/data -
i  cr after tScript
put shell(tScript)

And this is the result for this script, I'm wondering.
1
But it doesn't open postgres
Thanks again.
Hershel


 On 10/4/06, Hershel Fisch [EMAIL PROTECTED] wrote:
 Hi, I'd greatly appreciate if some one can help me out on this one.
 How do I write this command with the shell function, I would write it in
 terminal as follows
 
 Su -  myUsr
 Password:
 And another command.
 
 Now the question is that every line above is a different entry
 If I put
 Put shell(su - myUsr) in the message box this is the result
 Password's: Sorry
 
 And also if I understand correctly every command with the shell function is
 a different terminal and does not correspond to the previous shell reply, is
 that true? If so how do I write that every command should correspond to the
 previously respond?
 
 
 You have to construct the shell commands as a single string and do it
 all at once. Here's an example of how to use sudo to set the system
 clock, but just put whatever you want after the -S.
 
 put #!/bin/sh  cr into tScript
 put pw=  quote  tPass  quote  cr after tScript
 put echo $pw | sudo -S date   tDate  tTime  cr after tScript
 -- build the command lines, the command you need to run goes after the -S
 put shell(tScript) into tCheck  -- do the command  get the result
 
 You have to quote your admin password, but you can ask for that when
 running the script, or store it in a custom property.
 
 HTH,
 Sarah
 ___
 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


  1   2   >