For Programmers: Free Programming Magazines  


Home > Archive > Smalltalk > December 2006 > programmatically open notepad using smalltalk code









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 programmatically open notepad using smalltalk code
Nandan

2006-12-13, 4:25 pm

Is it possible to execute a batch file or to execute an exe file
programmatically using smalltalk code? I am using Visualworks
smalltalk.

For eg: Say programmatically I need to open notepad using smalltalk
code.

Karl.Lurway@gmail.com

2006-12-13, 4:25 pm

WinProcess cshOne: 'notepad C:\vw7.4\fileList.txt'

opens file 'C:\vw7.4\fileList.txt' in notepad (in 7.4 at least)

BR

On 13 Dec, 06:38, "Nandan" <arknan...@gmail.com> wrote:
> Is it possible to execute a batch file or to execute an exe file
> programmatically using smalltalk code? I am using Visualworks
> smalltalk.
>
> For eg: Say programmatically I need to open notepad using smalltalk
> code.


cor

2006-12-14, 4:17 am

Nandan wrote:
> Is it possible to execute a batch file or to execute an exe file
> programmatically using smalltalk code? I am using Visualworks
> smalltalk.
>
> For eg: Say programmatically I need to open notepad using smalltalk
> code.
>



OSSystemSupport concreteClass CreateProcess: nil arguments: 'notepad wx.tx'


Sreenath G K

2006-12-16, 4:12 am


Hii all...
I am an inexperienced person in Smalltalk...and I would like to know
whether my finding are right...
we can use Winprocess class to open notepad and that is a good suggestion.
also using another method we can open it by using -->>

MinimalShellInterface openFile:'D:\India.txt'

What I would like to know is that what is the difference between in using
both the codes.Which is having more advantage..?

Thanks and regards to all.
Sreenath G K.
"cor" <corDEL@exchangenet.net> wrote in message
news:12o22t6dc8vi5b7@corp.supernews.com...
> Nandan wrote:
>
>
> OSSystemSupport concreteClass CreateProcess: nil arguments: 'notepad

wx.tx'
>
>



Don Rylander

2006-12-18, 7:12 pm


"Sreenath G K" <sreenath.gk@ivasystems.co.in> wrote in message
news:ypOdnZpUfMQtFh7YnZ2dnUVZ_segnZ2d@to
tallyobjects.com...
>
> Hii all...
> I am an inexperienced person in Smalltalk...and I would like to know
> whether my finding are right...
> we can use Winprocess class to open notepad and that is a good
> suggestion.
> also using another method we can open it by using -->>
>
> MinimalShellInterface openFile:'D:\India.txt'
>
> What I would like to know is that what is the difference between in using
> both the codes.Which is having more advantage..?


In the Winprocess version, you say explicitly that you want Notepad to open
the file. It assumes that Notepad.exe in somewhere where the system will
find it without specifying its full path (a pretty safe assumption with
Notepad, but not for all programs).

Using #openFile:, you rely on Windows' file associations. Windows will open
'D:\India.txt' using whatever program the system has been configured to use
for "*.txt" files. It will probably be Notepad, but it might be Scite, or
Word, or some other program.

HTH,

Don

>
> Thanks and regards to all.
> Sreenath G K.
> "cor" <corDEL@exchangenet.net> wrote in message
> news:12o22t6dc8vi5b7@corp.supernews.com...
> wx.tx'
>
>



Sponsored Links







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

Copyright 2008 codecomments.com