Re: running IDL without the DE [message #35156] |
Sat, 17 May 2003 22:31 |
Kelly Dean
Messages: 92 Registered: March 1997
|
Member |
|
|
I've used this method to launch IDL GUIs while I was working on
Windows NT/2000, but if you want "Hello World" to be seen in a MS-DOS
window, change the PRINT, "Hello World" to open and write "hello world"
to a text file, then add a type statement to list the text file in the
batch file.
Also, I use IDLrt.exe instead of IDLde.exe.
Kelly Dean
CSU/ATS
Craig Hamilton wrote:
> Here's how I do it: (maybe there is a simpler way...)
>
> Let's call your IDL program hello.pro, which has
> a main routine named hello.
>
> Create a 'launcher' pro file, named hellox.pro, which
> contains:
> .rnew c:\yourpath\hello.pro
> hello
> exit
>
> Now, create a batch file, named hellox.bat which contains:
> start /min c:\rsi\idl56\bin\bin.x86\idlde @c:\yourpath\hellox.pro
>
> (adjust yourpath accordingly)
>
> When you double click the batch file, it will launch your
> program, with idlde minimized, so you don't notice it.
>
> Hope this helps.
>
> Craig Hamilton
>
> "Eric Inazaki" <einazaki@mac.com> wrote in message
> news:f5eacvo8vs4g92mki4glamr6dj795l9feq@4ax.com...
>
>> I wanted to build a "hello world" script that I could
>> launch w/o having to explicitly startup IDLDE (either
>> double-clicking in Win2K's explorer or through
>> CommandPrompt). It didn't work and I'd like to find
>> out what I shoud be doing. The script itself looks like:
>>
>> pro hello_world
>> print, 'Hello World'
>> end
>>
>> I then followed the steps listed in the "Saving Compiled
>> IDL Programs" section of the "Building IDL Applications"
>> manual (this is for version 5.6). In particular, from the
>> Run menu, I selected Compile All then Resolve Dependancies.
>> Then I typed: "save, /routines, filename='hello_world.sav'.
>>
>> When I double-clicked on hello_world.sav it appeared that
>> some program ran briefly but there was no output. The same
>> thing happened when I tried to launch the program from the
>> CommandPrompt.
>>
>> More generally, I'm trying to build "standalone" IDL apps
>> which use stdin/stdout (a terminal window) as the user
>> interface. (The machines on which these apps run will have
>> either the IDL runtime or a full-up copy of IDL). Are there
>> any examples of this sort of thing on the web or in third
>> party books or even in the IDL supplied docs? (The IDL
>> docs seem to IDLDE centric and there don't seem to be a
>> lot of examples. Not a lot of good ones, anyway).
>>
>> TIA,
>> eric
>>
>
>
>
|
|
|
Re: running IDL without the DE [message #35160 is a reply to message #35156] |
Sat, 17 May 2003 13:42  |
Eric Inazaki
Messages: 4 Registered: April 2003
|
Junior Member |
|
|
In article <ba5o7a$1g9c$1@f1n1.spenet.wfu.edu>,
"Craig Hamilton" <someone@microsoft.com> wrote:
> I think Rick is right - you do need to build a GUI. I use the
> batch file technique to launch IDL GUI-based programs, but
> getting 'print' output to go to a DOS command window is not
> possible, I believe.
>
> I was thinking you were just using hello world printing as a
> simple test case to figure out how to launch IDL programs in
> a manner that is transparent to the user: double-click an
> icon just like any Windows program.
>
Originally, yes that's what "hello world" was testing. This
problem with the user I/O was quite unexpected. This is the
first programming language where I've seen this.
Thanks,
eric
|
|
|
Re: running IDL without the DE [message #35161 is a reply to message #35160] |
Sat, 17 May 2003 13:35  |
Eric Inazaki
Messages: 4 Registered: April 2003
|
Junior Member |
|
|
In article <GKkxa.868480$L1.250960@sccrnsc02>,
"Rick Towler" <rtowler@u.washington.edu> wrote:
> I am pretty sure that you can't do this on win32. IDL for windows can't do
> I/O with the command prompt. That program that ran briefly was the runtime
> engine and the output of your 'hello world' program went straight to
> /dev/null.
>
> Although I haven't tried it, I suspect that Craig's suggestion will still
> route I/O to IDLDE so that's no good for you. And you would still have a
> problem with I/O on the runtime licensed machines.
>
> I think your only option is either have everyone telnet to a UNIX box
> running IDL or build a GUI. You could easily build a simple IDL based
> "terminal" that could accept text input and print output.
>
> But before you do that, email RSI and add your name to the list of people
> who want a command line version of IDL for windows. We have to make up over
> 50% of the machines IDL is running on. We demand parity! :o
>
I talked to tech support at RSI and they said the same thing, "Build a
GUI". Oh well. I think my user interface needs are simple enough that
building a GUI wont be too burdensome.
I don't know, there's got to be a more elegant way to implement
stdin/stdout than having to roll up two versions of IDL.
Thanks to all,
eric
|
|
|
Re: running IDL without the DE [message #35164 is a reply to message #35161] |
Sat, 17 May 2003 09:32  |
Craig Hamilton
Messages: 28 Registered: December 1996
|
Junior Member |
|
|
I think Rick is right - you do need to build a GUI. I use the
batch file technique to launch IDL GUI-based programs, but
getting 'print' output to go to a DOS command window is not
possible, I believe.
I was thinking you were just using hello world printing as a
simple test case to figure out how to launch IDL programs in
a manner that is transparent to the user: double-click an
icon just like any Windows program.
Craig
"Rick Towler" <rtowler@u.washington.edu> wrote in message
news:GKkxa.868480$L1.250960@sccrnsc02...
>
> "Eric Inazaki" wrote ...
>> I wanted to build a "hello world" script that I could
>> launch w/o having to explicitly startup IDLDE (either
>> double-clicking in Win2K's explorer or through
>> CommandPrompt).
>
>> When I double-clicked on hello_world.sav it appeared that
>> some program ran briefly but there was no output. The same
>> thing happened when I tried to launch the program from the
>> CommandPrompt.
>
>> More generally, I'm trying to build "standalone" IDL apps
>> which use stdin/stdout (a terminal window) as the user
>> interface.
>
> I am pretty sure that you can't do this on win32. IDL for windows can't
do
> I/O with the command prompt. That program that ran briefly was the
runtime
> engine and the output of your 'hello world' program went straight to
> /dev/null.
>
> Although I haven't tried it, I suspect that Craig's suggestion will still
> route I/O to IDLDE so that's no good for you. And you would still have a
> problem with I/O on the runtime licensed machines.
>
> I think your only option is either have everyone telnet to a UNIX box
> running IDL or build a GUI. You could easily build a simple IDL based
> "terminal" that could accept text input and print output.
>
> But before you do that, email RSI and add your name to the list of people
> who want a command line version of IDL for windows. We have to make up
over
> 50% of the machines IDL is running on. We demand parity! :o
>
> -Rick
>
>
|
|
|
Re: running IDL without the DE [message #35168 is a reply to message #35164] |
Fri, 16 May 2003 23:35  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"Eric Inazaki" wrote ...
> I wanted to build a "hello world" script that I could
> launch w/o having to explicitly startup IDLDE (either
> double-clicking in Win2K's explorer or through
> CommandPrompt).
> When I double-clicked on hello_world.sav it appeared that
> some program ran briefly but there was no output. The same
> thing happened when I tried to launch the program from the
> CommandPrompt.
> More generally, I'm trying to build "standalone" IDL apps
> which use stdin/stdout (a terminal window) as the user
> interface.
I am pretty sure that you can't do this on win32. IDL for windows can't do
I/O with the command prompt. That program that ran briefly was the runtime
engine and the output of your 'hello world' program went straight to
/dev/null.
Although I haven't tried it, I suspect that Craig's suggestion will still
route I/O to IDLDE so that's no good for you. And you would still have a
problem with I/O on the runtime licensed machines.
I think your only option is either have everyone telnet to a UNIX box
running IDL or build a GUI. You could easily build a simple IDL based
"terminal" that could accept text input and print output.
But before you do that, email RSI and add your name to the list of people
who want a command line version of IDL for windows. We have to make up over
50% of the machines IDL is running on. We demand parity! :o
-Rick
|
|
|
|
|
Re: running IDL without the DE [message #35175 is a reply to message #35174] |
Fri, 16 May 2003 12:23  |
Craig Hamilton
Messages: 28 Registered: December 1996
|
Junior Member |
|
|
Here's how I do it: (maybe there is a simpler way...)
Let's call your IDL program hello.pro, which has
a main routine named hello.
Create a 'launcher' pro file, named hellox.pro, which
contains:
.rnew c:\yourpath\hello.pro
hello
exit
Now, create a batch file, named hellox.bat which contains:
start /min c:\rsi\idl56\bin\bin.x86\idlde @c:\yourpath\hellox.pro
(adjust yourpath accordingly)
When you double click the batch file, it will launch your
program, with idlde minimized, so you don't notice it.
Hope this helps.
Craig Hamilton
"Eric Inazaki" <einazaki@mac.com> wrote in message
news:f5eacvo8vs4g92mki4glamr6dj795l9feq@4ax.com...
> I wanted to build a "hello world" script that I could
> launch w/o having to explicitly startup IDLDE (either
> double-clicking in Win2K's explorer or through
> CommandPrompt). It didn't work and I'd like to find
> out what I shoud be doing. The script itself looks like:
>
> pro hello_world
> print, 'Hello World'
> end
>
> I then followed the steps listed in the "Saving Compiled
> IDL Programs" section of the "Building IDL Applications"
> manual (this is for version 5.6). In particular, from the
> Run menu, I selected Compile All then Resolve Dependancies.
> Then I typed: "save, /routines, filename='hello_world.sav'.
>
> When I double-clicked on hello_world.sav it appeared that
> some program ran briefly but there was no output. The same
> thing happened when I tried to launch the program from the
> CommandPrompt.
>
> More generally, I'm trying to build "standalone" IDL apps
> which use stdin/stdout (a terminal window) as the user
> interface. (The machines on which these apps run will have
> either the IDL runtime or a full-up copy of IDL). Are there
> any examples of this sort of thing on the web or in third
> party books or even in the IDL supplied docs? (The IDL
> docs seem to IDLDE centric and there don't seem to be a
> lot of examples. Not a lot of good ones, anyway).
>
> TIA,
> eric
>
|
|
|