ltannous
26th February 2003, 18:45
I want to be able to select a site on my session form before the app_start launches my browser.

Here is a script I found that works when I hardcode the site to go to.

declaration:
extern domain tcdsca site

#pragma used dll "ottdllbw"

choice.cont.process:
on.choice:

start.client.program("IEXPLORE.EXE http://www.support.baan.com", "C:Program Files\Internet Explorer")

functions:

function start.client.program(string command(200), string ppath(200))
{long retval, still_running

retval = app_start(strip$(command), strip$(ppath),"","","")
while still_running = app_status(retval)
suspend(300)
endwhile
}

ltannous
27th February 2003, 00:14
Can you post the whole script

NPRao
27th February 2003, 00:17
I guess you forgot to include the tools library.

#pragma used dll ottdllbw
function main()
{
string comd(12)
string site(25)
comd = "iexplore "
site = "www.yahoo.com"
e = app_start(comd & site, "","","","")
}


Edited - I deleted my posting with the screenshot it was my programming error.

cherokee
23rd September 2003, 17:25
I use to run app_start(......) function worked perfectly. I got a new computer with w2k(I use to have NT) . this function does not open anything anymore.

Any advice?

Thanks.

mark_h
23rd September 2003, 18:03
Could maybe it be the path variables are different on the two boxes? Wondering if maybe the apps moved. I am not sure if NT and W2K handle the path in app_start differently. What about the default apps for the file types?

Mark

cherokee
23rd September 2003, 18:23
Well I did a test runnig excel from start/run/excel ... and excel opens and anyother MS application. By passing only the file name(ie. app_start("test.doc",....))does not work either.

:confused:

thanks again.

kbartelds
23rd September 2003, 18:30
Seems to be a problem with default application by extension in W2k. Open explorer, tools, Folder options, tab file types and correct is and try again.

Regards,
Klaas

cherokee
23rd September 2003, 18:42
Files types relations seems to be ok... xls to excel, doc to word...so on and so forth....

:(

Thanks Klass for that tip...

nick_rogers
23rd September 2003, 18:55
I have w2k and also cannot open Iexplore or Outlook using the ttstpconv functionality in the Device Data. My collegues can (different OS's) so there is definatley something going on with the way Baan and w2k interact.

mark_h
23rd September 2003, 19:20
We use W2K at our site. App_start works, but usually I include the full path to the location. We do this because we have 3 sites using one system and the same app can have different start locations. Now the question becomes what else could cause app_start to not work from Baan? Could it be the client - we use B40c.065. I can't think of anything else.

Mark

nick_rogers
23rd September 2003, 19:24
I am on 06.07 port set with BW B40c.68

NPRao
23rd September 2003, 19:27
Nick,

My desktop OS is Windows-2000 and it works fine to me. As Mark suggested,
you have to check your environment path variables.
Also check if you can find the entries using the following DOS command - C:\ ftype > appps

C:\>ftype /?
Displays or modifies file types used in file extension associations
FTYPE [fileType[=[openCommandString]]]
fileType Specifies the file type to examine or change
openCommandString Specifies the open command to use when launching files
of this type.
Type FTYPE without parameters to display the current file types that
have open command strings defined. FTYPE is invoked with just a file
type, it displays the current open command string for that file type.
Specify nothing for the open command string and the FTYPE command will
delete the open command string for the file type. Within an open
command string %0 or %1 are substituted with the file name being
launched through the assocation. %* gets all the parameters and %2
gets the 1st parameter, %3 the second, etc. %~n gets all the remaining
parameters starting with the nth parameter, where n may be between 2 and 9,
inclusive. For example:
ASSOC .pl=PerlScript
FTYPE PerlScript=perl.exe %1 %*
would allow you to invoke a Perl script as follows:
would allow you to invoke a Perl script as follows:
script.pl 1 2 3
If you want to eliminate the need to type the extensions, then do the
following:
set PATHEXT=.pl;%PATHEXT%
and the script could be invoked as follows:
script 1 2 3
C:\>

cherokee
23rd September 2003, 20:05
It was the path... I included it and worked out ok.
e = app_start("D:\Program Files\Microsoft Office\Office\excel " & "d:\test\po.by.country.xls", "","","","") .

Since we have more than 200 users... excel, word coudl be in many locatinos (network, local drives(C:,D:...) ...The next questions is how to avoid this dependency of the path?

Thanks again to everyone.

mark_h
23rd September 2003, 20:20
We at least I only have 2 or 3 locations excel can be, but I think if you can have your PC admin group setup the path to point to excel on all the PC's then you could exclude the path on excel. I do not see away to avoid using the path on the document, unless you always point to the same directory for the file download(like baan/tmp).

Mark

issreddy
24th September 2003, 15:14
Just give the file name you want to open. app_start will open that file with the assiciated application on your OS. You should have the respective application installed in the local PC. Otherwise app_start won't work.

e = app_start("d:\test\po.by.country.xls", "","","","") .

The above one will open in MS Excel.

nick_rogers
24th September 2003, 16:33
I used the ftype and use the exact path being:
ASCII:c:\PROGRA~1\MICROS~2\Office10\OUTLOOK.EXE %s

when I print to the device another instance of outlook starts up with the baan report in notepad instead of an email message with an attachment

cherokee
24th September 2003, 22:59
Issredy...

I tried with no path and does not work. To me should, but it doesn't....

Thanks again.

MakamArun
25th September 2003, 10:26
http://www.baanboard.com/baanboard/showthread.php?s=&postid=48710

Check your BW client version.

e = app_start("d:\test\po.by.country.xls", "","","","") works fine.