Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Feb 2007
    Posts
    12

    Got another question

    Okay I KNOW its on this forum somewhere I think ive seen it but I have searched everything.. So.. what I need is to have a tree and make it open a .exe file when clicked.. Simple but can't find it =|

  2. #2
    Join Date
    Jan 2007
    Posts
    56
    I believe you would use Tree.GetNode from the help manual.
    Find out what the selected node is and open the appropriate
    file from there.

    Someone please correct me if I'm wrong.

    Patrick

  3. #3
    Join Date
    Feb 2007
    Posts
    12

    =|

    Okay i've messed around with it too much.. I tried as much as I can with Get.TreeNode.. I'm pretty new with AMS could you help me some more?

    I would really appreciate it
    Thanks

  4. #4
    Join Date
    Jul 2004
    Posts
    313
    I have never messed with the tree component but I would think that it is something like this

    Code:
    
    result = Tree.GetSelectedNode("Tree1");
    result1 = File.Run("AutoPlay\\Docs\\"..result, "", "", SW_SHOWNORMAL, false);

  5. #5
    Join Date
    Feb 2007
    Posts
    12
    Thats on the right path, but I need it to open a diffrent program for each node

  6. #6
    Join Date
    Jul 2004
    Posts
    313
    This should open a different program/file depending on the value of each node.


    as I said I'm not familiar wih the AMS Tree object so if anyone else could help on this great.

  7. #7
    Join Date
    May 2006
    Posts
    5,380
    hi,

    i think this is more what you are looking for

    PHP Code:
    node Tree.GetNode("Tree1"e_NodeIndex);
    result File.Run("AutoPlay\\Docs\\"..node.Data""""SW_SHOWNORMALfalse); 
    hope it helps
    Open your eyes to Narcissism, Don't let her destroy your life!!

  8. #8
    Join Date
    Feb 2007
    Posts
    12

    Thank you so very much.

    Yay, it worked perfect RizlaUK, thanks to everyone! =D

  9. #9
    Join Date
    Feb 2007
    Posts
    12
    Okay again thanks for the code BUT one quick question..
    Say I wanted to open a program in the folder the program was in..

    I think its "_sourcefolder//somethingsomething" I looked around the forum a lot, I remember seeing a post about it I cant find it though.

  10. #10
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by Codyclark View Post
    Okay again thanks for the code BUT one quick question..
    Say I wanted to open a program in the folder the program was in..

    I think its "_sourcefolder//somethingsomething" I looked around the forum a lot, I remember seeing a post about it I cant find it though.
    This?

    http://www.indigorose.com/forums/sho...&highlight=SFX
    Intrigued

  11. #11
    Join Date
    May 2006
    Posts
    5,380
    yeah, Intrigued's code is great for finding the path to the exe location (when compiled into a web/email exe) i have used it in many projects

    but if you are making the app in a folder then "_sourcefolder" would do the trick

    eg:
    PHP Code:
    node Tree.GetNode("Tree1"e_NodeIndex);
    result File.Run(_sourcefolder.."\\"..node.Data""""SW_SHOWNORMALfalse); 
    or useing Intrigued's code

    PHP Code:
    function fnEXEOrigLoca(runexe)
        
    strCWF Folder.GetCurrent()
            
    strPath String.Replace(_CommandLineArgs[1], "SFXSOURCE:"""true)
                return 
    strPath;
    end

    -- An example "function call" (to use the function)
    fnEXEOrigLoca(_DesktopFolder.."\\app_name.exe")

    node Tree.GetNode("Tree1"e_NodeIndex);
    result File.Run(strPath.."\\"..node.Data""""SW_SHOWNORMALfalse); 
    Open your eyes to Narcissism, Don't let her destroy your life!!

  12. #12
    Join Date
    Dec 2003
    Posts
    891
    Look in the Help file under Contents-Variables-Global Variables. You can learn about all the Global Variables in AMS that can make your coding a lot easier.

  13. #13
    Join Date
    Feb 2007
    Posts
    12

    ...

    ..Okay either i've gottin retarded or ..I don't know I have done pretty much everything I know its something simple im doing wrong but thats whats ****ing me off and messing me up.. SO.. I have my folder.. Got my app running I have a folder in the same folder as I have my app.. Now I in that folder is the programs I want to run.. The folder name is GENS so I was guessing this would be the code..

    Code:
    node = Tree.GetNode("Tree1", e_NodeIndex);
    result = File.Run(_SourceFolder.."//Gens"..node.Data, "", "", SW_SHOWNORMAL, false);
    But its not working.. I don't know what the heck im missing please help before I lose more brain cells

  14. #14
    Join Date
    Dec 2003
    Posts
    891
    The slash's are backwards
    should be
    Code:
    result = File.Run(_SourceFolder.."\\Gens"..node.Data, "", "", SW_SHOWNORMAL, false);

  15. #15
    Join Date
    Feb 2007
    Posts
    12
    I tried that before I posted, I have no idea what is wrong..

    SourceFolder -> Gens


    ..=|

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Math.RandomSeed() question
    By stickck in forum AutoPlay Media Studio 6.0
    Replies: 8
    Last Post: 06-09-2006, 09:42 AM
  2. Kiosk Mode Window Manipulation Question
    By travisperkins in forum AutoPlay Media Studio 6.0
    Replies: 13
    Last Post: 03-06-2006, 07:40 AM
  3. Question: reg question
    By mjheijster in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 07-22-2005, 04:01 AM
  4. Basic Flash question
    By aae991 in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 03-09-2005, 09:46 PM
  5. question about sound mp3
    By Rapido78840 in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 10-10-2003, 11:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts