For Programmers: Free Programming Magazines  


Home > Archive > Clipper > February 2005 > Re: Swapruncmd() problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Swapruncmd() problem
tom knauf

2005-02-10, 8:55 am

Hi,

1. if you start the command or batch directly from within a dosbox under XP,
does it work ?
2. What are your swprun parameters ?
3. Did you try to swprun a batch ("doit.bat") which calls Blat ?

Greetings
Tom

"cal" <cal@ck.com> schrieb im Newsbeitrag
news:0b8l019blghesc2aqh7g0cupfi3402ve89@
4ax.com...
> Guys:
>
> I have an emailer applet that just sits wating for a client's main
> Clipper 5.2e app to queue an email to send. The emailer sends any
> message that's been in the queue for over two minutes, using Blat.
>
> The applet is 5.2e also linked with Blinker 7.00.
>
> When SwapRunCmd() is used to run Blat, the result is a DOS error
> message in the applet DOS box... "Program is too bit to fit into
> memory." When I wrote this thing a few years ago, it was being run
> under Win98SE. I'm trying to get it over to Win2000 and WinXP now,
> since the client's last 98 pc is slated for the PC Great Beyond soon.
>
> My question is where should I start looking to find the OS tweaks
> necessary to make this thing run nder Win2000. I hope someone can
> remember where to look. I can't after a half day of trying.
>
> config.nt contains:
>
> dos=high, umb
> device=%SystemRoot%\system32\himem.sys
> files=151
>
> Thanks for any hints you can provide me.
>
> Calk
>



cal

2005-02-10, 3:55 pm

On Thu, 10 Feb 2005 09:25:27 +0100, "tom knauf" <tom.knauf@itds.de>
wrote:

Thanks, Tom.

If I run blat from the DOS prompt within a dosbox, it works fine, in
2000 or XP.

The Clipper program builds a command string of the message text file
name. email address, subject, attachment file name, and blat command
line parameters, -log and -noh.

cSndCmd := "blat " + trim(eq->EQTEXT) + " -to " + trim(eq->EQRECIP) +
" -s " + trim(eq->EQSUBJ) + ...

lSendOk := SwpRunCmd(cSndCmd, 0, ".", "c:\")


The mailer applet works fine on a Win98SE computer.


I have not tried using a BAT file to call blat. I haven't thought
about that. What effect would that have? What are the considerations
for passing the long command string to the batch file?

Again, thanks. I sincerelay appreciate your help.

CalK


>Hi,
>
>1. if you start the command or batch directly from within a dosbox under XP,
>does it work ?
>2. What are your swprun parameters ?
>3. Did you try to swprun a batch ("doit.bat") which calls Blat ?
>
>Greetings
>Tom
>
>"cal" <cal@ck.com> schrieb im Newsbeitrag
> news:0b8l019blghesc2aqh7g0cupfi3402ve89@
4ax.com...
>


Ian Boys

2005-02-10, 3:55 pm

Calk,

I often send batches of e-mails via Blat. I usually write a batch file from
within Clipper and then just execute it, though not through Swapruncmd().

You say that you ran Blat on Windows 98. I thought that Blat was "Windows NT
console utility" and as such didn't run on 98. I'm sure that I'd tried to
run it on 98 without success.

Ian Boys
DTE Systems Ltd


gabor salai

2005-02-10, 3:55 pm

"cal" <cal@ck.com> wrote in message
news:0vmm01ltl12g3dg8ahetcerlsco2j9gj9g@
4ax.com...
> On Thu, 10 Feb 2005 09:25:27 +0100, "tom knauf" <tom.knauf@itds.de>
> wrote:
>
> Thanks, Tom.
>
> If I run blat from the DOS prompt within a dosbox, it works fine, in
> 2000 or XP.
>
> The Clipper program builds a command string of the message text file
> name. email address, subject, attachment file name, and blat command
> line parameters, -log and -noh.
>
> cSndCmd := "blat " + trim(eq->EQTEXT) + " -to " + trim(eq->EQRECIP) +
> " -s " + trim(eq->EQSUBJ) + ...
>
> lSendOk := SwpRunCmd(cSndCmd, 0, ".", "c:\")


have you tried to *force* some command processor, instead of leting
"swpruncmd" to chose itself?
so do:
swpruncmd("c:\windows\command\command.com " + command_string) or,
swpruncmd("start " + command_string)

you may use %comspec% variable to find default processor as well.



Ian Boys

2005-02-10, 3:55 pm

Cal,
It's as simple as:
BLAT C:\DEV\ALOND1.TXT -to address@internet.com -s "Subject text" -log
blat.txt -attach C:\DEV\013640.TXT
BLAT C:\DEV\ALOND2.TXT -to address@internet.com -s "More Subject text" -log
blat.txt -attach L:\DEV\\013641.TXT


Sends the Text in ALOND1.TXT with the subject "Subject text" and attaches
013640.TXT
It then does the same to the next line.

What I tend to do is allow people to send the e-mail data to a directory
then process it, write the batch file, send it and then process the log file
to check it has all gone and keep a long term log of success or failure.

The one problem you can have is if you have Norton AntiVirus checking your
outgoing mail. It acts as a proxy, you send it from Blat which actually
sends it to Norton. If Norton then can't actually forward it, Blat thinks it
was sucessful and writes it's log to reflect this.


Ian


"cal" <cal@ck.com> wrote in message
news:dvum01192j66tpobri51i3nlg5mirlojrk@
4ax.com...
> Hello, Ian.
> Blat works fine in a Dosbox in Win98SE. I fired up an old laptop this
> morning here to see if it still worked, since I have changed to
> Blinker 7.0 since making any changes to my client's mailer applet.
>
> So I'm left looking for what to do to get it to launch from within a
> Clipper 5.2e app running in Win2000 and WinXp Pro. The clent is
> getting rid of his last 98 machine, though not quite as soon as he
> thought he was ;-).
>
> I'm trying to imagine what you batch file looks like. Do you have an
> example I might look over? If that's not too much effort or counter
> to your, or your client's interests.
>
> Thanks.
>
> Cal
>
> On Thu, 10 Feb 2005 15:03:28 +0000 (UTC), "Ian Boys"
> <TooMuchSpam@BTInternet.com> wrote:
>
>



Ian Boys

2005-02-10, 3:55 pm

Cal,
It's as simple as:
BLAT C:\DEV\ALOND1.TXT -to address@internet.com -s "Subject text" -log
blat.txt -attach C:\DEV\013640.TXT
BLAT C:\DEV\ALOND2.TXT -to address@internet.com -s "More Subject text" -log
blat.txt -attach L:\DEV\\013641.TXT


Sends the Text in ALOND1.TXT with the subject "Subject text" and attaches
013640.TXT
It then does the same to the next line.

What I tend to do is allow people to send the e-mail data to a directory
then process it, write the batch file, send it and then process the log file
to check it has all gone and keep a long term log of success or failure.

The one problem you can have is if you have Norton AntiVirus checking your
outgoing mail. It acts as a proxy, you send it from Blat which actually
sends it to Norton. If Norton then can't actually forward it, Blat thinks it
was sucessful and writes it's log to reflect this.


Ian


Ian Boys

2005-02-10, 8:55 pm

Cal,
What I actually do is run a looping batch file, much like what you do, with
a Clipper programme that looks for a file, processes any it finds and writes
a batch file to send them. It then calls the batch file and runs an app
again to process the log data. Swapruncmd() by brute force and ignorance. I
then use Errorlevel to quit the loop. This was all done before I was into
Blinker, but if it aint broke.......

Ian


alvaro valdenebro

2005-02-10, 8:55 pm

Cal,

Blat work fine within a Clipper 5.3b application, with W98 and XP.

1) Have you install Blat in the new machine?

2) If it install, try this:


SWPRUNCMD('BLAT trim(eq->EQTEXT) -s trim(eq->EQSUBJ) -to trim(eq->EQRECIP)' )

or

cText := trim(eq->EQTEXT)
cSubj := trim(eq->EQSUBJ)
cReci := trim(eq->EQRECIP)

SWPRUNCMD('BLAT &cText -s &cSubj -to &cReci' )

Regards

Alvaro
tom knauf

2005-02-11, 8:55 am

Hi cal,

pls. try as follows :
Write your commandstring into a text file "doit.bat" (memowrit will do) and
try to execute the bat
a) by just entering doit from a dos prompt
b) by calling doit.bat via swpruncmd(doit.bat,0)

I do not know why, but in some our apps calling a bat worked, calling via
command string did not.

Is your app linked in protected mode ?

HTH
Tom


"cal" <cal@ck.com> schrieb im Newsbeitrag
news:0vmm01ltl12g3dg8ahetcerlsco2j9gj9g@
4ax.com...
> On Thu, 10 Feb 2005 09:25:27 +0100, "tom knauf" <tom.knauf@itds.de>
> wrote:
>
> Thanks, Tom.
>
> If I run blat from the DOS prompt within a dosbox, it works fine, in
> 2000 or XP.
>
> The Clipper program builds a command string of the message text file
> name. email address, subject, attachment file name, and blat command
> line parameters, -log and -noh.
>
> cSndCmd := "blat " + trim(eq->EQTEXT) + " -to " + trim(eq->EQRECIP) +
> " -s " + trim(eq->EQSUBJ) + ...
>
> lSendOk := SwpRunCmd(cSndCmd, 0, ".", "c:\")
>
>
> The mailer applet works fine on a Win98SE computer.
>
>
> I have not tried using a BAT file to call blat. I haven't thought
> about that. What effect would that have? What are the considerations
> for passing the long command string to the batch file?
>
> Again, thanks. I sincerelay appreciate your help.
>
> CalK
>
>
XP,[color=darkred]
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com