Andromo - Start Making Apps - Free Signup

Announcement

Collapse
No announcement yet.

Is this possible with AMS?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is this possible with AMS?

    Hi, I am building a loader that starts an Access Database, I want to make sure that it doesn't open twice so on the preload I want to add the command...

    FindAndCloseProcessByName("MSACCESS.EXE");

    Which closes any running instances of Access.

    This works in Set Up Factory, and at a push I could use that as the loader, but I want to personalise it a little more, hence me wanting to use AMS

    Any help appreciated.

  • #2
    Look into

    System.EnumerateProcesses

    and

    System.TerminateProcess

    The help file has some great example code, so I won't bore you with that.

    Comment


    • #3
      Yay! that's the fella!

      Many thanks for the pointer.

      For others benefit I had to change Lower to Upper as MSACCESS.EXE is upper case

      code works a treat...

      instances_of_file = 0;
      file_to_check_for = "MSACCESS.EXE"; --have all uppercase
      processes = System.EnumerateProcesses();

      for j, file_path in processes do
      file = String.SplitPath(file_path);
      if (String.Upper(file.Filename..file.Extension)) == file_to_check_for then
      System.TerminateProcess(j);
      end
      end

      Thank very much Worm, very much appreciated.
      Cheers
      Drew

      Comment


      • #4
        Is FindAndCloseProcessByName() a built in function in setup factory? You can build the same function in AMS if it is. It would make a cool function.

        Tigg
        TJ-Tigger
        "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
        "Draco dormiens nunquam titillandus."
        Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

        Comment


        • #5
          glad you were able to work it out.

          Thanks for posting your code for others, that's what makes this forum such a cool place to hang out. :yes

          Comment


          • #6
            Now I'm getting giddy with all these things I can do, I'm starting to be adventurous...

            I currently have it so that this Access file loader, displays system date and time, plus operating system (Just because I can ) What I would now like to do is say to user "are thes details correct?" if not click Here and it opens the Default windows Date and Time Properties window.

            Is this possible? and is it a Shell command?

            Cheers
            Drew

            Comment


            • #7
              In a small way AutoPlay Media Studio has finally reached that hallowed status of classic apps like Photoshop and Flash in that new users have a "transformation" (as Photoshop guru Ben Willmore refers to it) when they realize all the things they can do with it. I feel it too. I wish there were 36 hours in each day so that I could spend 12 of them just using AutoPlay Media Studio to build all the stuff in my head. :yes

              Comment


              • #8
                Originally posted by Corey
                I wish there were 36 hours in each day so that I could spend 12 of them just using AutoPlay Media Studio to build all the stuff in my head. :yes
                You and me both, Corey. I don't know if 36 would be enough, but it would be a start....
                Yossi

                Comment

                Working...
                X