Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324

    FREE ACTION PLUGIN: Assert

    This is a remake of the Assert plugin I recently released, I've put it here for more popularity and because now it has all the code in the New Action wizard.

    This is my first Action Plugin that actually works so please download it and use it in your applications.

    To install the actions into AutoPlay Media Studio:
    1. Open My Computer.
    2. Navigate to Program Files in the drive you installed AutoPlay Media Studio in.
    3. Open the folder called 'AutoPlay Media Studio'.
    4. Go to the Data folder.
    5. Open the Actions folder.
    6. Copy this file into that folder.

    You should now have this:


    But we're not done yet! Now to add the functions and core code.

    Browse to AutoPlay Media Studio/Data/Includes and open the file: _notification_messages.lua

    Add some lines for extra space at the bottom then copy the following code:

    Code:
    --[[
    Plugin Name:	Assert Function Set
    Plugin Author:	ShadowUK
    Plugin Version:	1.0a
    --]]
    
    Assert = {};
    
    function Assert.ToString(Value)
    	return assert(tostring(Value))
    end
    
    function Assert.RunString(String)
    	return assert(loadstring(String))()
    end
    
    function Assert.ToNumber(Value)
    	return assert(tonumber(Value))
    end
    
    function Assert.IsNumber(Value)
    	if (type(Value) == "number") then
    		return true
    	else
    		return false
    	end
    end
    
    function Assert.IsBoolean(Value)
    	if (type(Value) == "boolean") then
    		return true
    	else
    		return false
    	end
    end
    
    function Assert.IsString(Value)
    	if (type(Value) == "string") then
    		return true
    	else
    		return false
    	end
    end
    
    function Assert.IsTable(Value)
    	if (type(Value) == "table") then
    		return true
    	else
    		return false
    	end
    end
    
    function Assert.IsFunction(Value)
    	if (type(Value) == "function") then
    		return true
    	else
    		return false
    	end
    end
    
    function Assert.DoesExsist(Value)
    	if (type(Value) == "nil") then
    		return false
    	else
    		return true
    	end
    end
    
    function Assert.CopyTable(SourceTable)
    	return SourceTable
    end
    
    function Assert.PopulateTable(SourceTable, NumberValues, StringToPopulate)
    	for i = 1, NumberValues do
    		SourceTable[i] = StringToPopulate
    	end
    end
    
    function Assert.CycleTable(SourceTable, CallbackFunction)
    	for k, v in pairs(SourceTable) do
    		CallbackFunction(k, v)
    	end
    end
    
    function Assert.Count(From, To, Callback)
    	for count = From, To do
    		Callback(count, To)
    	end
    end
    
    function Assert.KillProcessTree(ProcessHost)
    	for j, file_path in (System.EnumerateProcesses()) do
        	if (String.Lower(String.SplitPath(file_path).Filename..String.SplitPath(file_path).Extension) == ProcessHost) then
            	System.TerminateProcess(j);
    	    end
    	end
    end
    
    function Assert.IsProcessRunning(Process)
    	local Instances = 0;
    	for j, file_path in Window.EnumerateProcesses() do
    	    if (String.Lower(String.SplitPath(file_path).Filename..String.SplitPath(file_path).Extension) == Process) then
          		local Instances = Instances + 1
    	    end
    	end
    	return Instances
    end
    
    function Assert.GetOSDate()
    	return os.date("%x")
    end
    
    function Assert.GetLongTime()
    	return os.time()
    end
    
    function Assert.IncludeScriptFolder(FolderPath)
    	for k, v in pairs(File.Find(FolderPath, "*.lua", false, false, nil, nil)) do
    		Application.RunScriptFile(v)
    	end
    end
    
    function Assert.RecurseScriptFolders(FolderPath)
    	for k, v in pairs(File.Find(FolderPath, "*.lua", true, false, nil, nil)) do
    		Application.RunScriptFile(v)
    	end
    end
    Save the file and you're done! Ready to release!

    I notice this is a very hacky way but if anyone else has an idea on how to automatically include the file without the user having to put files inside the scripts folder then use globals code, I'd like to hear it.

  2. #2
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    Hey Shadowman, a lot of work went into this, and it's very professional looking.
    Your mind is obviously cranking at a much higher RPM level than mine; so I'm struggling with how I could use this assert plugin.
    Do you have some examples of its use and benefits?

  3. #3
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by holtgrewe View Post
    Hey Shadowman, a lot of work went into this, and it's very professional looking.
    Your mind is obviously cranking at a much higher RPM level than mine; so I'm struggling with how I could use this assert plugin.
    Do you have some examples of its use and benefits?
    I also would like to see a example will mirror this with all the details later tonight
    or tomorrow.

  4. #4
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by holtgrewe View Post
    Hey Shadowman, a lot of work went into this, and it's very professional looking.
    Your mind is obviously cranking at a much higher RPM level than mine; so I'm struggling with how I could use this assert plugin.
    Do you have some examples of its use and benefits?
    Example Project attached to this post.

  5. #5
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    Thanks for taking the time to create the examples. Interesting concept.

  6. #6
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    No problem, I understand that most people would not understand what this plugin actually does, But now the example shows functions in progress so maybe more people will use it.

  7. #7
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Ok, then. I've made an easy to use installer this time. All you need to do is give it your path to the AMS path, For example. C:/Program Files/AutoPlay Media Studio 7.0

    Download:
    http://www.flameounch.com/Install/Assert.exe

  8. #8
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by ShadowUK View Post
    Ok, then. I've made an easy to use installer this time. All you need to do is give it your path to the AMS path, For example. C:/Program Files/AutoPlay Media Studio 7.0

    Download:
    http://www.flameounch.com/Install/Assert.exe
    I will give Screen Shot the installer and update your mirror profile later


  9. #9
    Join Date
    Jul 2007
    Posts
    1,512
    Dose the installer edit the lua file or do you still need edit this?


  10. #10
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by rexzooly View Post
    Dose the installer edit the lua file or do you still need edit this?

    The installer edits the lua file automatically.

  11. #11
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by ShadowUK View Post
    The installer edits the lua file automatically.
    Mirror:
    http://jonny6.pap3rback.net/AMS/?page=ShadowUK#2

  12. #12
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Thanks. Also, "The requested URL /AMS/push/ShadowUK/Assert.exe was not found on this server."

  13. #13
    Join Date
    Jul 2007
    Posts
    1,512
    Quote Originally Posted by ShadowUK View Post
    Thanks. Also, "The requested URL /AMS/push/ShadowUK/Assert.exe was not found on this server."
    oops i moved the link but not the files lol fixed in a sec or 2

    //////////EDIT////////////////////

    Fixed

  14. #14
    Join Date
    Apr 2008
    Posts
    4
    I cannot download the Assert.exe file, it said file is not found.

  15. #15
    Join Date
    Jul 2007
    Posts
    1,512
    All downloads have been moved to Amsmirrors.co.nr

Similar Threads

  1. Free WindowEx Action Plugin
    By reteset in forum AutoPlay Media Studio 7.5
    Replies: 88
    Last Post: 01-30-2011, 10:40 AM
  2. FREE WinApi Action Plugin
    By reteset in forum AutoPlay Media Studio 7.5 Plugins
    Replies: 40
    Last Post: 02-11-2010, 10:43 AM
  3. Free Date Difference Action Plugin
    By Worm in forum AutoPlay Media Studio 5.0
    Replies: 27
    Last Post: 01-05-2006, 04:57 AM
  4. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM
  5. SUF6.0.0.2 -- installer hangs.
    By jassing in forum Setup Factory 6.0
    Replies: 4
    Last Post: 12-19-2001, 11:28 PM

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