Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 22
  1. #1
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534

    FREE: GlobalPaths Action Plugin

    Why a GlobalPaths Plugin?
    Well, have you ever noticed that the _SourceFolder global variable doesn't always to the trick? Although it has many situations in which it works well, it is not always reliable which makes accessing its sub-folders impossible at times.
    Of course, this depends entirely on whether or not the project is compiled and what type of compiling method you use (Web/Exe, Hard Drive etc.).
    But wouldn't things be simpler if you never had to consider that issue? I would say...Yes!
    Additionally, your path variables are shortened (just a little beneficial side effect of using the plugin).

    What the GlobalPaths Plugin Does
    Fortunately there is a solution...A GlobalPath Solution. I have been using this script for over a year now and would not build a project without it. Once it has been run, you never have to worry about where your folders are located again.

    Your Docs folder is always _Docs. The same goes for _Audio, _Scripts, _ExeFolder and all the rest no matter if and how your project is compiled. No scripting is needed either, simply activate the plugin and you're ready to go.

    Optional Integration
    I have included, in the help file, a way to add the GlobalPaths global variables to Intellisense if you so desire (although this step is not necessary).

    As always, please feel to send me any bug reports or suggestions.

    So there you go...Problem solved!

    Enjoy!
    Last edited by Centauri Soldier; 08-26-2009 at 04:34 PM.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  2. #2
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by Centauri Soldier View Post
    Why a GlobalPaths Plugin?
    Well, have you ever noticed that the _SourceFolder global variable doesn't always to the trick? Although it has many situations in which it works well, it is not always reliable which makes accessing its sub-folders impossible at times.
    Of course, this depends entirely on whether or not the project is compiled and what type of compiling method you use (Web/Exe, Hard Drive etc.).
    But wouldn't things be simpler if you never had to consider that issue? I would say...Yes!
    Additionally, your path variables are shortened (just a little beneficial side effect of using the plugin).

    What the GlobalPaths Plugin Does
    Fortunately there is a solution...A GlobalPath Solution. I have been using this script for over a year now and would not build a project without it. Once it has been run, you never have to worry about where your folders are located again.

    Your Docs folder is always _Docs. The same goes for _Audio, _Scripts, _ExeFolder and all the rest no matter if and how your project is compiled. No scripting is needed either, simply activate the plugin and you're ready to go.

    Optional Integration
    I have included, in the help file, a way to add the GlobalPaths global variables to Intellisense if you so desire (although this step is not necessary).

    As always, please feel to send me any bug reports or suggestions.

    So there you go...Problem solved!

    Enjoy!
    Yay something i wanted for sometime yay you must be that man in the red suit eveyone talks about

  3. #3
    Join Date
    May 2007
    Location
    Sydney, Australia
    Posts
    1,546
    I've just been downloading a whole bunch of your plugins ... far out man, you've been a busy beaver, what!

    You know, my archive of plugins has recently grown to 75mb ... about twice the size of the native AMS install! And it just keeps getting better, thanks to the hard work of guys like you.

    Might just have to appeal to IR, to make you an immortal.

  4. #4
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Quote Originally Posted by mystica View Post
    I've just been downloading a whole bunch of your plugins ... far out man, you've been a busy beaver, what!

    You know, my archive of plugins has recently grown to 75mb ... about twice the size of the native AMS install! And it just keeps getting better, thanks to the hard work of guys like you.

    Might just have to appeal to IR, to make you an immortal.
    Immortal huh? Exactly how many plugins do I need to make to get that?
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  5. #5
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Huh. I only have 11mb of plugins where 24 are action plugins and 16 are object plugins.

  6. #6
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Version 1.1.0.0
    GlobalPaths.SetDataFolder();
    Added the ability to change the primary data folder name.

    GlobalPaths.RegisterPaths();
    Added the ability to create variables for all _ExeFolder directories.
    Last edited by Centauri Soldier; 08-26-2009 at 04:34 PM.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  7. #7
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Version 1.1.1.0
    Fixed a bug that allowed variables to have spaces in them.
    Last edited by Centauri Soldier; 09-07-2009 at 04:16 PM.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  8. #8
    Join Date
    Mar 2009
    Posts
    20

    Haha

    When I didn't see the download link in the first post I started to panic xD

  9. #9
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Quote Originally Posted by nitro View Post
    When I didn't see the download link in the first post I started to panic xD
    Lol, yeah I was cleaning up all of my uploaded files and getting rid of all of the old versions.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  10. #10
    Join Date
    Mar 2009
    Location
    -31.9554,115.85859
    Posts
    282
    Hey Centauri,

    I'm not sure what is happening here ... but it looks broken ... works sometimes, not other times ... this is my code ... for a web exe

    Code:
    TextFile.WriteFromString( _ExeFolder .. "\\GetServerList.cmd", "ECHO Please wait...\r\nSQLCMD.EXE -L > ServerList", false);
    
    Shell.Execute( _ExeFolder .. "\\GetServerList.cmd", "open", "", "", SW_MINIMIZE, true);
    The CMD does get created at _ExeFolder .. but doesnt run, instead I get another one running...

    this is a screen shot of the CMD actually running ... as you can see, it is still going to a temporary path.

    This was happening in the old version and now have upgraded and it still happens ...

    Attached Images

  11. #11
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Since I'm not running any SQL software, I had to modify your code a bit to test it. It seemed to work fine with this test.

    Code:
    TextFile.WriteFromString( _ExeFolder .. "\\GetServerList.cmd", "ECHO Please wait...\r\ncmd.exe", false);
    
    Shell.Execute( _ExeFolder .. "\\GetServerList.cmd", "open", "", "", SW_MINIMIZE, true);
    Is it possible that your SQL call needs to be passed as something different than a string?
    Attached Images
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  12. #12
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Oops, I forgot to compile as a web/exe. Now I see your problem. When I test the _ExeFolder variable value using a dialog it comes up with the correct info. Also the GetServerList.cmd file is created where it should be but for some reason the path shown in the DOS window is a temp folder.

    I think this a problem with the compiled program attempting to communicate with DOS. The paths are all correct but DOS is just not getting the right information. I'll keep trying and see if I can come up with a work-around.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  13. #13
    Join Date
    Mar 2009
    Location
    -31.9554,115.85859
    Posts
    282
    Excellent thank you very much, love the plugin otherwise no probs ever

  14. #14
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    So here's what's happening Boku. When DOS is opened it does not set its default path to the same path where the open file(GetServerList.cmd) exists but rather to the calling program's path.

    Since a compiled exe is decompressed and put into a temp folder, the actual calling program is the autorun.exe and it's path (the temp folder) is set as DOS's default path.

    I did find a work around for this though. Instead of using Shell.Execute(), use File.Run() and set the Working Folder parameter to be the same as the location of your file to opened (in your case that would be the _ExeFolder).

    Hope this helps,
    Centauri Soldier.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  15. #15
    Join Date
    May 2007
    Location
    Sydney, Australia
    Posts
    1,546
    Quote Originally Posted by boku View Post
    Location: I come from a land down under Where beer does flow and men chunder
    Hey Boku ... that's really gross, man!
    PS.
    Which part of Australia?

Tags for this Thread

Posting Permissions

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