X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 28 Jan 2016 09:55 AM by  anon
Run IDL script from Windows Command Line
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
28 Jan 2016 09:55 AM
    Hi,I am trying to run a simple IDL script from the Windows Command Line and cam having trouble finding the correct syntax. For example, how would I run the following script from the terminal?PRO, ADD, A, B C = A + B PRINT, CEND Thanks,Andrew

    Deleted User



    Basic Member


    Posts:143
    Basic Member


    --
    28 Jan 2016 11:51 AM
    Below is a list of three approaches you can use to run an IDL program from Windows Command Line: 1) Launch the IDL commnad-line application and run the program from threre. To do this, you can go Start > All Programs > IDL 8.5 > Tools > "IDL 8.5 Command Line". Or you can enter "C:\Program Files\Exelis\IDL85\bin\bin.x86_64\idl.exe" into a command prompt. If your add program is in the IDL path, you can type "add, 1,2" into the IDL command prompt and it will compile and execute. Otherwise, you can use ".compile " and then enter "add, 1,2" the command. 2) Another option is to use the "-e" switch when launching IDL. For example, if your program is included in the IDL search path, you can enter the following into the command prompt: "C:\Program Files\Exelis\IDL85\bin\bin.x86_64\idl.exe" -e "add, 1,2" 3) The third option is to generate a ".sav" file of your routine and then use the "-rt" switch to call the routine. You can use the SAVE routine to generate the SAVE file: http://www.exelisvis.com/docs/SAVE.html And then you can then use the "-rt" switch with "idlrt.exe" executable to run the routine: "C:\Program Files\Exelis\IDL85\bin\bin.x86_64\idlrt.exe" -rt= -David Starbuck Harris GS

    Deleted User



    New Member


    Posts:
    New Member


    --
    11 Mar 2016 01:28 PM
    Thank you for the above reply, David. I wanted to follow up with a similar question that I can't figure out from the Help documentation (http://www.exelisvis.com/...ions_for.html". After failing with the SAVE approach, I found it easiest to run an IDL script directly, as such: "C:\Program Files\Exelis\IDL85\bin\bin.x86_64\idl.exe" "C:\scripts\test.pro" After executing the script (the real script will be quite lengthy to run) I would like to shut down IDL for clean system administration. Ultimately, this will be a Windows scheduled task or batch file where I would like to run the proper code every 10 days or so and have a clean shutdown of IDL. What would be the proper way to do so? Thank you, Michael
    You are not authorized to post a reply.