in reply to Re: How to call cmd line within PERL?
in thread [Newbie Question] How to call cmd line within PERL?
Thanks.
(ps. The Tiny link was broken so I looked into http://perldoc.net/Capture/Tiny.pod hoping that's what you meant to refer)
I maybe a bit lost honestly.
I'll try to put it this way.
I'm using a signal analyzer (SA) as a part of my testing on a daily basis with some other eqiupments, and I'm trying to make a PERL script to automate the repeititions.
Here's what I found from the manufacturer's application note.
--------------------------------
Command-Line Operation
To speed up frequently used commands (e.g. taking screenshots only from
one instrument), you can pass the command via the command line to
GPIBShot. The following commands are available:
/{Number between 1 and 31} set IEEE address
/COLOR switch to color mode
/BW switch to b/w mode
/SCREEN take a screen shot
/TRACE{1..4} read out trace data
/HIDE supress trace display on PC
/SHOW shows window again
/END terminates the program
/NAME=<name> specify the name of the file to generate
All combinations ot the commands are possible. The command line is parsed serial.
Example: Calling "GPIBSHOT.EXE /HIDE /20 /COLOR /NAME=IMG1
/SCREEN /NAME=DAT1 /TRACE2 /END" takes a colored hardcopy, stored
as "IMG1.WMF", and stores the data of trace 2 with the filename
"DAT1.TXT" of IEEE device 20 without displaying the graphical user
interface.
--------------------------------
On a second thought, can I just call the said example "gpibshot.exe /hide blah blah blah..." from PERL using the system funcion or one of the two methods you provided?
I was initially thinking calling the command prompt tool (cmd), then call the said command. But it seems like I can just straightly call the command from PERL with the right method?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: How to call cmd line within Perl? (updated!)
by haukex (Archbishop) on Jul 20, 2016 at 07:11 UTC | |
|
Re^3: How to call cmd line within PERL?
by soonix (Chancellor) on Jul 20, 2016 at 10:29 UTC |