MBone Posted February 14, 2010 Report Share Posted February 14, 2010 i have been looking but i cant seem to figure out how to create the txt file so that i can track the variable string. What i would like to do is create a txt file to track a set of variable and write to it so that i dont have to complete certain steps again. is this an easy task or a very complicated one? mbone Quote Link to comment Share on other sites More sharing options...
Yehnfikm8Gq Posted February 14, 2010 Report Share Posted February 14, 2010 I'm not exactly sure what you are trying to do but writing to a text file is quite easy: Variable Modify String - Save to Text File saves the variable over any existing content Variable Modify String - Append to Text file saves the variable in the next line below existing content You will probably need to do add a trailing CRLF after each entry - checkbox provided. You can create the text file in advance using Notepad or if you enter the full path and filename in the Variable Modify String dialog it will create the file for you. If you have a number of text variables that you want to update overwriting previous values, an ini file may be better. I'll not go into those at this stage as text files may be good enough. Quote Link to comment Share on other sites More sharing options...
MBone Posted February 14, 2010 Author Report Share Posted February 14, 2010 I'm not exactly sure what you are trying to do but writing to a text file is quite easy: Variable Modify String - Save to Text File saves the variable over any existing content Variable Modify String - Append to Text file saves the variable in the next line below existing content You will probably need to do add a trailing CRLF after each entry - checkbox provided. You can create the text file in advance using Notepad or if you enter the full path and filename in the Variable Modify String dialog it will create the file for you. If you have a number of text variables that you want to update overwriting previous values, an ini file may be better. I'll not go into those at this stage as text files may be good enough. i want to make it so that i never loose focus on the current window. as if the text/ini file can be in the background with never having to open it up on the screen to read but in just a process that would do it just like calling a variable from a saved location in the macpro. does this explain, if it dont then that is as basic as i can get as i dont understand it enough to break it down to what i want to ask. thanks john you are on the fast track to getting high ranking on the forum. mbone Quote Link to comment Share on other sites More sharing options...
rberq Posted February 14, 2010 Report Share Posted February 14, 2010 The file-processing does happen in the background, without any window involvement, so you should be OK there. John told you how to write text files. Look at commands "Ascii File Begin / End Process" and "Text File Begin / End Process" for reading the files back in after they are written. As John mentioned, using INI files may be a better approach -- writing and reading is simpler, but the quantity of data you can store in one entry of an INI file is severely limited. You can also store strings in environment variables, which can be created on the fly -- see Variable Modify String and Variable Set String commands. The size of a string stored in an environment variable is also limited, but not as badly as INI values -- env variables follow Windows rules, I believe. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.