Can I search the current set path in a script?

I have on my machine a folder full of mathscript commands and functions.  This folder is beginning to get quite large and I'd like to be able to clean it up a bit by grouping the files into sub-folders.  For example, I'd like to create the following folders;
C:\MatrixXTools
C:\MatrixXTools\StringTools
C:\MatrixXTools\VariableTools
Of course, this would be fine if I was to set the path to every folder individually.  What I want to do though, is to set my path manually to C:\MatrixXTools and then put a command in there called 'import'.  The 'import' command would be responsible for searching the current path for a given folder and then adding it to the path when it finds it. So to import the StringTools, I would just call
import "StringTools"
All of my base scripts would go into C:/MatrixXTools and then if a script needed to use the StringTools, I could just call the import function.
The problem I have is that I can't find a command that will return me the path into a string vector.  Is there some way of doing this?  'SHOW PATH' doesn't do what I want it to because it just shows the path and doesn't give me a way of programmatically viewing it.
Is there a better method of getting everything into sub-folders all together?
I realise that I could also do this using the startup script, however I have the tools in revision control (svn) so that other people can use them - I don't want to have to get everyone to change their startup script every time I make a new folder - I should be able to do this in the scripts.
Note: we are still on v62.2 and we are looking into upgrade options.
Solved!
Go to Solution.

You can get the show path output into a string using === operator.
   [showPathStr,] === show path;
You can break up the showPathStr on the new line characters
into a string vector using the split function.
The split function was added in MATRIXx 7.1.9. The split function internally
uses the index and stringex functions to create the split string vector.
   showPathVector = split(""n",showPathStr);
If you try out the split function and look at the algorithm you will need to
download and eval MATRIXx 7.1.9 or higher.
Also, instead of changing startup.ms everytime you add a tools directory, why not
have startup.ms execute another script (i.e. execute file = toolsetup.ms) and you
would only update toolsetup.ms when adding a new tools directory.

Similar Messages

  • Teststand 1.03 - How can I get the sequence file path into an expression?

    The sequence file will be located at different locations on different computers. I need the base address of the sequence file to get to the correct limits file. How can I get the sequence file path into a string-local expression.
    Thanks

    As Ray described, the FindFile expression function and TS API method will seach all TS search directories and return to you the path of your file, assuming the file is located in the search directories.
    If you just want the path of a TS file that you have a reference to then there is a faster, easier method. You can use the Path property of the PropertyObjectFile class. In the attached example I use an AcitiveX Automation adapter step to call Path on the property RunState.SequenceFile. This returns the path to the current executing sequence file. Note that if you have not yet saved the sequence file then the path will be empty. In a subsequence step I strip off the file name leaving the root path of the file.
    Attachments:
    GetSeqFilePath.seq ‏22 KB

  • I have 10.6.8 and have installed two new printers HP 8610 and an Epson 7880 and can not find the Page Set-up menu anywhere in the applications I a trying to print from. There are no page sizes, paper types, appearsto be locked on a 13x19 size but It.

    Hi to the Mac Folks,
    I have 10.6.8 and have installed two new printers HP 8610 and an Epson 7880 and can not find the Page Set-up menu anywhere in the applications I a trying to print from. This is regardless of either printer selected.
    I primarily print photos from Photoshop CS5.  The term Page Set-up has gone missing in the file pull down menu. Can't make any choices  There are no page sizes, paper types, appearsto be locked on a 13x19 size paper format. Either being too large or too small.
    Saw a 2008 locked issue about this however none of the help fit my situation, options discussed are not available to me.
    Preview has no "Page Setup" - or does it?
    Does the constant struggle with computer compatability weirdness issues ever end or is it a enslavement scheme?
    Woody

    Hey,
    if you know the name(s) of the root folder(s) you want to access (eg. by making a note on the Windows side) then you can make them appear by just doing Shift-Command-G in Finder ("Go to Folder…"), and entering the full path to the required folders.  You can then navigate all the contents as normal.
    HTH,
    S.

  • Can I find the current tab in Terminal using applescript?

    Running a script from the shell by prepending
    #! /usr/bin/osascript
    as part of my .profile, can I find the "current" tab using Applescript. Most of the time, the "current" tab will not be visible, as the shell is being initialised, or re-initialised.
    I want to set the dircolors for my shell by determining the background color of the tab in which the shell is executing.

    Under the Window menu you can activate any of the palettes that you want. In your case the Field tab is under the Object palette

  • Can't get the current bitrate info use SMPTE-TT Plugin

    Using OSMF2.0 to stream a smil title.
    Add the MediaPlayerCapabilityChangeEvent.IS_DYNAMIC_STREAM_CHANGE event listener, after the event dispatch then add the DynamicStreamEvent.SWITCHING_CHANGE event listener.
    The bitrate info can be report, normal. But after I add the SMPTE-TT plugin and load it like this:
    var pluginResource:MediaResourceBase = new PluginInfoResource(new SMPTETTPluginInfo);mediaFactory.loadPlugin(pluginResource);
    The title can be stream correct and the quality of the video can be set by the bandwidth, but only the DynamicStreamEvent.SWITCHING_CHANGE event can not be dispatch, so I can't get the current bitrate info.
    I debug it in the OSMF source code and find the issue in the org.osmf.elements.compositeClasses.ParallelDynamicStreamTrait class line 323
    FYI:
    onSwitchingChange function that the numChildrenSwitching property always 0, so it can not call the setSwitching function and can not dispatch DynamicStreamEvent.SWITCHING_CHANGE event.
    So, I add some changes from line 333 to line 336 and it has be fix:
    Environment:Flex SDK 4.6 + flash player 11.8.
    I don't know it is a bug in the OSMF framework and I want to get more info about it.
    Thanks.

    can you turn off the message pane (F8) between restarts? I am guessing it will turn on again as well.

  • Where can I find the current time and date of Time Capsule?

    I have a home network consisint of 2 x Time Capsules and 1 x Airport Express.  All is working fine.  I would like to set up access control for one machine connecting to the network and I can see I can do this under Access Control on the Airport Utility.  My question is where can I find the current time and date setting for these devices? 
    I can set them to use the time.apple.com server to set the time automatically, but I can't find where to see the current time and date of the device.  The only place I can see reference to the time and date is on the logs and statistics under the Advanced tab of the AirPort Untility.

    I don't think you can change the time and date on the TC itself, it just connects to a time server (and you set your own time zone).

  • How can I CACULATE the current X,Y coordinate?

    Hi Veterans,
    When I was using method Graphics.drawString(String str, int x, int y) to display the string on the specified (x, y), how can I calculate the current x at the end of the string when i finished, given the font size is available
    any help is appreciated!

    Well Im sure if you searched the sun sight you could find a getX() method....but this works too
    public void paint() {
    Graphics2D g2D = (Graphics)g
    int x=5;
    int y=7;
    g2D.drawString("Hello",x,y);
    System.out.println(x +" is the x position");
    System.out.println(y + " is the y position");
    This is direct code for the paint() method of an applet paintComponent() if your in a JFrame

  • Can't search the App Store!

    Can't search the app store. Good connection and can see featured apps and other things but can't search for any games. Just comes up with "no results" Just seems to be a problem tonight within the last couple of hours.

    You can work around this on your iPod/Phone by searching for an app by title using Google in Safari. If you get a hit in Safari for an app that links directly to the app store, when you click on it, it will flip you to an installation screen for that app on your device, and it installs like normal when you click the button.  Clumsy and irritating, but it works. Just finished setting up my wife's iPhone 4S and it was the only way to get the vz contact transfer app onto her phone.
    Apple has got to know there's a problem by now, though -- their employees must be having the same issue, and i can hardly imagine an Apple employee hanging out in the cafeteria on their campus with a Droid or an HTC phone.

  • I want to update iCloud account with new apple id but don't know password for old apple id.  Plus can no longer receive email at old apple id.  How can I delete the current iCloud account on my iPhone if the previously stated conditions exist?

    I want to update iCloud account with new apple id but don't know password for old apple id.  Plus can no longer receive email at old apple id.  How can I delete the current iCloud account on my iPhone if the previously stated conditions exist?

    If the old ID is yours, and if it is an earlier version of your current ID, go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iDevice, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • 1. How can we search the Forum to see if a question has already been asked? 2. Can I send a Web Page and not just its Link?

    1. How can we search the Forum to see if a question has already been asked? Search goes back to Help and out of the Forum.
    2. Can I send a Web Page and not just its Link? Explorer allows it.

    1. How can we search the Forum to see if a question has already been asked? Search goes back to Help and out of the Forum.
    2. Can I send a Web Page and not just its Link? Explorer allows it.

  • How can i get the document full path in S_TieDocument?

    I create a new S_TieDocument and override 2 methods:
    extendedPreInsert and extendedPostInsert
    how can i get the document full path in these 2 methods?
    (e.g. if i use the system user to upload a new file named 'test.file' in system root path /home/system, and i want to get the document full path '/home/system/test.file', how to get it?
    anybody know it, pls tell me, thanks a lot.
    java source is as below
    package oracle.ifs.server;
    import oracle.ifs.beans.Document;
    import oracle.ifs.beans.DocumentDefinition;
    import oracle.ifs.beans.LibraryObjectDefinition;
    import oracle.ifs.beans.LibrarySession;
    import oracle.ifs.beans.PublicObject;
    import oracle.ifs.common.AttributeValue;
    import oracle.ifs.common.IfsException;
    import oracle.ord.itech.cmsdk.ws.view.EmbeddedCMSDKWebServicesWSStub;
    public class S_TieDocument extends S_Document
    public S_TieDocument(S_LibrarySession session, S_LibraryObjectData data)
    throws IfsException
    super(session, data);
    public S_TieDocument(S_LibrarySession session, java.lang.Long classID)
    throws IfsException
    super(session, classID);
    // Overrides
    public void extendedPreInsert(OperationState opState,
    S_LibraryObjectDefinition def)
    throws IfsException
    // Always call super
    super.extendedPreInsert(opState, def);
    // Get the LibrarySession
    S_LibrarySession session = getSession();
    def.setUserSetAttribute("CUSTOMATTRIBUTE",
    AttributeValue.newAttributeValue(""));
    //how can i get the document file full path here?
    public void extendedPostInsert(OperationState opState,
    S_LibraryObjectDefinition def)
    throws IfsException
    // Get the LibrarySession
    S_LibrarySession session = getSession();
    //how can i get the document file full path here?
    }

    In the new version of Numbers this option is not available.  You will have to type the file name into the header yourself.  You can post feedback to Apple using the menu item "Numbers > Provide Numbers Feedback"
    or use Numbers2.3 which should be in the folder "/Applications/iWork '09" if you previously had it installed

  • How can I search the last line in an internal table?

    How can I search the last line in an internal table?
    With a describe?? If it is , how can I do that?
    Thanks!!

    Hi shilpa,
    it seems to be you are NEW to SDN. welcome. if you want to get solutions to your Questions, you have to post a NEW thread.dont use the existing thread to post your question.
    any way i am giving you the solution for your question
    LOOP AT ITAB WHERE F1 = <SOME VALUE>
                       F2 = <SOME VALUE>.
    ENDLOOP.
    IF SY-SUBRC = 0.
      ITAB WILL HAVE THE LAST RECORD which satisfying the given criteria in WHERE clause of LOOP.
      write itab <--this ITAB will have the last record.
    ENDIF.
    regards,
    Srikanth.
    Message was edited by: Srikanth Kidambi

  • I can only print the current page of downloaded pdf's.  Not able to print "all".  I'm using a Macbook air.

    I can only print the current page of downloaded pdf's.  Not able to print "all".  I'm using a Macbook air.

    it says "the document could not be printed".  "There were no ages selected to print".
    I selected "all".  I always tried selecting pages "1-3".
    The only choice that works is current page.  Very strange.

  • How can I return the current Date in Java?

    I am new to Java, and basically I want to know how I can return the current date as a variable, so for example, I have declared the following date variable
    private java.util.Date currentDate;How can I return the current date, do I have to write a method? To be more specific, I need to write a setMethod, that simply returns the current Date in Java.
    Please point me in the right direction.
    Thanks,

    If all you want is a date for printing or displaying, the easiest way is to use Date as shown below. If you need something more complex, look at the Calendar API.
    import java.util.Date;
    class DateEx
         public static void main(String args[])
              Date now = new Date();
              System.out.println(now);          
    }

  • How can I get the current user an  resource context  in a portal JSPDynPag

    How can I get the current user (com.sapportals.portal.security.usermanagement.IUser?)an the resource context  in a portal component (JSPDynPage)?
    Thanks.

    Hi Jon,
    Here is the code to get the current user and resource context in your JSPDynPage:
    IPortalComponentRequest  currentRequest  = (IPortalComponentRequest)pageContext.getAttribute(javax.servlet.jsp.PageContext.REQUEST);
    com.sapportals.portal.security.usermanagement.IUser contextUser = (com.sapportals.portal.security.usermanagement.IUser) currentRequest.getUser().getUser();
    ResourceContext resourceContext = new ResourceContext(contextUser);
    Greetings,
    Praveen Gudapati
    p.s. points are always welcome for helpful answers

Maybe you are looking for

  • How do I archive emails to a local Harddrive?

    I would like to clean up and minimise my mail in and sent boxes by archiving the mails to some repository on a local hard drive. I would laos like to be able to access these later if needed without too much hassle. I am hoping the mail inbox will be

  • Atomic Web Browser -- How to set as preferred browser instead of Safari?

    I recently installed the Atomic Web Browser on my iPad.  However, whenever I tap on a link outside this app (in an email, for example), the Safari browser is activated.  Is there a way to make the Atomic Browser the preferred browser so this won't ha

  • Using imessage to someone in africa

    Can I use imessage on my iphone 4 to text someone with an iphone5 who will be in Kenya, Africa?  Do I need a special ap or will Imessage to Imessage go through just like normal? Will the person in kenya still be able to access their email on their ph

  • How do I stop files from opening as "Word Work File C_3.tmp."?

    I have MS Word 2011 for Mac. Whenever I open a file that I have saved, it opens with the title "Word Work File C_3.tmp." To save whatever work or editing I want to do, I then have to go back to the saved file, pick up the actual title, go back to the

  • Shared music and movie library stops loading

    The shared iTunes music and movie library stops loading on my ios devices. iTunes 11.1.5 is set up for both home sharing and library sharing over my secured home wifi network. Home sharing between the mini that is running iTunes and my old Macbook wo