mibuso.com

Microsoft Business Solutions online community
It is currently Tue May 21, 2013 12:14 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Shell-Substitute "Oyster"
PostPosted: Sun Jun 05, 2005 5:20 pm 
Offline
Site Admin

Joined: Sun Nov 07, 1999 8:01 am
Posts: 1900
Location: Wilrijk, Belgium
Country: Belgium (be)
Shell-Substitute "Oyster"
Substitute for Navision-internal "Shell"-Command.
Prevents warning messages in Navision 4.0

Register it, make a suiting variable (Oyster) and use it like:

cmd:='notepad.exe';
if Oyster.Oyster(cmd) then ...;

You have to used a text variable (cmd), passing constant text will raise an error.

http://www.mibuso.com/dlinfo.asp?FileID=492

Discuss this download here.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 05, 2005 8:53 pm 
Offline

Joined: Thu Dec 02, 2004 12:31 pm
Posts: 31
Location: Münster
Country: Germany (de)
there's a discussion in

http://www.mibuso.com/forum/viewtopic.php?p=22170

showing a better way to prevent from warning messages by using the MS-Shell :oops:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 6:51 pm 
Offline

Joined: Wed Feb 23, 2005 10:39 am
Posts: 37
Location: Altendiez
Country: Germany (de)
Sorry for my Question - maybe I am a little bit stupid.

I have registered the oyster.ocx.

How do I have to define a Variable "OYSTER" ?

Thank you !


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 7:00 pm 
Offline

Joined: Thu Dec 02, 2004 12:31 pm
Posts: 31
Location: Münster
Country: Germany (de)
aod wrote:

How do I have to define a Variable "OYSTER" ?



In the form "C/AL Globals" or "C/AL Locals" you add a new line variable with

Name = Oyster
Data Type = OCX
and in column SubType you pick "Oyster.OysterCtl" from the lookup list.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 7:04 pm 
Offline

Joined: Wed Feb 23, 2005 10:39 am
Posts: 37
Location: Altendiez
Country: Germany (de)
toenne wrote:
aod wrote:

How do I have to define a Variable "OYSTER" ?



In the form "C/AL Globals" or "C/AL Locals" you add a new line variable with

Name = Oyster
Data Type = OCX
and in column SubType you pick "Oyster.OysterCtl" from the lookup list.


Thanks,

But I don't have the Data-Type OCX ?!
Is it avaiable at a Report or only at CodeUnits ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 7:09 pm 
Offline

Joined: Thu Dec 02, 2004 12:31 pm
Posts: 31
Location: Münster
Country: Germany (de)
aod wrote:
toenne wrote:
aod wrote:

How do I have to define a Variable "OYSTER" ?



In the form "C/AL Globals" or "C/AL Locals" you add a new line variable with

Name = Oyster
Data Type = OCX
and in column SubType you pick "Oyster.OysterCtl" from the lookup list.


Thanks,

But I don't have the Data-Type OCX ?!
Is it avaiable at a Report or only at CodeUnits ?


OCX are available in all types of objects. it might be restricted by licence??


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 7:12 pm 
Offline

Joined: Wed Feb 23, 2005 10:39 am
Posts: 37
Location: Altendiez
Country: Germany (de)
Many Thanks,

I Think this is the problem - so we have to spend more money !!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 7:16 pm 
Offline

Joined: Tue Oct 14, 2003 2:59 pm
Posts: 471
Location: Dortmund - Germany
Country: Germany (de)
You need the granule 1750 Tools - C/OCX

_________________
Timo Lässer
Navision Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]


Top
 Profile  
 
 Post subject: Another new behavior of the shell function
PostPosted: Thu Nov 17, 2005 3:16 pm 
Offline

Joined: Thu Nov 17, 2005 2:56 pm
Posts: 19
Location: Seevetal (Hamburg)
Country: Germany (de)
Up to 3.70 I wrote shell('net time /set /yes'); to sync the clients time.

In 4.0 Sp1 the %PATH% will be ignored and the net.exe not found!!!

I have to change it to shell('C:\Winnt\system32\net.exe ',' /set /yes');

Assuming, windows ist alway installed in C:\winnt, what is not true.
So the environment variable %SystemRoot" has to be determined.

Because of the short flashing up of a black CMD-Window, we use a similar
OCX automation server, wich gives us the possibility to hide the window.

To avoid the problems, that could rise with not registered OCX's, we have
merged it in the Navision client installer MSI.

_________________
Svensk.Tiger (Henning Möller)
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)


Top
 Profile E-mail WWW  
 
 Post subject: Re: Another new behavior of the shell function
PostPosted: Mon Dec 12, 2005 8:59 am 
Online
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7493
Location: Milan
Country: Italy (it)
svensk.tiger wrote:
Up to 3.70 I wrote shell('net time /set /yes'); to sync the clients time.

In 4.0 Sp1 the %PATH% will be ignored and the net.exe not found!!!

I have to change it to shell('C:\Winnt\system32\net.exe ',' /set /yes');

Assuming, windows ist alway installed in C:\winnt, what is not true.
So the environment variable %SystemRoot" has to be determined.

Because of the short flashing up of a black CMD-Window, we use a similar
OCX automation server, wich gives us the possibility to hide the window.

To avoid the problems, that could rise with not registered OCX's, we have
merged it in the Navision client installer MSI.

You can use
Code: Select all
SHELL(ENVIRON('windir') + '\system32\net.exe','/set /yes');

or also ENVIRON('SystemRoot')
For all evironment-variables, open a dosbox and enter 'SET' as command. You will see all environment-variables.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 9:40 am 
Offline

Joined: Thu Nov 17, 2005 2:56 pm
Posts: 19
Location: Seevetal (Hamburg)
Country: Germany (de)
Thats true,

but your have to find and modify all your shell calls before going to 4.x.

_________________
Svensk.Tiger (Henning Möller)
PASS Multibank Solutions AG
(Kaum macht man was richtig, schon geht es. / Once you do it right, suddenly it works.)


Top
 Profile E-mail WWW  
 
 Post subject:
PostPosted: Mon Dec 12, 2005 9:52 am 
Online
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7493
Location: Milan
Country: Italy (it)
svensk.tiger wrote:
Thats true,

but your have to find and modify all your shell calls before going to 4.x.

Not necessary, the shell calls that are always the same, you don't need to change. You give permission to run it once, and next time he won't ask permission anymore ... until you use it on another computer or delete your zup. (Can't remember if it is saved in the zup or in the registry). So better change it anyway.

Finding them is not so difficult: export all objects as text and search for 'SHELL'.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 28, 2005 10:14 am 
Offline

Joined: Fri Mar 28, 2003 11:31 am
Posts: 33
Location: Slovenia
Country: Slovenia (si)
What would be really great, to have a method to return stdout from the application.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 02, 2006 4:37 pm 
Online
Moderator
MVP Microsoft Dynamics NAV
NAV TechDays 2013 attendee

Joined: Wed Jul 02, 2003 10:13 am
Posts: 7493
Location: Milan
Country: Italy (it)
zehnan wrote:
What would be really great, to have a method to return stdout from the application.

If I understood correctly what you want:
In the DOS-command, put "c:\..\MyCommand.exe > c:\temp\MyFile.txt"
This to save the stdout of the DOS-application into a file.
Then open the file in Navision and read it.

_________________
Regards,Alain Krikilion
Use the SEARCH,Luke! || No PM,please use the forum. || May the <SOLVED>-attribute be in your title! || Read Forum Rules before making a posting


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 04, 2006 12:56 pm 
Offline

Joined: Thu Sep 30, 2004 2:21 pm
Posts: 59
Location: Waddinxveen
Country: Netherlands (nl)
I want to use oyster to convert a file to another before I continue in NF.

How can I set oyster that he waits for the command to be ready (like it is in WaitVar := SHELL('notepad.exe'); )?

_________________
Dick van der Sar

www.dasautomatisering.nl


Top
 Profile E-mail WWW  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to: