Professional Software Development Tools
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!
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
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)
For Create Code in VBScript this tool can come handy :
Best Regards,
AMSWaves.
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.
code section is a string you can use a (..) to add variables into code section.
For example :
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: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);
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.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
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
if you use Dialog.Message("Notice", code); in end of your code you can see whats wrong.Code:End Function result = Addition(]].."1234, AMOUNT2ADD"..[[) ]]
error.png
change line 12 from :
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.Code:result = Addition(]].."1234, "..AMOUNT2ADD..[[)
Best Regards,
AMSWaves.
Last edited by AMSWaves; 09-25-2008 at 08:27 AM. Reason: Some Info
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.
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.
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.
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