Using AppleScript to step through a txt file.
I am new to AppleScript but not programming.
I have a program in AppleScript that currently takes my integers
Ip, user, passwrd and uses the in terminal to gain access to our clients machines and do certain tasks.
I would like to have a txt file filled with the ip addresess so that I can simply step through the file.
I can read in from the txt file but it simply reads the entire thing and crashes out my program.
Can someone please help?
Thank You.
I can but I cannot.
Text file would be as follows
10.10.10.20
10.10.10.21
10.10.10.25
10.20.45.200
84.30.26.79
So on and so forth for all the IPs of our clients machines.
The script has the variables as follows.
set acct to "admin"
set pass to "password"
set addr to "10.10.10.10"
set rightServer to "Connected to " & addr & "? If not fix it!"
#Login Process
activate application "Terminal"
delay 1
tell application "System Events" to keystroke "ssh " & acct & "@" & addr
tell application "System Events" to keystroke return
delay 2
activate application "Terminal"
Then the script goes on from there to do some other things.
I need help with the login process.
I would like to set it to a txt file and watch as it steps through the file so its more automated.
Similar Messages
-
I want to step through a .mov file frame-by-frame looking at geometry of an aircraft in the video to establish the rotational speed of the propeller. This should be fairly straightforward by looking at how much the propeller moves between each frame and using the exposure time of each frame.
However the .mov file is from an iPhone 4S and looking at the details, has a variable frame rate. What I need to know is the duration that each frame is displayed for in order to do my analysis. Does anyone know how to find out this information?I want to step through a .mov file frame-by-frame looking at geometry of an aircraft in the video to establish the rotational speed of the propeller. This should be fairly straightforward by looking at how much the propeller moves between each frame and using the exposure time of each frame.
However the .mov file is from an iPhone 4S and looking at the details, has a variable frame rate. What I need to know is the duration that each frame is displayed for in order to do my analysis. Does anyone know how to find out this information? -
Tagging words through a .txt file
Hi all,
We have been looking all over the internet for a script that we can use/buy. But cannot find it anywhere.
We have a rather large document and an external word list in a .txt file. This list contains words that need to be in the index at the end of the document.
Instead of filling in a couple of hundred words and linking them by hand, it would be great if there is a script that can handle this.
We have looked in to Indexmatic2 (http://www.indiscripts.com/post/2011/07/indexmatic-2-public-release-and-user-s-guide ), but this script generates its own index list and does not create links to the original words in the document.
We have found a script that can create index links from colored words in the document.
So does anyone know if there is a script floating around that can load an external .txt wordlist and either color or add a character style to words in a document?
Or even a script that does what we need in 1 go?
ThanksThedesmodus,
there is a script by Martin Fischer at www.hilfdirselbst.ch (a swizz-german website) that could fit your needs. You can download it if you choose to be a premium member which requires a small fee. It's written for InDesign CS3 but it should run with CS4 or CS5. I tested it with a small list of words and it ran fine with InDesign CS5.
http://indesign.hilfdirselbst.ch/text/indexeintrage-mit-unterstichworten-uber-eine-konkord anzdatei-erzeugen.html
If you prefer a Google translation:
http://translate.google.de/translate?hl=de&sl=de&tl=en&u=http%3A%2F%2Findesign.hilfdirselb st.ch%2Ftext%2Findexeintrage-mit-unterstichworten-uber-eine-konkordanzdatei-erzeugen.html
Uwe -
JMF Player: Stepping through an .mov file
I have an applet that plays an .mov file and I would like to step through the file one frame at a time on command. Does any body know how I could do so? I also need the ability to start at a certain frame and play from that location.
Any Ideas????
Thanks,
AndrewI figured it out!! They actually have an example that I never noticed before that you can look at. If you are interested go to this address:
http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Seek.html
Thanks -
Using AppleScript to create folders and place files in them
Hi guys,
I've been reading through the forum for the better part of the last 6 hours wracking my brain trying to figure out how to accomplish what I'm trying to do. I've been playing around with Automator and also trying to decipher some Apple Script samples that were posted on here, but I'm really having no luck at all. I'm sure you've all been there where you feel like you're on an endless search to solve a problem and it feels like there's no hope. I've tried every single possible thing I can and I'm getting close, but it's never quite right.
Here's what I'm trying to do, and hopefully some kind soul will help me out. I'm deseperately trying to figure this out, and any help at all would be GREATLY appreciated!
I have a bunch of PDF files that I scan, in the hundreds. After I've scanned them I'm left with something like this:
1234567_Elephant.pdf
1234567_Duck.pdf
1234567_Cat.pdf
1234567_Cat_01.pdf
1234567_Dog.pdf
3431233_Elephant.pdf
3431233_Dog.pdf
3431233_Dog_01.pdf
3431233_Duck.pdf
etc...
So they have a 7 digit ID, then the file name which is always one of the 4 options (I'm just using the animals as examples, but they would be other words).
What I'd want the script to do is categorize these into folders based on the ID number, and then based on the "animal" and then the files within them. Note, some files have an _01 or _02 etc... appended to them. I don't know if this makes a difference.
So after running the script I'd love to see
1234567 (Folder)
Elephant (Subfolder)
1234567_Elephant.pdf (File)
Duck (Subfolder)
1234567_Duck.pdf (File)
Cat (Subfolder)
1234567_Cat.pdf (File)
1234567_Cat_01.pdf (File)
Dog (Subfolder)
1234567_Dog.pdf (File)
3431233
Elephant
3431233_Elephant.pdf
Dog
3431233_Dog.pdf
3431233_Dog_01.pdf
Duck
3431233_Duck.pdfwell, using a couple of stock handlers I had lying around, and making the following assumptions:
that an underscore is always the delimiter used
that the file name is always a single word like 'dog' or 'cat' (if you have multiple word file names, the script needs to be modified some)
this should do what you ask:
set mainFolder to (choose folder) as text
tell application "System Events"
-- get all the unsorted files, and loop through
set unsortedFiles to every file of folder mainFolder whose visible is true
repeat with thisFile in unsortedFiles
-- split the file name on underscores and periods
set fileNameBits to my tid(name of thisFile, {"_", "."})
-- first item of list is id, make/get correct folder
set IDFolder to my checkForFolder(mainFolder, item 1 of fileNameBits)
-- second item of list is file name, make/get correct folder in id folder
set groupFolder to my checkForFolder(IDFolder, item 2 of fileNameBits)
-- move file
move thisFile to groupFolder
end repeat
end tell
to checkForFolder(fParent, fName)
-- subroutine checks for folder, creating it if it doesn't exist
tell application "System Events"
if not (exists folder fName of folder fParent) then
set output to path of (make new folder at end of folder fParent with properties {name:fName})
else
set output to (path of (folder fName of folder fParent))
end if
end tell
return output
end checkForFolder
on tid(input, delim)
-- subroutine for handling text item delimiters
set {oldTID, my text item delimiters} to {my text item delimiters, delim}
if class of input is list then
set output to input as text
else
set output to text items of input
end if
set my text item delimiters to oldTID
return output
end tid -
Using Applescript to play midi or mp3 files.
I'm trying to work out how to write an Applescript program to help me with music. My idea is to have Applescript play me - lets say the first two notes of a midi song and me type the answer to what it is.
Is this a difficult task - ive done some scripting but only with microsoft word and not with sound.
Is there a set command to play a midi file from within applescript, and is there a way to set the command to play only the first few notes of a midi file (say the first 5 notes).
Any help would be really appreciated here.
Thanks
MarkThis is a more accurate idea of what Im looking to do.
I'm trying to work out how to write an Applescript program to help me with music. My idea is to have Applescript play me - lets say the first two notes of a midi song and me type the answer to what it is.
Is this a difficult task - ive done some scripting but only with microsoft word and not with sound. Ive got filemaker pro and office 2008 so would look to use either of these programs to build a database. I've got abletron as well but if there is an easier way to record midi melodies with an external usb keyboard i'd like to know.
Is there a set command to play a midi file from within applescript, and is there a way to set the command to play only the first few notes of a midi file (say the first 2-3 notes).
Any help would be really appreciated here. Ive just downloaded play sound - but am more interested in seeing if I can play a certain selection of notes, and im not sure i can do this with PS.
Id ultimately like to build up a database of melodies - using filemaker pro, and associate each midi melody with a database record i.e. author of melody, date written etc. -
AppleScript puts control characters in txt file, inflating it enormously
Hi all,
I've come across a strange problem. I have an AppleScript file that puts up a dialog box at regular intervals asking me to write down what I am doing (to create an activity log). The file is saved to my Documents folder. This has been working just fine for several months (years), and now, all of a sudden, AppleScript fails on me. The reason is, the log file is inflated out of proportions because it contains hidden control characters (gremlins) between each letter and zillions of them between words and lines. Opening one of these files makes TextEdit go crazy ('Application not responding'). I discovered these gremlins when I opened the document in Classic mode with Word 5 (the best application ever to have been produced by MS, which allows me to remove them and make the file palatable to TextEdit again).
But that doesn't solve the problem: Every entry continues to be inserted with another load of gremlins, and I can't understand why. I deleted preferences both for TextEdit and AppleScript, and I performed regular disk maintenance.
TextEdit is set to save plain text files, end-of-line is Macintosh style, character set is Western Mac OS Roman. It's always been like this before when it worked ok.
Any ideas?
Thanks in advance.
G4 MDD 1.25 GHz, 768 MB RAM Mac OS X (10.3.9)The solution to my problem can be found in the AppleScript forum here:
http://discussions.apple.com/message.jspa?messageID=2353871
With many thanks to reese_, who provided the solution, and to Tom, who directed me there! -
Using spotlight to search through stored media files
i have an xserve that will only be used to store media files such as .dv and .mxf. I add spotlight comments to the media files before storing them in the xserve, however, when i use spotlight to search the server it does not work. Is it because it is a security issue or do i have to turn spotlight on in the server?
Using Spotlight to search a server is something that's coming with Leopard. To avoid the TOS gestapo for slamming me for posting about future products, I will link to Apple's page for "Leopard Server sneak peek" that talks about this very fact:
http://www.apple.com/server/macosx/leopard/spotlightserver.html
Your options right now for searching a server are to use Apple Remote Desktop, as Tiger does not include the ability to search machines across the network via Spotlight. -
LocalLAT.txt file not working in Windows 7
hi,
i want to exclude few ip addresses from tmg client installed on a host and want it to be routed through another gateway placed on a router. I used to do this via locallat.txt file placed in all users directory with windows xp. but it is not working with
windows 7.
i have placed the file in: %ProgramData%\Microsoft\Firewall Client 2004
thanksHi,
As the issue is specific with Forefront TMG , you may contact Microsoft Forefront TMG Forum for further assistance on the issue:
Contact - Forefront TMG support:
https://social.technet.microsoft.com/Forums/forefront/en-us/home?category=forefront
Please revert for any clarification on this or any Windows issue. We will be glad to help you.
Roger Lu
TechNet Community Support -
SO_NEW_DOCUMENT_ATT_SEND_API1 and txt file problem
Hi
I'm using FM SO_NEW_DOCUMENT_ATT_SEND_API1 for sending a txt file attachment, but the format of data is wrong.
U s e r : T F R A N C O
D a t e : 1 8 / 0 5 / 2 0 1 0
clear objpack-transf_bin.
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
objpack-obj_descr = 'Document'.
objpack-doc_size = tab_lines * 255.
call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
Document_data = doc_chng
put_in_outbox = 'X'
commit_work = 'X'
TABLES
Packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
Receivers = reclist
EXCEPTIONS
too_many_receivers = 1
Document_not_sent = 2
Document_type_not_exist = 3
Operation_no_authorization = 4
others = 99.
Thanks in advance.Hi Carlos
I've could delete space between letters but I need how to make for put new line in text format
USER:TFRANCO FECHA:25/05/2010.
Format must be:
USER:TFRANCO
FECHA:25/05/2010.
code:
DATA: hexa(1) TYPE c VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF.
CONCATENATE hexa text-H02 SY-UNAME INTO objbin-line . APPEND objbin.
CONCATENATE hexa text-H03 SY-DATUM INTO objbin-line . APPEND objbin.
Thanks in advance. -
How to read the second line in a .txt file with bufferedReader?
hi,
i am not the best in speaking english and programming java :)
so, just try to make sense of my question:
Im using a BufferedReader to read a .txt file.
the .txt file has 5+ different lines, and each line has 6 tokens (separated with ; )
My java file has 6 textFields and each textfield is filled with one of the 6 different tokens.
and my problem is:
I want my buffered reader to read the next line (with 6 new different tokens) by pressing a button.
if somethings not understandable, just ask :)maybe its easier to help me, when i publish my code, so here it is:
(its my version, without Thof's code. Sorry, but the comments are the most in german)
/* userdata.java */
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import javax.swing.*;
import java.util.*;
import java.io.*;
public class userdata extends Frame {
//-----------------------------------KlassenVariablen------------------------------------------------
private JPanel panel = new JPanel ();
String tokId = "";
String tokName= "";
String tokAge= "";
String tokTel= "";
String tokMail= "";
String tokText= "";
BufferedReader br;
String zeile;
StringTokenizer st;
String delim = ";";
//---------Buttons f?r Panel 1-------------------------
Button first = new Button("|< First");
Button back = new Button("< Back");
Button next = new Button("Next >");
Button last = new Button("Last >|");
//---------Buttons f?r Panel 3-------------------------
Button neu = new Button("New");
Button safe = new Button("Safe");
Button refresh = new Button("Refresh");
//--------Labels f?r Panel 2-----------------------------
Label lid = new Label("ID",Label.LEFT);
Label lname = new Label("Name",Label.LEFT);
Label lage = new Label("Age",Label.LEFT);
Label ltel = new Label("Tel.",Label.LEFT);
Label lmail = new Label("E-Mail",Label.LEFT);
Label ltext = new Label("Spruch",Label.LEFT);
Label lub = new Label("Last Button",Label.LEFT);
TextField id = new TextField();
TextField name = new TextField();
TextField age = new TextField();
TextField tel = new TextField();
TextField mail = new TextField();
TextField text = new TextField();
TextField usedbutton = new TextField();
//--------ActionEvent bla sachen eben--------------------
public static void main (String[] args) throws IOException {
userdata wnd = new userdata();
wnd.setVisible(true);
public userdata() throws IOException {
//--------------------------------Layout mit panel bestimmung--------------------------------------
setLayout(new BorderLayout());
JPanel p1 = new JPanel();
JPanel p2 = new JPanel();
JPanel p3 = new JPanel();
add(BorderLayout.NORTH ,p1);
add(BorderLayout.CENTER , p2);
add(BorderLayout.SOUTH , p3);
//-------------------------------Funktionslose Buttons in PANEL 1------------------------------------
p1.add(first);
p1.add(back);
p1.add(next);
p1.add(last);
p1.add(usedbutton);
//--------------------------------Funktionierende Textfelder in PANEL 2------------------------------
Panel labelpanel = new Panel();
p2.setLayout(new GridLayout(7,3));
p2.add(lid);
p2.add(id);
p2.add(lname);
p2.add(name);
p2.add(lage);
p2.add(age);
p2.add(ltel);
p2.add(tel);
p2.add(lmail);
p2.add(mail);
p2.add(ltext);
p2.add(text);
p2.add(lub);
p2.add(usedbutton);
//--------------------------------------Buttons in PANEL 3-----------------------------------------
p3.add(neu);
p3.add(safe);
p3.add(refresh);
//--------------------------------BufferedReader -------------------------------------------------
readData();
//--------------------------------Panel 2 TextField-----------------------------------------------
fillForm();
//================================ActionPerformed==================================================
first.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed( ActionEvent e ) {
System.out.println ("First");
usedbutton.setText("First");
back.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed( ActionEvent e ) {
System.out.println ("Back");
usedbutton.setText("Back");
next.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed( ActionEvent e ) {
System.out.println ("Next");
usedbutton.setText("Next");
last.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed( ActionEvent e ) {
System.out.println ("Last");
usedbutton.setText("Last");
neu.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed( ActionEvent e ) {
System.out.println ("New entry");
usedbutton.setText("New");
safe.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed( ActionEvent e ) {
System.out.println ("Now Saving, do not turn off!");
usedbutton.setText("Save");
//-----------------refresh
refresh.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed( ActionEvent e ) {
try{
readData();
}catch( IOException ioe){
System.out.println("Fehler beim lesen aus Datei");
fillForm();
usedbutton.setText("Refresh");
//=============================================================================Button Funktionen!!!
pack();
//--------------------------------WindowsListener hinzuf?gene--------------------------------------
addWindowListener(
new WindowAdapter() {
public void windowClosing(WindowEvent event)
setVisible(false);
dispose();
System.exit(0);
//-----------------------------------readData() - > Buffered Reader in aktion! --------------------
private void readData() throws IOException{
BufferedReader br = new BufferedReader(new FileReader("My .txt File with path"));
String zeile;
StringTokenizer st;
String delim = ";";
zeile = br.readLine();
st = new StringTokenizer(zeile, delim);
st.hasMoreTokens();
//System.out.println (st.nextToken());
tokId = new String(st.nextToken());
tokName = new String (st.nextToken());
tokAge = new String (st.nextToken());
tokTel = new String (st.nextToken());
tokMail = new String (st.nextToken());
tokText = new String (st.nextToken());
//--------------------------fillForm() - > f?llt die TextFelder aus!--------------------------------
private void fillForm(){
id.setText(tokId);
name.setText(tokName);
age.setText(tokAge);
tel.setText(tokTel);
mail.setText(tokMail);
text.setText(tokText);
} -
How to generate .txt file from data in internal table
Hi I am using the program below to load .txt file into SAP table.
I am moving the records from a .txt file into internal table final and then into ZOUT_CCFOBS table.
How do I load records from internal table final back to another .txt file with the same layout? Pls advice.
REPORT ZOUP_LOAD_CCF_OBS.
TABLES: ZOUT_CCFOBS.
TYPES: BEGIN OF tline, "structure to store a line of each row
line(1000) TYPE c,
END OF tline.
TYPES: BEGIN OF i_split, "structure to store split record of each row
t_ZOTFACIL(100) TYPE c,
t_ZOTCCF(8) TYPE c,
t_ZOTOBSCAT(100) TYPE c,
END OF i_split.
DATA: itab TYPE TABLE OF tline WITH HEADER LINE.
DATA: idat TYPE TABLE OF i_split WITH HEADER LINE.
DATA: final TYPE STANDARD TABLE OF ZOUT_CCFOBS WITH HEADER LINE.
DATA: file_str TYPE string.
DATA: c_fnh_mask TYPE dxfields-filemask VALUE '.',
c_search_dir TYPE dxfields-longpath.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
PARAMETERS p_file LIKE rlgrap-filename. "file location
SELECTION-SCREEN END OF BLOCK a1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM f4_dxfilename USING p_file.
START-OF-SELECTION.
Download data from application server
PERFORM download_data.
file_str = p_file.
LOOP AT itab.
CLEAR idat.
this will split the line at every delimeter into single field
SPLIT itab-line AT ',' INTO idat-t_ZOTFACIL
idat-t_ZOTCCF
idat-t_ZOTOBSCAT.
APPEND idat.
ENDLOOP.
copying the internal table into final table which compatible with table tcurr
LOOP AT idat.
final-ZOTFACIL = idat-t_ZOTFACIL.
final-ZOTCCF = idat-t_ZOTCCF.
final-ZOTOBSCAT = idat-t_ZOTOBSCAT.
APPEND final.
ENDLOOP.
LOOP AT final.
MODIFY ZOUT_CCFOBS FROM final.
IF sy-subrc EQ 0.
MESSAGE S001(ZCURR).
ELSE.
MESSAGE A000(ZCURR).
ENDIF.
ENDLOOP.
FORM f4_dxfilename USING p_file.
addition TAICK 15/07/2008.
*maintain application server default search path.
IF sy-sysid = 'BWP'.
c_search_dir = '//rdmsbw/prd/data/output/all'.
ELSEIF sy-sysid = 'BWQ'.
c_search_dir = '//rdmsbw/uat/data/output/all'.
ELSEIF sy-sysid = 'BWD'.
IF sy-mandt = '900'.
c_search_dir = '//rdmsbw/sit/data/output/all'.
ELSE.
c_search_dir = '//rdmsbw/dev/data/output/all'.
ENDIF.
ENDIF.
DATA: wa_file LIKE dxfields-longpath.
CLEAR: wa_file.
CALL FUNCTION 'F4_DXFILENAME_TOPRECURSION'
EXPORTING
i_location_flag = 'A'
i_server = ' '
i_path = c_search_dir
filemask = c_fnh_mask
fileoperation = 'R'
IMPORTING
o_path = wa_file
EXCEPTIONS
rfc_error = 1
error_with_gui = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
p_file = wa_file.
ENDIF.
addition end TAICK 15/07/2008.
ENDFORM. " f4_dxfilename
FORM download_data .
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
DO.
IF sy-subrc <> 0.
exit.
ENDIF.
READ DATASET p_file INTO itab.
if sy-subrc = 0.
APPEND itab.
clear itab.
endif.
ENDDO.
CLOSE DATASET p_file.
delete itab index 1. "remove column header
ENDFORM. " download_data
Edited by: RebekahMBB on Feb 20, 2012 12:56 PMHi I am using this piece of code to download my internal table into an .xls file on my pc.
FORM Z_CONVERT_EXCEL .
"This part of code to add column name in the downloaded file.
data : begin of int_head occurs 0,
Filed1(20) type c, " Header Data
end of int_head.
int_head-Filed1 = 'ZOTOUS'.
APPEND int_head.
CLEAR int_head.
int_head-Filed1 = 'ZOTOUS'.
APPEND int_head.
CLEAR int_head.
int_head-Filed1 = 'ZOTOGCUR'.
APPEND int_head.
CLEAR int_head.
Select ZOTOUS ZOTSYORGU ZOTOGCUR from ZOUT_ORG_CURR into CORRESPONDING FIELDS OF TABLE itab.
v_filetype = '.xls'. "I just manipulate the file name using XLS file type.
v_filename = 'C:\Documents and Settings\00088592\Desktop\OUs automation\development'.
CONCATENATE v_filename v_filetype INTO lv_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = lv_filename
filetype = 'ASC'
APPEND = 'X'
write_field_separator = 'X'
CONFIRM_OVERWRITE = 'X'
TABLES
data_tab = itab
FIELDNAMES = int_head
EXCEPTIONS
file_open_error = 1
file_write_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
ENDIF.
ENDFORM. "Z_CONVERT_EXCEL
As you can see the code specifies the header row separately and appends it in int_head.
What if I have 76 fields or more? I cant be specifying each like that.
Is there any other way to do this? To move the 76 field headers into int_head?
Pls help.
Thanks! -
I want to open a txt file and output data through an AO-using DAQmx for PXI
I have a PXI running a 8145RT CPU. I have a PX6040E Multifunction DAQ card installed in the PXI. I want to program an application where I open a txt file (existing in one of the the RT machines' folders), read the first row, and output its data through an AO channel. The drivers I should use is DAQmx v7.1, and the Labview RT v.7
Any idea?What exactly are you having problems with? Reading a text file can be done a number of ways. Look at the File I/O palette and check out Read Lines From File or Read Characters From File. There are string to number conversion functions on the string palette (i.e. Scan From String). There are also numberous shipping examples on using DAQmx for analog out. If you have a specific problem or question, please post back with additional details.
-
I'm using Signal Express to record Load vs Displacement data and export it to a format our engineers can work with (in this case ASCII is okay). It would seem that by selecting the Next Available File Name from the drop down arrow it would do just that. For instance a typical save path for me would look like C:\....Desktop\Project Number and Description\Run_1.txt within that Run1.txt file would be all the data points for that run. When I hit record again Signal Express would (SHOULD) create a Run_2 since it's the Next Available File Name.
But instead what it does is creates a single txt file for every single sample point being read. Needless to say, If I'm recording 6 second of data at 1khz I end up with thousands of txt files!
The first thing that comes to mind is, why would anyone want this?
Second is how can I record multiple individal runs for the same project and have the file name increment?
SCXI- 1000 Chassis w/ 1346 adapter
PCI 6281 DAQ card
SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
SCXI- 1180 Feedthrough Panel w/ 1302 Block
Signal Express 2014.
Win7 Enterprise...and more attachments of the ASCII save path, before and after acquiring 4 seconds of data along with one of the files from that folder.
Again, this is 4 seconds of two-channel spring plot data at 100 Samples to Read @ 1k Rate (Start Run.... wait 4 seconds or two full test sample cycles... Stop Run).
~EDIT~
The .txt file would not attach (I think it's too small). Here's what it looks like if you were to open it:
Load vs Displ - Displ (inches) Load vs Displ - Load (lbs)
3.736323 273.751906
Also, for some reason it won't let me attach my project file. It's a .seproj extension but the forum thinks it's 1k in size and "empty"
Message Edited by OKors on 06-05-2009 05:57 PM
SCXI- 1000 Chassis w/ 1346 adapter
PCI 6281 DAQ card
SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
SCXI- 1180 Feedthrough Panel w/ 1302 Block
Signal Express 2014.
Win7 Enterprise
Attachments:
FolderBeforeSave.JPG 39 KB
FolderAfterSave.JPG 239 KB -
there is a program (ESP, the Experience Sampling Program) that allows easy development and installation of research protocols via palm pilots. The program runs in mozilla-based browsers--Mozilla or Firefox. After the program is installed, it is accessed by hitting the URL chrome://espdesktop/content/desktop.xul. Previously, this required editing the file "installed-chrome.txt" file which was located into the chrome subfolder. The newest versions of firefox have done away with this subfolder. Not being a programmer, I am having trouble figuring out how to access the program now.
First thing I noticed is you are running on an outdated/older version of Firefox & not the current version. Download it from here:
* At the top of the Firefox window click the Firefox button, go over to the Help menu and select About Firefox. For Windows XP: Go to the Help menu and select About Firefox.
* The About Firefox window will open and Firefox will begin checking for updates. If updates are available, they will begin downloading automatically. If Firefox is already up to date, just close the About Firefox window.
* When the updates are downloaded and ready to be installed, click Restart to Update. Firefox will be restarted and the updates will be installed.
Maybe you are looking for
-
OS 10.8.2 - time capsule backup disk cannot be found
I updated to OSX 10.8.2 last night and now my Time Capsule cannot be found even though my wireless connection to the Time Capsule is fine and the Time Capsule appears in the Finder. Anyone havng similar issues?
-
Error in NW 7 ehp2 HA installation in win 2008 R2 /MSSQL
Hi Gurus, I am facing below error during first mscs installation. I am running sapinst using virtual host. From sapinst log - TRACE 2012-01-28 01:25:53.693 ClusterGroup(isting status for resource 'L':) TRACE 2012-01-28 01:25:53.693 ClusterG
-
'Learn Python the Hard Way' book help - PowerShell
There's a book out called 'Learn Python the Hard Way' and it wants to run the exercises in PowerShell, which no one apparently knows much about, I just need to do a couple of simple functions, I just don't know how to do them and I don't see how onl
-
Lightroom 2 colour/darkness vs Lightroom 1
I have just upgraded to lightroom 2 and all images appear too dark, too contrasty and with a slight colour cast. The strange thing is that lightroom 1.4 is still on my machine, and, when looking at the same picture through Lightroom 1.4, the result i
-
I want to rotate XY graph. By using Plot multi XY. vi to convert my graph to picture (image), then rotate it. It works but I would like to change the background of picture to black or any color, instead of white. Please help. Thank you. Using LV