automation of tasks - dll

which scripting language/tool is best for automating a task?
I have an exe for which I don't know any of the list of functions used. if I know any of the functions used, then I thought I can try using those functions by referencing the exe/dll to VB or any other scripting language. I know that the exe is developed from Delphi.
Is there any way that I can automate the process.

I'm not sure what your question is here; what are you trying to automate exactly? Are you trying to call functions provided by a DLL, or are you trying to find out what functionality is actually exposed from the DLL. I'm not even sure you have a DLL, you mention a .exe most of the time...
Please refer to the guidelines and try to state your question more clearly, if I'm alone in not understanding your question then I'm sorry and I hope another more helpful SOer comes to your rescue!
EDIT: After helpful comments from OP, this question is, I believe, 'how can I automate interaction with a GUI?'
If this is a Windows GUI, then I would recommend using Python and the pyWinAuto package. This will allow you to accomplish quite a good range of basic to intermediate manipulation of a Windows GUI application. If that's not up your street, then this SO question has numerous other suggestions.
HTH

Related

Alternatives for Using MATLAB Files and Deploying Them into DLL's

I have some source code for the BaNa Noise Resilient Pitch Detection Algorithm downloaded here, and I am planning to use the code they provided as a library for a mobile app I'm making. It's written in Objective-C for MATLAB and so I'd probably need to deploy it to a DLL to be able to use it for external applications.
The only thing is that I'm a student, and I don't really have the funds to purchase MATLAB just to be able to work with this algorithm, and so I'm downloading Octave, which was a suggested alternative. This should be able to make working and editing the code for my research possible, but my concern is if I can deploy the code into usable libraries for the application in which I'm going to make using the Unity Game Engine.
I'm not sure if the direction I'm going at will bring me to a dead-end or not, so I'd like to ask for insights regarding this.
What I have now:
1) Source code in MATLAB (.m files)
2) Octave (currently downloading, I'm not even sure if it has the built-in methods I need)
What I plan to do:
1) Use Octave to edit code and test out if the code I have works
2) Deploy it to a DLL file (Is this even possible with Octave?)
3) Use that DLL in Unity3D
Would you guys have any suggestions, alternative workarounds, or foreseeable problems I may encounter with this? Any advice would be greatly appreciated.
Thank you in advance,
Justin
Depending on what functionality from MATLAB (and especially toolboxes), the code should run just fine in Octave, maybe with some minor modifications. If however, the code relies heavily on some toolbox functionality that has not been implemented in Octave, then you have a fair amount of recoding to do.
There is not easy way that I know of to generate a DLL from Octave. Having said that, have a look at How do I create a simple Octave distributable without installing Octave and this section of the Octave documentation on the subject of generating standalone programs from Octave, it might point you in the right direction.

Automation scripts: autoitscript vs ptfbpro

I try to use this 2 projects for primitive gui testing automation:
http://www.ptfbpro.com/
http://www.autoitscript.com/
And I can't make my choice.
Can somebody explain me: why(in 2 or 3 lines) he use one of them(or other please specify)?
I use AutoIt...
because it's free, well documented (not only) from inside of the Scite Editor and you can easily compile your script into a small executable or even create a complete GUI and there is a very good community in the forums and around here. And its Basic-Like Syntax is really easy to understand, there are functions and even a foreach-syntax, dynamic arrays and lots of additional functions from other users... There's good integration with other programming languages and from the use of so many WinAPI functions you lack of very little possibilities. It can automate IE usage without even displaying a browser window and send network packages, you can send Keystrokes like a user sitting in front of your screen and there's the AU3Record Tool which allows you to just record a Macro and replay it or save it as a script and then you can easily optimize it and edit it for your needs. Or use the AutoIt Window Info tool to see all the possible handlings for your application, you can interact with any kind of program output/display according to different algorithms you may invent.
Enough facts? ;-)
Go with Autoit3. It 's a lot more reliable, and you have a complete script language. Ptfbpro is only a tool (not free), nothing more. AUtoit3 has a lot of contributors that can help you in your process, Ptfbpro is dead.
If you want a script taht really do what you want, just go for AutoIt. Ptfbpro can't be used as a professional tool.
Autoit3 as well. You really can't beat it for being free and so easy to use.

Visual Basic Memory Info

Is there any way in visual basic to display any of this information about memory(like in the link below)?
Something like Module Name,Serial Number,Module Type,Memory Speed,Timings etc. ?
As Damien_The_Unbeliever stated your best bet would be to look at the Win32_PhysicalMemory WMI Class. You can experiment around WMI by downloading the WMI Code Creator from Microsoft, it will generate code in C#, VB.Net and VB script which you can run through the program and see what the results are.
I believe what you are asking is how to retrieve information about hardware components (namely main memory) using VB.
Please see this thread on VB forums on some example of accessing hardware information.
You might also be interested in this a bit more as it seems to cater to your needs a bit more.
Good luck.

VB6 Parser/Lexer/Scripter

I've got a game in VB6 and it works great and all, but I have been toying with the idea of creating a scripting engine. Ii'm thinking I'd like VB6 to read in flat text script files for me and then lex/parse/execute them.
I have good programming experience, and I've built a simple C compiler, as well as a LOGO emulator before.
My question is:
Are there any tools that I can use, like Lexx/Yakk/Bison to help me? How should I approach this problem in regards to lexing, parsing, and feeding the commands back to VB6 so I can handle them? Is this idea a BAD IDEA in the sense that there are too many obstacles in the way (For example, building minesweeper in assembly, though not impossible, is very difficult, and a bad idea.)?
Use the Microsoft® Windows® Script Control because it is easy to integrate into existing VB6 applications. The control supports VBScript, JScript, or any other "Active Script" implementation.
I have used the Windows Script Control in four projects and it works extremely well. Very easy to integrate. I wish Microsoft would have given us a replacement in .NET, and made it as easy to use. (I understand the control is not needed in .NET, but having the ability to simply create an object that handles everything is nice.)
Windows Script Control
The Microsoft® Windows® Script Control
is an ActiveX® control that provides
developers with an easy way to make
their applications scriptable. This,
in turn, enables users to extend
application functionality through
scripts, much as they do with macros
today.
INFO: Where to Obtain the Script Control at http://support.microsoft.com/kb/184739. Includes links to other howto support articles.
Chapter 13: Adding Scripting Support to Your Application at http://msdn.microsoft.com/en-us/library/aa227413(VS.60).aspx
Designing a Calculator at http://msdn.microsoft.com/en-us/library/aa227421(VS.60).aspx
How To Use Script Control Modules and Procedures Collections, Inserted from http://support.microsoft.com/kb/184745
How To Use the AddObject Method of the Script Control, Inserted from http://support.microsoft.com/kb/185697
SAMPLE: SCRIPTEX.EXE Uses the ScriptControl with Visual Basic, Inserted from http://support.microsoft.com/kb/189484
Windows Script Control can be downloaded at http://www.microsoft.com/downloads/details.aspx?familyid=d7e31492-2595-49e6-8c02-1426fec693ac&displaylang=en. (Supported Operating Systems: Windows 2000; Windows 98 Second Edition; Windows ME; Windows NT; Windows Server 2003; Windows XP)
MSDN Search of "MSScriptControl.ScriptControlClass" at http://social.msdn.microsoft.com/Search/en-US?query=%22MSScriptControl.ScriptControlClass%22&ac=8
MSDN Search of "Windows Script Control" at http://social.msdn.microsoft.com/Search/en-US?query=%22Windows+Script+Control%22&ac=8
MSDN Search of "MSSCRIPT" at http://social.msdn.microsoft.com/Search/en-US?query=MSSCRIPT&ac=8
Unless you're doing it for your own instruction, you may want to try using Lua: VB6 - Lua Integration
If you're willing to use VBScript rather than VB6 you might be able to just use the MSScriptControl to run the commands rather than creating your own. Here's an article discussing using it from a .Net app, though it's an ActiveX control so should give you quite a bit of flexibility.
The control can be downloaded from here.
I've actually seen some quite reasonable implementations of compilers/interpreters in VB6[1] - It's not the language I would choose (few functional features, insufficent static type system), but with experience, you can outweigh these drawbacks and be quite productive - So why not.
You can use the GOLD parser generator that supports VB6 as a start.
[1]: Somewhere on PSC or in this download repository I think ...
Note that there is the MSScriptControl too.
There also appears to be an additonal alternative for VB6:
SadScript is an variant of VB6 most prominently used for VB6 as an scripting engine in MMORPGS .
See here for more : What is sadscript? Can I use it in vb.net? Why hasn't anyone I have asked heard of it?

When should you start using an IDE when learning a language? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I didn't find a question on this while searching SO but if anyone does please tell me.
There are alot of questing on the pros and cons of IDE's and what IDE to use for this and that language, like "Why should I use an ide?" and "Are we too dependent on our IDE's?".
But as a beginner just starting to understand how to build GUI's with Swing and getting a grip on the workings of event handlers and whatnot I started to wonder, when should you actually start using an IDE to further productivity and not stifle the learning experience?
The intellisense function is really helpful but sometimes makes me feel lazy for not thinking that extra bit and looking things up in the book im reading or the api documentation.
However the ability to set flags in the code to step trough to find logical errors and actually go into the parent method are sometimes useful to get a better understanding about what goes on in the code.
I read somewhere that you should have a good grasp on the basics of a language before using the IDE, but what is the basics? And what is good?
The only downside to using an IDE would be using its tools and wizards and not understanding how the code they generate works. If you are using an IDE for code completion, syntax highlighting and debugging then that's great. If you are using it to generate GUIs that you can't build by hand or generate Web Service code that you don't know how it works, then that's bad. But that's bad regardless of whether you're a beginner or not.
Your instincts are right. Understand how things work and how to code things by hand before just trusting the tool blindly.
An IDE is a tool you should use from the start. Understanding how languages work is important but memorising every little detail, not so much. A builder would no more learn how to make a mud hut with his barehands before building something with power tools than you should learn to program without using an IDE.
That said, you should be aware of what the IDE is doing for you so that in circumstances where you are faced without one, you know the things you need to make up for. An IDE can't write good code for you, it can't even tell you how to write good code, or suggest good code, it can only supplement your own skillset (at least right now, in 2009 - I can't speak for our robot IDE overlords of 3452).
Don't start with an IDE. Here's why:
I learned Java using Notepad and the command line. If I needed to know what methods a particular class had, I looked at the APIs online.
I did that for about half of a semester. Then we switched to Eclipse.
Doing it that way, I became very familiar with the Java syntax, lots of the core libs, and how the Java 'compilation' and running process works.
People should never develop this way long term as it is terribly unproductive. But I feel it is the correct/best way to begin learning a language.
Don't start with an IDE.
I would suggest using an IDE right off the bat...but not worrying about most of the functionality. As you learn the language and become more familiar with processes, aspects of the IDE will suddenly become obvious at the right times.
I don't think you should get too hung up on delaying using an IDE. Let's face it, in the real world, you'll be using that IDE pretty much all the time.
When you're initially learning, I think the most important thing is to use the IDE, but know what it's doing.
For example, when Visual Studio.NET first came out, and I played with it and wrote my first "Hello World" app, then clicked the "green go button" (!), I watched the output window with all of it's information. I then looked at the help documentation to see that this is really just calling out to csc.exe and piping it's text output back into an IDE window. So I went off and started invoking csc.exe myself from the command line and saw it's parameters that it would accept. Then I jumped back into the IDE and saw how GUI checkboxes related to the csc.exe parameters.
This way, I started using the IDE straight away, but also learnt what the IDE is doing with regards to "shelling out" to command line based utilities.
From here, I even tried typing my first C# program in Notepad and compiling it from the command line. But I wouldn't get too hung up on it, though. Let's face it, in the "real world" you're very unlikely to need to do it. I was good to scratch the itch of my curiosity, though!
IDE saves you time and energy. I have no problem of using IDE even as beginner. It only helps.
If you know the ide well, it will help you explore a new language/technology that it supports.
If you don't know the ide, better don't use one at first. Use a simple text editor (notepad++ on windows), command line, and the official reference.
I think that you should be able to manually do anything that the Intellisense is doing for you automatically. For example, you should know what function you want to type before hitting Intellisense.
Well, if you're expirienced in other languages or just might have worked with them, then use IDE right away.
But for complete beginners, I wouldn't suggest it.
It doesn't have to be one or the other - try both. Life's short enough ;-)