[REBOL] Re: FTP upload/download

2004-05-22 Thread Bohdan or Rosemary Lechnowsky

Júlio,

If you are running Windows, download

http://www.sonic.net/~amicom/bin/Smooth-Copy.exe

This is version 2.511.  It is written entirely in Rebol/View/Pro and has 
been encapped as an executable for easy distribution.  Simply copy it to 
where you want it installed and run it from that location.  It will create 
all necessary files silently.  Click on the ? in the upper right corner 
for help.

Added improved FTP handling recently thanks to Romano Paolo Tenca's 
ftp-util v0.1.57.2.

The program can be run from the command line.  If you need info and you 
can't find it in the help index, let me know!

I use it to back up close to 4000 files a night via FTP from a remote web 
server and ~45000 files on my local network.

A number of my clients use it daily for backing up local and remote files 
in a production environment as well.

Have fun!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

P.S. Look at the history file to get a feel for how much work I've put into 
this application over the past ~2.5 years.  If you find it useful, please 
let me know.  If you find it REALLY useful, I accept donations! ;-)  If you 
need some changes for your particular purposes, contact me off-list to 
discuss them.

At 03:34 PM 5/19/04 -0300, you wrote:

Hi,

Can anyone point me a script for upload (optionaly download) of a whole
directory to a ftp server? This server host my entire web site. It´s not
necessary a user interaction, once it will be scheduled to run at night.

Thanks in advance.


--
Júlio César Santana
 TRE/SE CODAN
(079) 216-8681


--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: unwanted processes ...

2004-05-01 Thread Bohdan or Rosemary Lechnowsky

Yes, one of my client's ISPs even wrote a script that kills Rebol processes 
because it was happening so often.  This is on BSDi.

It would be nice if this were fixed.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 10:43 AM 5/1/04 +1200, you wrote:


My ISP has again shut down my vanilla script, and rebol,
as there were 150 processes running :(

Anyone else having this problem.  They're running Solaris
sparq ... and I thought I was running latest core.

I had thought adding 'Quit to vanilla.r had solved the
problem.  Since most of these processes were most likely
spawned by bots crawling the site, I've now altered
.htaccess to exclude them all.  Bye bye googlebot! Hello,
anonymity :(

--
Graham Chiu
http://www.compkarori.com/vanilla/
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Dead rebol process

2004-04-27 Thread Bohdan or Rosemary Lechnowsky

Hallvard,

I've seen the same thing on older Rebol/Core executables (earlier than 
2.5.5) running on BSDi.  Carl S. stated there was a problem with earlier 
versions when they sent email.

Recently, I saw the same problem even on 2.5.5 for BSDi (the latest 
version).  It was due to a Corrupt Datatype error.

That's all I know about it for now.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 10:55 AM 4/27/04 +0200, you wrote:

Hi list,

I have a rebol script started by cron. Works fine mostly, but then 
suddenly I get this:
root1135   0.0  1.217932  16216 std- S11:39PM   0:41.29 rebol 
-cs /Users/hallvard/cvs/rebol/indexer.r
root1136   0.0  0.00  0 con- Z+1Jan70   0:00.00  (rebol)

The script has stopped, and the second line above shows (rebol) instead of 
being equal to the first line. Looking at /var/log/system.log I find 
nothing. My own logs give no hint either. Is this a known problem? What 
could be wrong? Memory use? I have no clue here.

Thanks for any help
HY

Prætera censeo Carthaginem esse delendam


--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] FTP problem

2004-04-19 Thread Bohdan or Rosemary Lechnowsky

Just an update for those interested.

Regarding the memory leak in FTP, over the weekend I was able to copy ~6500 
files over FTP using Smooth Copy before the memory leak caused the program 
to fail.  That's a definite improvement over the ~1500 files it was failing 
at last week.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: FTP memory leak?

2004-04-18 Thread Bohdan or Rosemary Lechnowsky

Anton,

Maybe more appropriately, I should rename it Smooth Copy unless it's FTP 
in which case it's Rough Copy as it works perfectly well when copying 
files locally (source and destination).

-Bo

At 11:54 PM 4/18/04 +1000, you wrote:

You should rename it to Rough Copy until this bug
is gone :)

Anton.

  Smooth Copy is a backup application that I am writing.  I have it
  encapped
  as smooth-copy.exe.  It is a standard Windows error when a
  program crashes.
 
  -Bo
 
  At 11:26 AM 4/17/04 +0200, you wrote:
 
  Smooth Copy has performed an illegal operation
  
  I did never see this error, what is Smooth Copy?
  
  ---
  Ciao
  Romano

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: FTP memory leak?

2004-04-18 Thread Bohdan or Rosemary Lechnowsky

Romano,

I intend to try to isolate the problem.  However, I have watched memory 
usage as it is copying several hundred files and it appears to remain 
relatively constant (slow increase until garbage collection kicks in when 
the memory usage goes back down).  Somewhere before it gets near 1500 files 
something goes haywire with FTP.  Hard to find problems when they happen 
infrequently during 1500 iterations, especially in a recursive application.

I'll add more logging to the script along with how many levels deep in 
recursion it is, what the memory usage is (system/stats), and what files it 
is copying to see if I can isolate the problem so I can then recreate and 
debug it.

-Bo

At 11:30 AM 4/18/04 +0200, you wrote:

Hi,

  Smooth Copy is a backup application that I am writing.  I have it encapped
  as smooth-copy.exe.  It is a standard Windows error when a program crashes.
 

Can't you isolate the problem?

Do you see memory use increasing more and more with task manager?

---
Ciao
Romano

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: FTP memory leak?

2004-04-18 Thread Bohdan or Rosemary Lechnowsky

Anton,

No, I mostly use read-io and straight 'read for general reading (like the 
configuration file for example).  I use open/binary/direct/read to open the 
source file.

-Bo

At 01:36 AM 4/19/04 +1000, you wrote:

Just out of interest, are you using read/lines anywhere?

Anton.

  Romano,
 
  I intend to try to isolate the problem.  However, I have watched memory
  usage as it is copying several hundred files and it appears to remain
  relatively constant (slow increase until garbage collection kicks in when
  the memory usage goes back down).  Somewhere before it gets near
  1500 files
  something goes haywire with FTP.  Hard to find problems when they happen
  infrequently during 1500 iterations, especially in a recursive
  application.
 
  I'll add more logging to the script along with how many levels deep in
  recursion it is, what the memory usage is (system/stats), and
  what files it
  is copying to see if I can isolate the problem so I can then recreate and
  debug it.
 
  -Bo

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: FTP memory leak?

2004-04-17 Thread Bohdan or Rosemary Lechnowsky

Smooth Copy is a backup application that I am writing.  I have it encapped 
as smooth-copy.exe.  It is a standard Windows error when a program crashes.

-Bo

At 11:26 AM 4/17/04 +0200, you wrote:

Smooth Copy has performed an illegal operation

I did never see this error, what is Smooth Copy?

---
Ciao
Romano

- Original Message -
From: Bohdan or Rosemary Lechnowsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, April 17, 2004 6:07 AM
Subject: [REBOL] Re: FTP memory leak?


 
  An update:
 
  Before using Romano's patch, I was consistently only able to copy ~250
  files from FTP to a local drive.  After Romano's patch, I was consistently
  able to copy ~1500 files.  And it isn't failing because of a lack of memory
  any longer.  It is getting the Smooth Copy has performed an illegal
  operation error message or Crash -- should not happen from Rebol.
 
  -Bo
 
  At 07:22 PM 4/13/04 +0200, you wrote:
 
  Hi Bo,
  
  dunno about the memory leak but here you can find Romano's latest
  ftp handler which I'm using successfully:
  
  http://www.rebol.net/cgi-bin/projects/track.r?id=149
  
  Will
  
  
  On 13 apr 2004, at 16:35, Bohdan or Rosemary Lechnowsky wrote:
  
   
Hello, all.
   
I was wondering if anyone had seen a memory leak related to FTP.  I
have
written a backup application using Rebol.  I can back up 50,000 local
files
without any problems, but if I try to back up ~250 files from an FTP
location to a local drive, Rebol's memory usage goes through the roof
and
then I get a crash due to not enough memory.
   
IIRC, someone wrote an improved FTP.  Does it address this?  Where can
I
get it?
   
Thanks!
   
Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting
   
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.
   
  
  --
  To unsubscribe from this list, just send an email to
  [EMAIL PROTECTED] with unsubscribe as the subject.
 
  --
  To unsubscribe from this list, just send an email to
  [EMAIL PROTECTED] with unsubscribe as the subject.
 

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: FTP memory leak?

2004-04-16 Thread Bohdan or Rosemary Lechnowsky

An update:

Before using Romano's patch, I was consistently only able to copy ~250 
files from FTP to a local drive.  After Romano's patch, I was consistently 
able to copy ~1500 files.  And it isn't failing because of a lack of memory 
any longer.  It is getting the Smooth Copy has performed an illegal 
operation error message or Crash -- should not happen from Rebol.

-Bo

At 07:22 PM 4/13/04 +0200, you wrote:

Hi Bo,

dunno about the memory leak but here you can find Romano's latest
ftp handler which I'm using successfully:

http://www.rebol.net/cgi-bin/projects/track.r?id=149

Will


On 13 apr 2004, at 16:35, Bohdan or Rosemary Lechnowsky wrote:

 
  Hello, all.
 
  I was wondering if anyone had seen a memory leak related to FTP.  I
  have
  written a backup application using Rebol.  I can back up 50,000 local
  files
  without any problems, but if I try to back up ~250 files from an FTP
  location to a local drive, Rebol's memory usage goes through the roof
  and
  then I get a crash due to not enough memory.
 
  IIRC, someone wrote an improved FTP.  Does it address this?  Where can
  I
  get it?
 
  Thanks!
 
  Bohdan Bo Lechnowsky
  Lechnowsky Technical Consulting
 
  --
  To unsubscribe from this list, just send an email to
  [EMAIL PROTECTED] with unsubscribe as the subject.
 

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] FTP memory leak?

2004-04-13 Thread Bohdan or Rosemary Lechnowsky

Hello, all.

I was wondering if anyone had seen a memory leak related to FTP.  I have 
written a backup application using Rebol.  I can back up 50,000 local files 
without any problems, but if I try to back up ~250 files from an FTP 
location to a local drive, Rebol's memory usage goes through the roof and 
then I get a crash due to not enough memory.

IIRC, someone wrote an improved FTP.  Does it address this?  Where can I 
get it?

Thanks!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] X10

2004-03-19 Thread Bohdan or Rosemary Lechnowsky

I looked at Parki's X10 example he sent to the list a while back, but I 
couldn't get it to work with the Firecracker wireless serial 
controller.  I'm assuming his was written for the powerline interface or 
somesuch.

I have the technical specs for sending data to the Firecracker serial 
controller, but I'm not sure if I understand exactly why my attempt isn't 
working.  First, the technical info:

http://www.geocities.com/ido_bartana/Firecracker_protocol.htm

Here is what I tried:

  system/ports/serial
== [com1 com2]

I have the interface plugged into com1, so that's good.

  x10: open/binary/direct/no-wait serial://port1/4800/8/none/1

I tried with and without the following lines:

  x10/rts-cts: false
== false
  update x10

If I left the above lines out, Rebol would lock-up (totally) after the 
'insert below.

  insert x10 2#{11010101 10101010 0110  10101101}
  close x10

Unfortunately, this doesn't turn on my light.  If I use the (limited) 
software from X10 it turns on the light, so I know the computer and 
interface are working.

I think I may not be understanding the whole RTS/DTR table they've got 
going on there.  Is it possible to simulate that in Rebol?  If so, how?

Thanks in advance!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: MySql question

2004-03-10 Thread Bohdan or Rosemary Lechnowsky


   (as for mysql-protocol)

   Don't let the 0.9.9 fool ya.. My experience
   is that it is rock-solid. And I literally use
   it daily and it is currently being used for
   a web-based system of over 200,000 records

Network- and web-accessible system with approx. 1.5 million records 
here.  The stability is amazing.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] X10

2004-03-08 Thread Bohdan or Rosemary Lechnowsky

Has anyone written a Rebol controller for X10's FireCracker interface?

I have the documentation on it, but didn't want to duplicate efforts if 
someone has already implemented it.

Thanks!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Wake up ;-)

2004-03-01 Thread Bohdan or Rosemary Lechnowsky

At 06:33 PM 3/2/04 +1300, you wrote:
What could this plug-in be useful for? Please note this is not sticking a
knife into Rebol's back, I had the same question for Java applets as well!

--
Andrew J Martin
ICQ: 26227169

I suppose it could be used anywhere where Flash might be used.

Also, one of my clients has recruiters that work in different locations and 
this would allow all of them to access the same application regardless of 
location.  They use IOS for that right now.  The plugin approach requires 
less time (and money) to get up and running.

Also, many people are more comfortable running applications in the context 
of a browser.

Just a few ideas.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [ANN] Async call:// protocol v1.0

2004-02-17 Thread Bohdan or Rosemary Lechnowsky

DocKimbel,

Yet another outstanding offering!

You made my evening!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 01:04 AM 2/18/04 +0100, you wrote:

Hi all,

This is a replacement version of the 'call command for Windows-only
platforms. This is an asynchronous 'call implementation working as a
REBOL port (call://). It requires the /Library component. See the
documentation included for a complete description.

Download URL: http://rebol.softinnov.org/dl/async-call-r100.zip

This archive contains :
- The call:// protocol script
- A commented version of this script
- The complete documentation in HTML format
- The Multiple Ping demo script

Hope that you'll find it useful.

-DocKimbel
PS: Who said I'm not able to make 1.0 versions ? ;-)
--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: [OFF-LIST] geoswf rebol programmer

2004-01-02 Thread Bohdan or Rosemary Lechnowsky

Jason,

I'd be interested in working on this project.  Let me know if you'd like to 
discuss this further.

Happy New Year!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: FTP

2003-12-02 Thread Bohdan or Rosemary Lechnowsky

Romano,

All I can say is thank you for your dedication in this area.  I had to 
recently abandon using FTP for a project because of insurmountable bugs in 
the original implementation of the protocol.

Looking forward to the new and improved FTP implementation.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 05:41 PM 12/2/03 +0100, you wrote:

The last beta release has reached a good point. All known bug fixed (among
them low connections number)

I should like to extend the base of testers before the final release.

If someone want to test it, he can send an email to my address.

People with ftp connections to MS servers, exotic FTP servers, servers
stripped down, proxy of every types, low numbers (1 2) of connections are
welcome!

---
Ciao
Romano

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Serial-Ports Linux / Psion Link Protocol

2003-11-14 Thread Bohdan or Rosemary Lechnowsky

Frank,

I use my Psion S5 every day and I do keep my work log on it, so it would be 
handy to have the psion:// protocol to help automate the process.

Now if you have functions to convert Psion Sheet files to CSV and CSV files 
back to Psion Sheet, that would be even better! ;-)

I worked on reverse-engineering the Psion Sheet file format, but that was 
years ago and I don't know what I did with the source.  It wasn't 100% 
complete in any case.

Thanks!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 08:57 AM 11/13/03 +0100, you wrote:

Hi!

If you want to use the serial ports with linux, the following function
could help. Rebol does not set all serial-parameters correctly. Use the
set-serial-port function to the port after it is opened to fix it. You
have to use latest BETA-Version of REBOL because it needs the
set-browser-path feature.
If you want to use browse within your program, you will have to
set-browser-path again after using this function.

USAGE:
port: open/direct/binary [scheme: 'serial rts-cts: no speed: 115600]
set-serial-port port

Maybe you will want to use this, too:
 if find [3 4] system/version/4 [
 system/ports/serial: [ttyS0 ttyS1]
 ]

Is someone interested in my psion-protocol (read psion://port1/c/..) or
psion-backup.r to transfer files from/to Psion-S5 devices?

CU
Frank

set-serial-port: func [port /local] [
 if system/version = 1.2.10.4.2 [
set-browser-path bash
browse rejoin [
 {-c stty --file /dev/}
 pick system/ports/serial to-integer skip
form port/device 4
 { }
 either port/rts-cts [] [-]
 {crtscts }
 {cs} any [port/data-bits 8] { }
 either 2 = port/stop-bits [] [-] {cstopb }
 switch/default port/parity [
 none[-parenb]
 odd [parenb parodd]
 even[parenb -parodd]
 ] [
 -parenb
 ]
 { }
 { -ixon -ixoff ispeed } port/speed { ospeed }
port/speed {}
 ]
 ]
]


--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Formatting a display line

2003-11-06 Thread Bohdan or Rosemary Lechnowsky

Steven,

OR, you could simply download my align.r function from the Rebol library:

http://www.rebol.org/cgi-bin/cgiwrap/rebol/view-script.r?script=align.r

It has optional alignment (center, right, etc.) and is very easy to use.

Have fun!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 05:04 PM 11/4/03 -0600, you wrote:

Hi, Steven,

The typing of the parameter has already been pointed out, but
let me give you a speed improvement as well.

Using SOURCE shows us that APPEND is essentially INSERT TAIL
(just what you'd expect), and INSERT has a /DUP refinement that
duplicates the insertion, so instead of ...

Steven White wrote:
 
  ADD-FILLER: func [
  Add a specified number of blanks to FORMATTED-LINE
  SPACE-COUNT integer!
  ] [
  PRINT [NOW WE WILL ADD  SPACE-COUNT  SPACES]
  loop SPACE-COUNT [
  append FORMATTED-LINE;; 
  PRINT [FORMATTED LINE IS  LENGTH? FORMATTED-LINE 
  BYTES: FORMATTED-LINE]
  ]
  ]
 

... just define ...

add-filler: func [
  add specified number of spaces to formatted-line
  space-count [integer!]
][
  insert/dup tail formatted-line   space-count
]

--
--
Joel NeelyjoelDOTneelyATfedexDOTcom   901-263-4446

Enron Accountingg in a Nutshell: 1c=$0.01=($0.10)**2=(10c)**2=100c=$1


--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Hitting the learning curve

2003-11-06 Thread Bohdan or Rosemary Lechnowsky

Max,

Wanted to let you know I am looking forward to Steel/Liquid/Glass when it 
is available.  What stops me from looking into it right now is that I need 
to focus on tools that are completed that I can use in my 
business.  Unfortunately, I have little to no free time to spend on other 
projects.

I use Rebol a lot and every day, but hardly ever on my own time.  When Carl 
developed VID, I recall him saying that he hoped it would be inspiration 
for the user community to come up with something more robust and 
specialized.  I believe VID was more of a proof-of-concept than THE solution.

Thanks for taking the reins in this aspect.

A future Steel/Liquid/Glass user,

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 11:15 AM 11/5/03 -0500, you wrote:
since every one is in on the discussion and you nailed it so good, I want 
to emphasise that this is specifically what steel|forge will be about... 
when it will exist.


ciao!

-MAx
-
Steel project coordinator
http://www.rebol.it/~steel
-

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Hitting the learning curve

2003-11-06 Thread Bohdan or Rosemary Lechnowsky

Max,

I also miss those days.  It was quite a blessing to be able to take hard 
questions, try to figure out the answer myself, and if I really needed to I 
could walk into Carl's office (if his door was open) or one of the other 
developers and get a definitive answer.

Sometimes, the question was a pivotal point so Carl would think about it 
for a while (and he really put thought into all the issues) and sometimes 
he would call a development meeting to get others' opinions on which 
direction to take Rebol.

I was also very impressed to see how in-depth Carl thought about something 
before implementing it.  I never sensed that he coded off the cuff, but 
only after extensive mental deliberation weighing all the pros and cons and 
keeping an eye on the future.

Rebol is an amazing piece of work.  I agree that the main ingredient 
missing now is communication from the top.

I have a potential solution.  I'll see if I can set up a meeting with Carl 
to discuss it.  It will benefit both the Rebol community and RT itself.

Stay tuned.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 10:22 AM 11/6/03 -0500, you wrote:

WOW, that lifts the spirit...

btw, I USED to say to other programmers that rebol had fantastic 
support... I miss the days when you where there to answer all our 
questions... it rarely took more than a day, and sometimes those where 
hard questions...

now I think this list is the main support line... maybe RT counts on it a 
little too much?

thanks!

-MAx
---
You can either be part of the problem or part of the solution, but in the 
end, being part of the problem is much more fun.


  -Original Message-
  From: Bohdan or Rosemary Lechnowsky [mailto:[EMAIL PROTECTED]
  Sent: Thursday, November 06, 2003 2:47 AM
  To: [EMAIL PROTECTED]
  Subject: [REBOL] Re: Hitting the learning curve
 
 
 
  Max,
 
  Wanted to let you know I am looking forward to
  Steel/Liquid/Glass when it
  is available.  What stops me from looking into it right now
  is that I need
  to focus on tools that are completed that I can use in my
  business.  Unfortunately, I have little to no free time to
  spend on other
  projects.
 
  I use Rebol a lot and every day, but hardly ever on my own
  time.  When Carl
  developed VID, I recall him saying that he hoped it would be
  inspiration
  for the user community to come up with something more robust and
  specialized.  I believe VID was more of a proof-of-concept
  than THE solution.
 
  Thanks for taking the reins in this aspect.
 
  A future Steel/Liquid/Glass user,
 
  Bohdan Bo Lechnowsky
  Lechnowsky Technical Consulting
 
  At 11:15 AM 11/5/03 -0500, you wrote:
  since every one is in on the discussion and you nailed it so
  good, I want
  to emphasise that this is specifically what steel|forge will
  be about...
  when it will exist.
  
  
  ciao!
  
  -MAx
  -
  Steel project coordinator
  http://www.rebol.it/~steel
  -
  
  --
  To unsubscribe from this list, just send an email to
  [EMAIL PROTECTED] with unsubscribe as the subject.
 
  --
  To unsubscribe from this list, just send an email to
  [EMAIL PROTECTED] with unsubscribe as the subject.
 
 

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] FTP woes

2003-10-22 Thread Bohdan or Rosemary Lechnowsky

Hello!

I am trying to write a large number of large files to an FTP server using 
Rebol.  The first dozen or two will go fine, but after that I get the 
following error when trying to open the FTP port:

make object! [
 code: 501
 type: 'access
 id: 'not-open
 arg1: Port^@
 arg2: 
 arg3: none
 near: [open/binary/new/write/direct dstfile]
 where: 'get-cur-dir
]

dstfile looks something like this:

ftp://user:[EMAIL PROTECTED]/test/sitebuilder.r.old

If the file does not already exist, open/new should create a new file.  The 
odd thing here is that it works for the first dozen or two.

I also tried running the same script on my home network to another computer 
running an FTP server, but got the same results, although even quicker.

I've tried setting system/schemes/ftp/passive to true, false and none with 
no luck.

Has anyone else seen this problem?  If so, do you know of a solution?

Thanks!

-Bo

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Euro and German currency

2003-10-21 Thread Bohdan or Rosemary Lechnowsky

Andrew,

Rebol's Currency datatype will accept the following format:

  EUR$123'456,00
== EUR$123456.00

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 10:12 PM 10/21/03 +1300, you wrote:

Can people living in Europe or Germany confirm whether these formats for
currency look right, please?

Euro: 123.456,00 €
German Mark: 123.456,00 DM
US Dollar: $123,456.00

Unfortunately, Rebol doesn't yet understand the above formats:
  123.456,00€
** Syntax Error: Invalid decimal -- 123.456,00€
** Near: (line 1) 123.456,00€
  123.456,00DM
** Syntax Error: Invalid decimal -- 123.456,00DM
** Near: (line 1) 123.456,00DM


Andrew J Martin
Speaking in tongues and performing miracles.
ICQ: 26227169
http://www.rebol.it/Valley/
http://valley.orcon.net.nz/
http://Valley.150m.com/
--

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.


-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: CMS in REBOL?

2003-10-16 Thread Bohdan or Rosemary Lechnowsky

A bit of history...

When I was at RT, I wrote a website search for developer.rebol.net where 
the library used to be located (or was it demo.rebol.net...I forget) using 
Rebol.  It was fast and nice (in my opinion), and it showed the power of 
Rebol.  However, RT later switched to a different search tool perhaps 
because they didn't want to invest the time to extend it for more general 
web site searches, or perhaps my initial design was flawed when it was 
considered to be extended.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 09:42 PM 10/16/03 -0400, you wrote:

  Click the Developer Web Links on www.rebol.com home page, and there it
is
  in the middle of the page -- It calls it An amazing, extensible wiki/blog
  powered by small REBOL script modules.
 
  I'm not sure it's the *right* link, but it's start.

Good news.. thanks.

Search would seem to tbe one of the things Rebol excels at.
So I assumed wrongly [again] that rebol.com would try and seriously
demonstrate that.

Vanilla still deserves much better write-up from RT and elsewhere. Maybe
they don't really understand appreciate it, except by hearsay?

- Jason

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Cunning use of [], () {} in R# and in future? Rebol versions?

2003-10-15 Thread Bohdan or Rosemary Lechnowsky

Andrew,

That would break some existing Rebol scripts.  Right now, someone might 
have some Rebol code written like:

x: true
either X[2][3]

This would break with your implementation.

Why not use X/2 ?  It's shorter anyway.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 05:05 PM 10/16/03 +1300, you wrote:

It occurred to me as I was writing Rebol code, that it's possible to
re-use these characters [], ()  {}, in useful ways. I've noticed that
when I'm writing block!, paren!  string values, I leave white space
before and after the [], ()  {} characters. It would be nice to have:

  X: [a b c]
== [a b c]
  X[2]
== b

In other words, by running the block hard against the word, it's like:
 pick X 2

I don't know what use () and {} could have, though. What's your
thoughts?

Andrew J Martin
Attendance Officer
 Grail Jedi who is tapping on the dungeon wall with Rebol...
Colenso High School
Arnold Street, Napier.
Tel: 64-6-8310180 ext 826
Fax: 64-6-8336759
http://colenso.net/scripts/Wiki.r?AJM
http://www.colenso.school.nz/

DISCLAIMER: Colenso High School and its Board of Trustees is not 
responsible (or legally
liable) for materials distributed to or acquired from user e-mail 
accounts. You can report any
misuse of an e-mail account to our ICT Manager and the complaint will be 
investigated.
(Misuse can come in many forms, but can be viewed as any material 
sent/received that
indicate or suggest pornography, unethical or illegal solicitation, 
racism, sexism, inappropriate
language and/or other issues described in our Acceptable Use Policy.)

All outgoing messages are certified virus-free by McAfee GroupShield 
Exchange 5.10.285.0
Phone: +64 6 843 5095  or  Fax: +64 6 833 6759  or  E-mail: 
[EMAIL PROTECTED]


--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Windows Crash

2003-10-02 Thread Bohdan or Rosemary Lechnowsky

Steffen,

Some of the commercial applications I've written:

A recruiting database that automates a number of functions for the 
recruiters including automated faxing and emailing.  Contains close to 
1,500,000 candidates and over 500,000 communication records including 
resumes in .doc and .pdf formats.  Allows automatic branding of resumes 
with a corporate logo and disclaimer when sending out to prospective 
employers.  Many, many other functions.

Caller ID application that notifies all specified computers on a network 
when calls are coming in and who the call is from.  Only one computer needs 
a caller ID capable modem.  Allows storage and retrieval of notes on 
specific calls and callers so anyone in the office can know who handled the 
caller in the past and what the call was about immediately.

Point of Sale application that allows for easy invoicing, sales reports, 
and customer contact information.

Easy website builder.  Takes a directory on a local computer and turns each 
subdirectory into its own page automatically organizing the text files and 
pictures in that directory into the page.  See http://www.lechnotech.com 
for an example of a site built with this tool.  (Sorry the site doesn't 
look so good, haven't had time to polish it up yet.)

Terminal emulation program that connects to a mainframe through a serial 
port and allows a customizable interface on a PC with extended 
functionality instead of using a dumb terminal.

And there's lots more, but I need to get busy so I can support my family. :-)

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting


At 02:20 PM 10/2/03 +0200, you wrote:

Hi Gabriele  Bohdan,

Thank you for your comments re commercial applications.

I should be very happy to be convinced.

I'm also curious as to what type af applications?

Regards Steffen


- Original Message -
From: Bohdan or Rosemary Lechnowsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 01, 2003 3:59 PM
Subject: [REBOL] Re: Windows Crash


 
  At 09:53 AM 10/1/03 +0200, you wrote:
  On Tuesday, September 30, 2003, 8:24:08 PM, you wrote:
  SKP I gives me the feeling that it's a bit bit early for commercial
  aplications.
  
  I  have  delivered  a  number  of commercial applications and will
  continue to do so. It has saved me a LOT of time and work and will
  continue to do so. YMMV. :-)
  
  Regards,
  Gabriele.
 
  I have also delivered a number of commercial applications with great
  success.  As with any language, there are some things you should simply
  avoid doing.
 
  Bohdan Bo Lechnowsky
  Lechnowsky Technical Consulting
 
  --
  To unsubscribe from this list, just send an email to
  [EMAIL PROTECTED] with unsubscribe as the subject.
 

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Smart Client

2003-10-01 Thread Bohdan or Rosemary Lechnowsky

Well said, Gregg!

-Bo

At 09:53 AM 9/30/03 -0600, you wrote:

Hi Andrew,

AJM It reminds me of the promise of Rebol, but seems to deliver. :-/

Ouch! And I disagree; I don't see the promise of REBOL in those terms
at all. I would also say we need to define seems to deliver. I think
only time will tell how well .NET lives up to its ad campaign. :)
People are the in honeymoon phase with .NET, and just because some
things are better than they were before (current perception anyway),
doesn't mean they were great to begin with. :)

-- Gregg

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Windows Crash

2003-10-01 Thread Bohdan or Rosemary Lechnowsky

At 09:53 AM 10/1/03 +0200, you wrote:
On Tuesday, September 30, 2003, 8:24:08 PM, you wrote:
SKP I gives me the feeling that it's a bit bit early for commercial 
aplications.

I  have  delivered  a  number  of commercial applications and will
continue to do so. It has saved me a LOT of time and work and will
continue to do so. YMMV. :-)

Regards,
Gabriele.

I have also delivered a number of commercial applications with great 
success.  As with any language, there are some things you should simply 
avoid doing.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: Windows Crash

2003-09-29 Thread Bohdan or Rosemary Lechnowsky

Matt,

I've seen it happen when Rebol consumes too much memory.  Check out 
system/stats to see how much memory your program is consuming (maybe keep a 
running logfile to see if this is the case).  I wrote an application that 
started to do strange things including Windows system crashes when memory 
consumption got above 100MB.  There are ways to get Rebol to minimize 
memory usage.  I find this becomes much more of an issue when writing large 
apps or long-running apps.

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting

At 09:48 AM 9/29/03 -0400, you wrote:

I'm not saying it's a bug at all.  It could just be something I'm doing.  I
just wanted to know if any particular situations, loops, timers, engages,
etc. have a tendency to cause this problem

Matt


 From: Matt MacDonald [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [REBOL] Windows Crash
 Date: Mon, 29 Sep 2003 08:23:35 -0400
 
 
 Does anybody know any common circumstances in REBOL that would cause a
 REBOL
 program to crash in windows.  You know, that do/don't send info to
 microsoft
 crash?  I'm not really even sure where to start looking to fix something
 like that.
 
 Matt
 
 _
 Get McAfee virus scanning and cleaning of incoming attachments.  Get
 Hotmail
 Extra Storage!   http://join.msn.com/?PAGE=features/es
 
 --
 To unsubscribe from this list, just send an email to
 [EMAIL PROTECTED] with unsubscribe as the subject.
 

_
Add MSN 8 Internet Software to your existing Internet access and enjoy
patented spam protection and more.  Sign up now!
http://join.msn.com/?page=dept/byoa

--
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.



[REBOL] Re: file uploads

2002-08-29 Thread Bohdan or Rosemary Lechnowsky

I haven't been following this thread, but I have written HTTP upload 
scripts for a few sites.  Here's an excerpt from one of them that I hope 
will help.

#!/usr/local/bin/rebol/rebol -cs
REBOL []

print Content-type: text/html^/^/

if error? err: try [
input-cgi: func [/local buffer stdin] [
 buffer: copy 
 either system/options/cgi/request-method = POST [
 until [
 stdin: make string! 4000
 read-io system/ports/input stdin 4000
 append buffer stdin
 zero? length? stdin
 ]
 return buffer
 ][system/options/cgi/query-string]
]

;probe PRE
cgi: replace/all replace/all input-cgi ^J ^M ^M^J ^M
;probe /PRE

write/append %access.log reform [%batch now system/options/cgi/remote-addr 
system/options/cgi/query-string newline]

query: make object! []

if find cgi ^M^MContent-Disposition: [replace/all cgi ^M^M ^M]
while [cgi: find/tail cgi {name=}][
 nm: copy/part cgi find cgi {}
 cgi: find/tail cgi ^M^M
 data: copy/part cgi cgi: find cgi ^M--
 query: make query compose [(to-set-word nm) data]
]

error? try [write %batch.txt mold query true]
...
][handle-error]

It may be a bit of a hack, but it's been getting the job done for the past 
year or so.

Have fun!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting


At 06:12 AM 8/29/02 -0400, you wrote:
http://cgi.resourceindex.com/Programs_and_Scripts/Perl/File_Management/File_Uplo
ading/

Lots of Perl scripts for file upload over http.
Hopefully some of these will be translated into Rebol

./Jason

--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: Rebol/core likes to access/execute windows dll's

2002-08-15 Thread Bohdan or Rosemary Lechnowsky

Actually, I recall someone who wrote middleware that would accept a TCP 
connection and would give greater access to the operating system.  For 
example, with RunDLL32 from the MS-DOS prompt, you can call many 
.dlls.  Unfortunately, that was a while ago (pre-View, I think) so it may 
be hard to try to dig up the info.

-Bo

At 10:17 AM 8/15/02 -0600, you wrote:
Hi Norman,

 Is it possible to access DLL's from within windows using rebol/core? 

No. You need View/Pro or /Command.

 I'm trying to access my WEBCAM from rebol and disblay
direct IO trough rebol/core and finaly trough rebol/view.
Any change this might work? 

All the webcam stuff I've done has been non-local, so I'm not sure how the
interface to your camera might work. You can open a serial port and read
data from it, but I don't have any experience with using it for webcams to
say if it's possible.

--Gregg

--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: Windows registry keys

2002-08-15 Thread Bohdan or Rosemary Lechnowsky

I don't have a path anything similar to that in my registry.

I have Rebol in HKEY_CURRENT_USER\Software\Rebol and 
HKEY_USERS\Default\Software\Rebol

Hope this helps!

-Bo

At 03:37 AM 8/16/02 +1000, you wrote:
I am looking into the windows registry

I wonder if other people have exactly the same
long path element as in below:

HKEY_USERS\S-1-5-21-1614895754-688789844-1060284298-1000\Software\Rebol

Are the numbers exactly the same?

I am interested in making a silent install for rebol.

Anton.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Commercial-quality REBOL programmers needed

2002-08-14 Thread Bohdan or Rosemary Lechnowsky

Hi rebol-list!

I would like to apologize if anyone finds this email irrelevant to the 
list.  I am posting it here as my understanding of the REBOL mailing list 
is to further the spread and acceptance of the language.  I believe using 
the language for commercial projects is key to this goal.  Anyone who knows 
me knows that I am a BIG advocate of REBOL - I've built my own business 
around REBOL as a key building block.

Lately it has become apparent that I do not have the time to handle all the 
work that comes my way all the time, so I am looking for some intermittent 
assistance in this area.  I primarily do REBOL scripting, but sometimes 
REBOL is not the best fit for the requirements of a project, so knowledge 
in other areas is also helpful.

If you would like to help crank out REBOL programs and projects using other 
technologies, please send me an email directly to [EMAIL PROTECTED]  Also, 
if you have developed (or are developing) some commercial-quality software, 
I may be interested in presenting it to my existing and new clients.

Handy things to know (the more you know the better):

-   REBOL/View
-   Accessing .dll files from REBOL (View/Pro or Command)
-   Web technologies (CGI, HTML, SSL, etc.)
-   Network protocols (mostly TCP scripting in REBOL)
-   Database technologies (SQL, etc.)
-   Security (mostly encryption and authentication)
-   Other languages (C, Perl*, PHP*, etc.)

* These languages are sub-par to REBOL but some clients require them.

I have two potential projects currently and may be getting more 
soon.  These projects could start immediately.

Looking forward to your response!

-Bo

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: REBOL compiler?

2002-07-29 Thread Bohdan or Rosemary Lechnowsky

Val,

REBOL/Encap is not a compiler but it does encapsulate your REBOL scripts 
with the executable making it a one-file standalone .exe.  Contact REBOL 
about pricing.

Bohdan Bo Lechnowsky
Freelance Technology/REBOL Consultant

At 04:41 PM 7/29/02 +0200, you wrote:
Hi all

Does anybody know if there is a compiler for rebol available? Yes I know,
the fact that it uses an interpreter makes it more easily portable etc., but
what if you like to give somebody a useful rebol application and the person
has no rebol interpreter installed on her/his computer (many people will be
overtaxed, just when interpreter) ?

I really like rebol, but is there just one compiler out there?

Cheers, Val



--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: Evaluating if's

2002-07-02 Thread Bohdan or Rosemary Lechnowsky

Chalz,

Instead of using AND and OR, the better REBOL way is ALL and ANY.  Try this:

if all [2 = length? p: parse filename . find pick p 2 htm][...]

I left off the not none? in front of the 'find because 'none 
automatically gets evaluated as 'false but a successful 'find (which 
returns an index into the series) is evaluated as 'true.

You can embed ANYs and ALLs inside of each other if you have a more complex 
statement.  I do it all the time.  There are other neat uses for ANY and 
ALL (in particular), but I hope you get the point for this example.

Later!

-Bo
Lechnowsky Technical Consulting
REBOL VAR

At 11:51 PM 7/1/02 -0400, you wrote:
Here's a little question.  Perhaps I've been spoiled in other 
 languages, but
this is starting to frustrate me.  I have something like:
if THIS and THAT []
Thing is, if THIS is false, it continues to evaluate THAT anyways.  What's the
point?  The result is obviously false anyways.  I'm working on a case like 
this
(perhaps someone can provide a more elegant solution):
if (2 = length? p: parse filename .) AND (not none? find pick p 2 htm)
[ ...
Obviously, if the first condition is false, I want it to quit without
evaluating the second condition.  Help?  Any way I can continue doing this in
the same line, and without worrying about throwing and catching errors?  Or am
I more or less doomed to yet another nested if?  Thanks folks.

--Charles

--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: View/Pro and accessing Windows Printer API (gdi32.dll)

2002-07-02 Thread Bohdan or Rosemary Lechnowsky

Thanks Gregg!

What a wonderful bunch of help I've received in getting this working!  I 
hope others on the list have gained some insight as well on using the 
library component!

It appears to work now, but is giving me fits on my home printer (but no 
errors).  I'm going to try it on a client's computer tomorrow to see if it 
is only my printer and not the program itself that is messed up.  Below 
I've included the script with Gregg's additions and the rest of the 
functionality needed, although it is still horribly messy and un-optimized.

In case you are curious, the error I'm getting is this:

[Printers Folder]
There was an error writing to LPT1: for the printer (Brother MFC3100C):
There was a problem printing to the network resource.  Check to
make sure the printer server is working properly, and try printing again.
[OK]

When I change the printer to use the built-in virtual driver (BRMFC:), I 
get the following message:

[Printers Folder]
There was an error writing to BRMFC: for the printer (Brother MFC3100C):
The specified path is invalid.
[OK]

What path?  What network resource?  It is a local printer connected to LPT1:.

Anyway, here is the script (beware of line-wrapping).  Let me know directly 
if you have success/failure using this script:

winspool: load/library %winspool.drv
kernel32: load/library %kernel32.dll

print Define GetLastError
getlasterror: make routine! [
 return: [long]
] kernel32 GetLastError

print Define OpenPrinter
openprinter: make routine! [
 Open Printer
 pprintername [string!]
 phprinter [char*]
 pdefault [integer!]
 return: [integer!]
] winspool OpenPrinterA

print {Define ClosePrinter - Thanks to Gregg Irwin on REBOL list}
closeprinter: make routine! [
 Close Printer
 hprinter [integer!]
 return: [integer!]
] winspool ClosePrinter

; DOCINFO is used by StartDoc, and has a different structure than 
StartDocument,
; which the spooler uses. StartDoc is what you use for the actual printing
; commands (to a device context). The spooler uses the DOC_INFO_1 structure
; which doesn't have the size or type elements.
print Define StartDocPrinter
startdocprinter: make routine! [
 StartDocPrinter
 hprinter [integer!]
 dwlevel [integer!]
 lpbdocinfo [
 struct! [
 ;cbsize [int]
 lpszdocname [string!]
 lpszoutput [string!]
 lpszdatatype [string!]
 ;fwtype [int]
 ]
 ]
 return: [integer!]
] winspool StartDocPrinterA

print {Create a Null Buffer - Thanks to Gregg Irwin and Gabriele Santilli 
on REBOL list}
null-buff: func [len][
 head insert/dup make string! len #^(00) len
]

print {Create Pointer Variable - Thanks again to Gregg Irwin}
prin Initial value: 
probe to-binary hprinter: null-buff 4

print Create DocInfo Struct
docinfo: make struct! [
 ;cbsize [int]
 lpszdocname [string!]
 lpszoutput [string!]
 lpszdatatype [string!]
 ;fwtype [int]
] reduce [Test Print  RAW]

print Call OpenPrinter
print either zero? ret: openprinter Brother MFC3100C hprinter 0 
[FAIL!][Success]

prin Current value: 
probe to-binary hprinter

; Have to cast the string buffer to a proper-endian integer.
; The string buffer trick is only needed for return filled (i.e. OUT) 
parameters.
hprinter: to-integer to-binary head reverse hprinter
print [Printer handle: hprinter]

; Don't forget, for structures that *do* have a size element, that you have to
; set it before the call.
;print Set docinfo structure size
;print docinfo/cbsize: length? third docinfo

close-printer: does [
 print Closing Printer
 print either zero? ret: closeprinter hprinter [FAIL!][Success]
]
end-doc-printer: does [
 print Closing Document
 print either zero? ret: enddocprinter hprinter [FAIL!][Success]
]
end-page-printer: does [
 print Ending Page
 print either zero? ret: endpageprinter hprinter [FAIL!][Success]
]

print Call StartDocPrinter
either zero? dwjob: startdocprinter hprinter 1 docinfo [
 print [ERROR! getlasterror]
 close-printer
][print SUCCESS!]

print Define StartPagePrinter
startpageprinter: make routine! [
 Start Page Printer
 hprinter [int]
 return: [int]
] winspool StartPagePrinter

print Define EndDocPrinter
enddocprinter: make routine! [
 End Doc Printer
 hprinter [int]
 return: [int]
] winspool EndDocPrinter

print Define WritePrinter
writeprinter: make routine! [
 Write Printer
 hprinter [int]
 lpdata [char*]
 dwcount [int]
 dwbyteswritten [int]
 return: [int]
] winspool WritePrinter

print Define EndPagePrinter
endpageprinter: make routine! [
 End Page Printer
 hprinter [int]
 return: [int]
] winspool EndPagePrinter


[REBOL] Re: View/Pro and accessing Windows Printer API (gdi32.dll)

2002-07-02 Thread Bohdan or Rosemary Lechnowsky

Gabriele,

I agree that PDF is more easily multiplatform, but sometimes you need the 
output to go directly to the printer without any additional human 
intervention.  It would be nice if Acrobat could be told via an external 
source (like REBOL) to print the current document.  Additionally, Acrobat 
loading on many machines is terribly slow.

It would be nice if REBOL had available printer support (kind of like 
Python, but better).  For that matter, printer page layout could use REBOL 
faces so you could generate the output with View or VID and then send it to 
the printer interface which does the conversion to the low-level printer 
commands.

  printer layout/origin [image %flag.gif text Now is the time 
for all good men to come to the aid of their country 600 wrap] 10x20

The above would send the output directly to the default 
printer.  'printer/query would query the user about which printer to use 
and would allow the user to make adjustments to the print properties.

Simple things should be simple to do.

-Bo

At 12:16 PM 7/2/02 +0200, you wrote:
Hi Bohdan,

On Monday, July 01, 2002, 6:41:08 PM, you wrote:

BoRL Thanks for all the help so far.  I'm hoping that someday REBOL users can
BoRL have graphical access to printers.  I know it would make my 
applications a
BoRL lot more useful!

I   actually   prefer   emitting  PDF  anyway,  it's  more  easily
multiplatform... :-)

Regards,
Gabriele.
--
Gabriele Santilli [EMAIL PROTECTED]  --  REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: View/Pro and accessing Windows Printer API (gdi32.dll)

2002-07-02 Thread Bohdan or Rosemary Lechnowsky

Thanks for the report, Cyphre!

Yes, I think the problem you are experiencing is due to incompatibility 
between Win95 and WinNT kernels.  As you probably know, these are the two 
basic kernels all versions of Windows are built on.

However, it should be possible to have the correct functions for each 
kernel and only call the appropriate one depending on which OS you are 
running.  It may take a little extra work, but it shouldn't be *too* hard. :-)

-Bo

At 05:42 PM 7/2/02 +0200, you wrote:

- Original Message -
From: Bohdan or Rosemary Lechnowsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 02, 2002 8:30 AM
Subject: [REBOL] Re: View/Pro and accessing Windows Printer API (gdi32.dll)
...

  Anyway, here is the script (beware of line-wrapping).  Let me know
directly
  if you have success/failure using this script:
 
...

Hi Bo,

the script doesnot work under WinXP(it crashes on WritePrinter call. IMO
incompatibilty between api of  different Windows versions. I'll try to find
where is the problem...anyway will be tough to make it work between all
Windows transparently...

regards,

Cyphre


--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: View/Pro and accessing Windows Printer API (gdi32.dll)

2002-07-01 Thread Bohdan or Rosemary Lechnowsky

Gregg,

Your solution does return an apparently valid handle when I apply it to 
OpenPrinter, but StartDocPrinter still doesn't like it (returns a code of 6 
which means invalid handle).

Here's my script so far (beware of line-wrapping!):

winspool: load/library %winspool.drv
kernel32: load/library %kernel32.dll

print Define GetLastError
getlasterror: make routine! [
 return: [long]
] kernel32 GetLastError

print Define OpenPrinter
openprinter: make routine! [
 Open Printer
 pprintername [string!]
 phprinter [char*]
 pdefault [string!]
 return: [integer!]
] winspool OpenPrinterA

print Define StartDocPrinter
startdocprinter: make routine! [
 StartDocPrinter
 hprinter [char*]
 dwlevel [int]
 lpbdocinfo [struct! [
 cbsize [int]
 lpszdocname [string!]
 lpszoutput [string!]
 lpszdatatype [string!]
 fwtype [int]
 ]]
 return: [int]
] winspool StartDocPrinterA

print {Create a Null Buffer - Thanks to Gregg Irwin and Gabrielle Santilli 
on REBOL list}
null-buff: func [len][
 head insert/dup make string! len #^(00) len
]

print {Create Pointer Variable - Thanks again to Gregg Irwin}
prin Initial value: 
probe to-binary hprinter: null-buff 4

print Create DocInfo Struct
docinfo: make struct! [
 cbsize [int]
 lpszdocname [string!]
 lpszoutput [string!]
 lpszdatatype [string!]
 fwtype [int]
][100 Test Print   0]

print Call OpenPrinter
print either zero? ret: openprinter Brother MFC3100C hprinter  
[FAIL!][Success]

prin Current value: 
probe to-binary hprinter

print Call StartDocPrinter
print either zero? dwjob: startdocprinter hprinter 1 docinfo [[ERROR! 
getlasterror]][SUCCESS!]

halt

If anyone has suggestions on why StartDocPrinter doesn't like the handle, 
I'd be very curious to find out!

Thanks for all the help so far.  I'm hoping that someday REBOL users can 
have graphical access to printers.  I know it would make my applications a 
lot more useful!

-Bo

At 09:23 AM 6/29/02 -0600, you wrote:
Hi Bo,

 ;hprinter is the handle that should be returned by 'openprinter above if
I
understand how 'openprinter works. 

I think you need to pass a buffer and then check that when the call returns.
That's what I had to do to use the return connection ID from InternetDial.
Here's the idea. I have to run right now, but I'll check back tomorrow, or
mail me directly if this causes more confusion.

 win-lib: load/library %wininet.dll

 internet-dial: make routine! [
 hwnd-parent [integer!]
 connectoid  [string!]
 flags   [integer!]
 rtn-conn-id [char*] ; LPDWORD - either string! or char* work
here
 reserved[integer!]
 return: [integer!]
 ] win-lib InternetDial

 ;-- Internal support routines

 null-buff: func [
 {Returns a null-filled buffer of the specified length.}
 len [integer!]
 ][
 to-string array/initial len #^@
 ]


 ;-- Interface routines

 connect: func [
 {Initiates dial-up connection. Returns connection ID (to use with
  disconnect) if successful; false otherwise.}
 dial-up-name [string!]
 /local id
 ][
 id: null-buff 4
 last-error: internet-dial no-hwnd dial-up-name dial-unattended id
zero
 either all [(last-error = 0) (id  null-buff 4)] [
 last-error: none
 return to-integer to-binary head reverse id
 ][
 return false
 ]
 ]

HTH!

--Gregg

--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the
subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] View/Pro and accessing Windows Printer API (gdi32.dll)

2002-06-27 Thread Bohdan or Rosemary Lechnowsky

Hello All!

I am looking to add native printing support to my REBOL applications for 
Windows, but I am running into a problem with the library component of 
View/Pro.  Here's the story:

The following has C source code for sending raw data to a printer on Windows.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_93g2.asp

Converting it to View/Pro was going well until I hit the OpenPrinter routine!.

Here's a transcript of my efforts:

  gdi32: load/library %gdi32.dll
  startdoc: make routine! [Start Document hdc [string!] docinfo 
[struct! [cbsize [int] lpszdocname [string!] lpszoutput [string!] 
lpszdatatype [string!] fwtype [int]]] return: [int]] gdi32 StartDocA

;So far, so good...

  openprinter: make routine! [Open Printer pprintername [string!] 
phprinter [string!] pdefault [string!] return: [integer!]] gdi32 OpenPrinterA
** Access Error: Cannot open OpenPrinterA
** Near: openprinter: make routine! [Open Printer pprintername [string!] 
phprinter [string!] pdefault [string!] return: [integer!]] gdi32

OK, maybe OpenPrinterA is not the correct name, let's see:

  gdi32: read %/c/windows/system/gdi32.dll
  find gdi32 OpenPrinter
== 
{OpenPrinterA^@^@^@^@WritePrinter^@^@^@^@OPENGL32^@^@^@^@wglChoosePixelFormat^@^@^@^@wglDescribePixelFormat^@^@wglGetPixelFormat...

OpenPrinterA is the correct name...AARGH!  What's the deal?

Anyone have any ideas on this?  Am I overlooking something?

I'm planning to release the REBOL Windows printer functionality to the 
community once it is working because dumping raw data to LPT1: isn't 
usually the most desirable method of printing.  My plans are to get the raw 
printing through GDI working first, and then making it more like the 
integrated printing features in Windows complete with bitmap printing 
support, etc.  The URL listed above has complete details on how to do this 
(in C).

Anyone willing to work with me on this project will be welcomed 
enthusiastically!

Bohdan Bo Lechnowsky
Lechnowsky Technical Consulting
REBOL/IOS Value Added Reseller
Specializing in solutions using REBOL

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.




[REBOL] Re: Dealing with email subject lines greater than 65 characters...

2002-06-09 Thread Bohdan or Rosemary Lechnowsky

Ed,

How about:

all [
 mail/subject/66 = # 
 remove at mail/subject 66
]

This way, the most you will be losing is a space if this behavior ever changes.

Hope this helps!

-Bo
Lechnowsky Technical Consulting

At 07:47 AM 6/8/02 -0700, you wrote:
I've modified the REBOL MailSniff program to scan a mailbox and print the 
subject line. The problem is, for subject lines over 65 characters in 
length, REBOL appears to be inserting a space in the 66th position. Kinda 
like this:

[REBOL] Dealing with email subject lines greater than 65 characte rs...


I've fixed it by inserting this line into the code:
Join (Copy/Part Mail/Subject 65) (Copy/Part At Mail/Subject 67 100)

It solves the problem of the moment, but if this bug ever gets fixed, then 
I'm gonna loose the 66th character needlessly.

Anyone got any better ideas on how to fix this? Just wondering...

--
Sincerely, | Ed Dana| Courage is fear holding on a 
minute longer. Software Developer |   -- General George S. Patton 1Ghz 
Athlon Amiga  | === 
http://members.cox.net/edanaii/Home/Default.html ===



--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the subject, without the quotes.

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with unsubscribe in the 
subject, without the quotes.