Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 23
  1. #1
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231

    Lightbulb Free Plugin : Script Plugin

    Hi All.
    We Released a new plugin.

    with this plugin you able execute VBScript and JScript from into and out of AMS and get result that beforehand execute in Plugin.

    Enjoy It!


    Download

    Help

    Forum

    Please Reply
    Attached Files

  2. #2
    Join Date
    Feb 2008
    Location
    Western Pennsylvania
    Posts
    555

    Wink Nice of you!

    Very nice of you to put out yet another FREE plug-in!!

    Thank You. I don't know coding much but I'm learning, so I'm sure I'll get to use it someday..

    Thanks again!

  3. #3
    Join Date
    Apr 2004
    Location
    Vancouver, Canada
    Posts
    1,790
    Works really well on XP but it crashes the app when it loads on Vista. This is a very powerful tool so if you can get it to run on Vista, that would be great.
    Dermot

    I am so out of here

  4. #4
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231
    Quote Originally Posted by JDog37 View Post
    Very nice of you to put out yet another FREE plug-in!!

    Thank You. I don't know coding much but I'm learning, so I'm sure I'll get to use it someday..

    Thanks again!
    Hi JDog37 Thanks,
    This is a good plugin but you must know programing in VBScript Or JScript.

    For Example Whit this smidgen code you can get Hard information :

    Code:
    code =[[
    Set objWMIService = GetObject("winmgmts:\\.\root\CIMV2") 
    Set colItems = objWMIService.ExecQuery( _
        "SELECT * FROM Win32_DiskDrive",,48)
    For Each objItem in colItems
        hardinfo = "BytesPerSector: " & objItem.BytesPerSector & vbCRLF &_
        		"Caption: " & objItem.Caption & vbCRLF &_
        		"Description: " & objItem.Description & vbCRLF &_
        		"DeviceID: " & objItem.DeviceID & vbCRLF&_
        		"Index: " & objItem.Index & vbCRLF&_
        		"InterfaceType: " & objItem.InterfaceType & vbCRLF&_
        		"Manufacturer: " & objItem.Manufacturer & vbCRLF&_
        		"MediaLoaded: " & objItem.MediaLoaded & vbCRLF&_
        		"MediaType: " & objItem.MediaType & vbCRLF&_
        		"Model: " & objItem.Model & vbCRLF&_
        		"Name: " & objItem.Name & vbCRLF&_
        		"Partitions: " & objItem.Partitions & vbCRLF&_
        		"SectorsPerTrack: " & objItem.SectorsPerTrack & vbCRLF&_
        		"Signature: " & objItem.Signature & vbCRLF&_
        		"Size: " & objItem.Size & vbCRLF&_
        		"TotalCylinders: " & objItem.TotalCylinders & vbCRLF&_
        		"TotalHeads: " & objItem.TotalHeads & vbCRLF&_
        		"TotalSectors: " & objItem.TotalSectors & vbCRLF&_
        		"TotalTracks: " & objItem.TotalTracks & vbCRLF&_
        		"TracksPerCylinder: " & objItem.TracksPerCylinder
    Next
    ]]
    
    Script.SetLanguage(Script_VBScript);
    Script.AddCode(code, Script_InternalCode);
    hardinfo = Script.GetResultAsString("hardinfo");
    Dialog.Message("", hardinfo)

  5. #5
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231

    Thanks

    Quote Originally Posted by Dermot View Post
    Works really well on XP but it crashes the app when it loads on Vista. This is a very powerful tool so if you can get it to run on Vista, that would be great.
    Hi Dermot,
    Thanks for report on Vista, we must work on it to work on vista and we want add some new functions.

  6. #6
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231

    Help

    For Create Code in VBScript this tool can come handy :

    Best Regards,
    AMSWaves.
    Attached Files

  7. #7
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    THANKS!!!

    This is an awesome plugin.

    One question.

    How would I go about passing a variable into the code section?

    Possibily using Wscript.Arguments...
    Last edited by mwreyf1; 09-23-2008 at 01:33 PM.

  8. #8
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231
    Quote Originally Posted by mwreyf1 View Post
    How would I go about passing a variable into the code section?
    code section is a string you can use a (..) to add variables into code section.

    For example :
    Code:
    code =[[
    Function Addition(arg1, arg2)
       Addition = arg1+arg2
    End Function
    
    result = Addition(]].."1234, 4321"..[[)
    ]]
    
    Script.SetLanguage(Script_VBScript);
    Script.AddCode(code, Script_InternalCode);
    result = Script.GetResultAsLong("result");
    Dialog.Message("Notice", result);
    Quote Originally Posted by mwreyf1 View Post
    Possibily using Wscript.Arguments...
    Wscript.Arguments in this plugin never Possible because this plugin never convert your AMS app to a vbs (VBScript) file this plugin just execute your VBScript or JScript code but if you want use Wscript.Arguments in app you can use _CommandLineArgs For Example :

    Code:
    if _CommandLineArgs[1] ~= nil then
    	arg = "Dim Arg("..(Table.Count(_CommandLineArgs)-1)..")\r\n"
    	for num = 1, Table.Count(_CommandLineArgs) do
    		arg = arg.."Arg("..(num-1)..") = \"".._CommandLineArgs[num].."\"\r\n"
    	end
    end
    Use this code into On Startup, this code get your CommandLineArgs and then convert it into a array (In VBScript language), then you can append it with your code section and use it on VBScript code.

  9. #9
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    I'm not sure if that is what I need.

    Here is an example based off of your code.

    How would you go about asking the end user at runtime what number he/she wants to add to arg1 ("1234") and get the correct response?

    TIA
    Attached Files

  10. #10
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231
    Quote Originally Posted by mwreyf1 View Post
    I'm not sure if that is what I need.

    Here is an example based off of your code.

    How would you go about asking the end user at runtime what number he/she wants to add to arg1 ("1234") and get the correct response?

    TIA
    HI mwreyf1,
    AMOUNT2ADD is a Variable but you in line 12 add it as String
    Code:
    	End Function
    	
    	result = Addition(]].."1234, AMOUNT2ADD"..[[)
    	]]
    if you use Dialog.Message("Notice", code); in end of your code you can see whats wrong.

    error.png

    change line 12 from :

    Code:
    	result = Addition(]].."1234, AMOUNT2ADD"..[[)
    to :

    Code:
    	result = Addition(]].."1234, "..AMOUNT2ADD..[[)
    for correcting your code every time use a debugger like Dialog.Message("Notice", code); then you can see your code and correct it.


    Best Regards,
    AMSWaves.
    Last edited by AMSWaves; 09-25-2008 at 08:27 AM. Reason: Some Info

  11. #11
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    Thanks for your help.

    Working great now.

    This is a GREAT plugin.

    It adds so many possibilities to AMS.

    As far as I'm concerned this is the BEST plugin you guys have done to date.

    Thanks, again.

  12. #12
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231
    Quote Originally Posted by mwreyf1 View Post

    Thanks for your help.

    Working great now.

    This is a GREAT plugin.

    It adds so many possibilities to AMS
    Thanks,
    Yea, with this plugin you can add very possibilities to AMS.
    For Examp with this code you can get name of all files on a folder :

    Code:
    function DelimitedStringToTable(DelimitedString, Delimiter)
    	tbReturn = {};
    	local strWorking;
    	local nPos = nil;
    	local strData;
    	local nTableIndex = 1;
    	local nDelimiterLength = String.Length(Delimiter);
    	
    	if(nDelimiterLength < 1)then
    		tbReturn[nTableIndex] = DelimitedString;
    		return tbReturn;
    	end
    	
    	strWorking = DelimitedString;
    	nPos = String.Find(strWorking,Delimiter);
    	while(nPos ~= -1)do
    		strData = String.Left(strWorking,nPos-1);
    		tbReturn[nTableIndex] = strData;
    		nTableIndex = nTableIndex + 1;
    		local nLength = String.Length(strWorking);
    		strWorking = String.Right(strWorking,nLength - (nPos + (nDelimiterLength-1)));
    		nPos = String.Find(strWorking,Delimiter);
    	end
    	if(strWorking ~= "")then
    		tbReturn[nTableIndex] = strWorking;
    	end
    	
    	return tbReturn;
    end
    
    code =[[
    Function ShowFolderList(folderspec)
       Dim fso, f, f1, fc, s
       Set fso = CreateObject("Scripting.FileSystemObject")
       Set f = fso.GetFolder(folderspec)
       Set fc = f.Files
       For Each f1 in fc
          s = s & f1.name & "|"
       Next
       ShowFolderList = Left(s, Len(s)-1)
    End Function
    
    files = ShowFolderList("C:\Program Files\AutoPlay Media Studio 7.0")
    ]]
    
    Script.SetLanguage(Script_VBScript);
    Script.AddCode(code, Script_InternalCode);
    files = DelimitedStringToTable(Script.GetResultAsString("files"), "|")
    Debug.ShowWindow(true)
    for a,b in files do
    	Debug.Print(b.."\r\n")
    end
    Last edited by AMSWaves; 09-25-2008 at 08:41 AM.

  13. #13
    Join Date
    Jun 2008
    Location
    AMSWaves
    Posts
    231
    Quote Originally Posted by mwreyf1 View Post
    As far as I'm concerned this is the BEST plugin you guys have done to date.
    when we create this plugin we thinked this is a very very good plugin and we thinked this have very votary, but this plugin dont have many votary, we dont know why ?

  14. #14
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    I do a LOT of network related stuff where I work and I have always had to call .vbs files externally with commandargs. Now I can use that code inside of AMS.

    AWESOME !!!

    I am surprised more people haven't jumped all over this.

    You don't really have to know .vbs code. There is a .vbs already written to do just about anything one could imagine.

  15. #15
    Join Date
    May 2006
    Posts
    1,443
    really good job
    this plugin adds a sub language support to AMS

    i am wondering .
    which language did you use

    why i am asking this:


    i am looking in to resource section of all DLL's which i found/got
    but i seen nothing except Version Rc. in your plugin
    it is one thing that i am in interest

    i am working on a runtime engine for an advanced project
    i tried something for merge a resource in to a PE (it is OK)
    but i could not make a well procedure for read/extract them

    simply , i need help with : adding a resource to a PE but not into default resource section

    i think your plugin works well with hidden resources

    have you a suggestion for make it

    thank you

Similar Threads

  1. Best way to share custom buttons with the group?
    By mwreyf1 in forum AutoPlay Media Studio 6.0
    Replies: 10
    Last Post: 04-28-2010, 01:29 PM
  2. FREE: UserMgmt Action Plugin
    By TimeSurfer in forum AutoPlay Media Studio 7.5
    Replies: 3
    Last Post: 04-11-2010, 09:21 PM
  3. FREE : Timer Object Plugin
    By reteset in forum AutoPlay Media Studio 7.5 Plugins
    Replies: 29
    Last Post: 04-23-2009, 07:00 AM
  4. Free PDF Object Plugin
    By reteset in forum AutoPlay Media Studio 7.5
    Replies: 24
    Last Post: 10-23-2008, 01:47 PM
  5. Free Plugin: Media Player Object
    By Ted Sullivan in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 09-24-2004, 02:54 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