Normal Topic I am trying to start another program from sesame (Read 926 times)
billgordon
Junior Member
**
Offline


No personal text

Posts: 61
Joined: Dec 31st, 2003
I am trying to start another program from sesame
Jan 6th, 2004 at 3:59pm
Print Post Print Post  
I am trying to start another program from sesame and pass the data contained in a field.
I tried below to pass a telephone number to a program that dials. I planed to use a command button with something like this.

var Vmydialer as int

Vmydialer = @shell ("c:\utils\mydialer.exe" < telephone)

Can someone please help? I seem to need more examples then I see in the manuals
  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: I am trying to start another program from sesa
Reply #1 - Jan 6th, 2004 at 4:14pm
Print Post Print Post  
Quote:
I am trying to start another program from sesame and pass the data contained in a field.
I tried below to pass a telephone number to a program that dials. I planed to use a command button with something like this.

var Vmydialer as int

Vmydialer = @shell ("c:\utils\mydialer.exe" < telephone)

Can someone please help? I seem to need more examples then I see in the manuals


You need to concatenate the telephone number into the string you pass to @Shell.

var vMyDialer as Int
var vMyCommand as String

vMyCommand = "c:\utils\mydialer.exe < " + @Str(telephone)
vMyDialer = @Shell(vMyCommand)


This assumes that this is the correct syntax for your dialing program. The redirect (<) looks a bit funny to me, but you would need to check your  dialing program to see what it wants.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: I am trying to start another program from sesa
Reply #2 - Jan 6th, 2004 at 5:00pm
Print Post Print Post  
Billgordon,

You might want to temporarily add the command

Writeln(vmyCommand) to your code.

Writeln() is a nifty little feature Sesames Sbasic has to display a pop-up window.

The Writeln(vmyCommand) line will display a box with the exact string of data that the program you are calling is receiving. If you have problems with your results you can see easily what is wrong or you can use edit cut commands from that pop-up box and place the string on a run command line directly to see if it works stand alone. ( This method has been helpful to me anyway)

Your final logic would look like this

var vMyDialer as Int
var vMyCommand as String
 
vMyCommand = "c:\utils\mydialer.exe < " + @Str(telephone)
Writeln(vmyCommand) //add this line
vMyDialer = @Shell(vMyCommand)
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged