 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
AHKnow
Joined: 03 Jul 2004 Posts: 118
|
Posted: Thu Dec 16, 2004 9:13 am Post subject: Wish AutoHotKey could do DLL CALLS... & other programs |
|
|
I think this is when AutoHotKey switches over to the "big time".
When will DLL calls be out? Would love this.
Thanks for working on this great program.
Last edited by AHKnow on Fri Jan 21, 2005 10:54 am; edited 2 times in total |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Thu Dec 16, 2004 3:20 pm Post subject: |
|
|
| I think someone mentioned that NSIS has this feature. However, it seems like something that wouldn't be used in a typical script, so right now I'm focusing on things like RegEx, complex expressions, and passing parameters to subroutines. |
|
| Back to top |
|
 |
AHKnow
Joined: 03 Jul 2004 Posts: 118
|
Posted: Wed Jan 12, 2005 2:48 pm Post subject: |
|
|
| Chris wrote: | | I think someone mentioned that NSIS has this feature. However, it seems like something that wouldn't be used in a typical script, so right now I'm focusing on things like RegEx, complex expressions, and passing parameters to subroutines. |
I believe a better tool is Autorun Pascal Builder at http://www.muralexandru.as.ro/ You have to see and use this thing to believe it. Now don't get me wrong, NSIS is nice, but Autorun Pascal Builder is awesome too. Somethings it can do and has:
. Uses Pascal Script 3. A very powerful scripting language that can do about 75% to 80% of what Pascal does. Why is that important? Hold on...
. It can call DLLs
. It can do COM/OLE
. It can EMBED AutoHotKey .exes or any other type of executables into its executable or the reverse can be done where the users does a AutoHotKey include of the compiled Pascal Script exe (calling DLLs, doing COM, etc...)
Note- The maker of Autorun Pascal Builder explains how to use Pascal Script in his help files. So download and then read those.
. Interestingly, AutoHotKey's implementation of its GUI is not that far removed from how Pascal does things. I think the learning curve to jump between Autorun Pascal Builder methods and using wonderful AutoHotKey tools like SmartGUI is not that big.
. By using Pascal Script in Autorun Pascal Builder the user will learn alot about Pascal... Therefore making the jump to using Pascal to building DLLS is a smaller one. Speaking of building DLLS...
Now even more interesting there is another Pascal Editor that is very similar to Autorun Pascal Builder called LAZARUS.
Lazarus info:
Official: http://sourceforge.net/projects/lazarus/
Tutorials: http://lazarus-ccr.sourceforge.net
Lazarus is rapidly becoming a free opensource IDE/RAD (Rapid Application Development) tool the equal of Delphi. Now it gets even better. Lazarus uses the freeware pascal compiler called Free Pascal. Free Pascal also has a inline assembler, so you could even mix the assembly computer language with Pascal.
So...
1. AutoHotKey for automation, easy script building, easy GUI building (thanks also to SmartGui... that window duplicator is great too).
2. AutoHotKey can be used with Autorun Pascal Builder for calling DLLs and doing COM/OLE.
3. Lazarus, using the Free Pascal compiler, can be used to MAKE DLLs and even get real crazy and program in Assembly. You also just have to check out Lazarus's compiler options too (sweet).
Awesome stuff. But I do wish that at some point AutoHotKey can call DLLs. Combined with its nice GUI features that would be "sweet" too.
Note- Nice tutorial on Pascal is at http://www.marcocantu.com/epascal/English/default.htm (website has a download of the book too... http://www.marcocantu.com/epascal/default.htm ) |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1718
|
Posted: Wed Jan 12, 2005 3:22 pm Post subject: |
|
|
can BoBo come up with some cmd line util to use DLL calls? now this i know is a tough one! _________________
 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Jan 12, 2005 5:52 pm Post subject: |
|
|
| AHKnow wrote: | . It can call DLLs
. It can do COM/OLE
. It can EMBED AutoHotKey .exes or any other type of executables into its executable or the reverse can be done where the users does a AutoHotKey include of the compiled Pascal Script exe (calling DLLs, doing COM, etc...)
...I do wish that at some point AutoHotKey can call DLLs. Combined with its nice GUI features that would be "sweet" too. |
Thanks for the info. I'll look into it for a future version. |
|
| Back to top |
|
 |
AHKnow
Joined: 03 Jul 2004 Posts: 118
|
Posted: Sun Jan 16, 2005 8:16 am Post subject: |
|
|
Thanks Chris.
Many scripting languages, like VBScript, Jscript, WinBatch, Pascal Script, KIXTart(4.5 version is coming), etc... can call DLLs and do COM/OLE. I think such features will make automation/scripting languages like AutoHotKey more complete and something newbies and part-time programmers can rely on as they advance in programming skills.
Beyond just the "lower level power" of a computer language I have noticed that their are some essential practical features that would be important to power users, network administrators, etc....
. Automation and windows manipulation (includes GUI frontend for scripts).
. COM/OLE- The ability to manipulate and automate Excel spreadsheets, Outlook forms, MS Office products, etc..., via its INTERNAL language is huge for many users.
Note- the power to access and create COM objects should not underestimated.
. DLL calling. This allows scripts to interact with DLLs created by other applications like C++, Pascal, etc.... There are so many DLLs that can do so many things that your options become almost unlimited.
The 3 areas work together and arguably should not be seen as separate from each other. but closely related. They give the user the power to create programs to harness the power of the operating system, other applications, and MS Office apps.
Like I have mentioned, pretty much everything has been done or can be done with lower level languages like Assembly, C++, Pascal, etc... The point though, is to make doing such things EASIER and more EFFICIENT. Instead of taking hours and hours or thousands of lines of code in Assembly or C++ it is nice to do things very quickly and in less code in AutoHotKey and related autmation/scripting languages.
That's where I see AutoHotKey, WinBatch, KIXtart, VBScript, etc.... making their entrance and improving the situation for regular users that are not experienced or professional programmers.
It is nice to use high level programs like AutoHotKey as a framework to combine other programming languages to do useful thing and if possible use it to accomplish various computer tasks.
Please, keep up the great work. |
|
| Back to top |
|
 |
AHKnow
Joined: 03 Jul 2004 Posts: 118
|
Posted: Sun Jan 16, 2005 9:52 am Post subject: MediaBASIC, Euphoria, and IBasic |
|
|
Stand by.... This thing, MediaBasic, has some potential.
I mentioned, Autorun Pascal Builder and Lazarus, which are both IDEs that let build apps that can call DLLs, do OLE/COM automation, and build DLLs (which is the case for Lazarus). Well add this program to your list... MediaBasic.
MediaBasic:
. Call Dlls
. Do OLE/COM automation
. COMPILE VBScripts into executables. That's right, you've seen it right. I have tested this feature many times and this opens up all kinds of possibilities. 1 suck thing about VBScripts was cscript and the whole WSH crap. MediaBasic's language syntax can be seen as a Superset of VBScript's syntax. Therefore commands that work in VBSscript, work in MediaBASIC at around 90%-95% plus compatibility.
Note- There is also a lot of information and tools out their for VBScript, so off the bat, this thing can do a lot. Well once they get it closer to the official release which is taking those guys like forever.
. MediaBasic's forms/GUI builder is quite close to Delphi (Object Pascal). This is a very pleasing blend. Furthermore, this puts MediaBasic in the same ballpark as Autorun Pascal Builder and Lazarus. But, on the other side of the same ballpark since it is using Visual Basic/Basic type syntax ( a little yuck, but MediaBasic is an acceptable IDE).
. MediaBasic's next step is DLL creation and all those "lower level" functions. That would make MediaBasic "sweet".
Note- Lazarus, Object Pascal, and with the Free Pascal compiler that is cross platform and can make apps for Linux has the advantage of course. But, VBScript, VBA (Visual Basic for Applications), and VB has such a large following and Micro$oft that you can't ignore that.
Keep an eye on those MediaBasic guys.
Links:
MediaBASIC- http://www.uolang.org/mediabasic/#forums
VBScript tutorial http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vbstutor.asp
Edit:
IBasic
A program that is very much worth mentioning is IBasic. Sadly, IBasic is payware, but its cheap (there is a $40 dollar and $70 dollar version). Oddly, for payware, there are a number of users (I'll post links) that make free tools and so forth for IBasic. So while IBasic is payware, there are some great freeware goodies. No other payware Visual Basic wannabe clone program that I have checked out (trust me I checked out dozens of compilers & IDEs) matches this baby in terms of price, functionality, and "Ease of Use".
IBasic can- call DLLs, MAKE DLLs, and do some OLE/COM automation. There are also 3rd party freeware tools for it.
I mention IBasic, because if you are a newbie or part-time programmer that is looking for something easy to use and to supplement your automation/scripting for things it can not do (yet) than this is a no-nonsense program that can do what it claims. Its not "vapor-ware" that might happen or something so complex that you need a degree in computer science, but a proven and ready to use program that is ready now.
http://www.pyxia.com/ (IBasic)
http://www.ccserve.net/tibi/index.php (IBasic Insider)
http://www.michaelhartlef.de/html/features.html IndeED, nice editor/IDE for IBasic, HotBasic (checked it out, but not impressed yet...maybe 1 day), VBScript. I suggest using IndeED, if you use IBasic because it has lots of user friendly features and as freeware you have more control to make changes to it.
Euphoria ( http://www.rapideuphoria.com/v20.htm )
Another heavy hitter program that is worth looking at is Euphoria. I'm just amazed at this program. It is a very high powered program that can do COM/OLE, call DLLs, create DLLs, etc... It also works on Linux and other OS platforms.
Interestingly it is structured not too differerntly from a scripting language since it is an interpreted programming language. But, your "programs" like AutoHotKey scripts can be "bound" to the Euphoria exe. Even BETTER they have an Euphoria to C translator (something that AutoHotKey and AutoIT should look at). Euphoria programs can be decompiled to C and then if you have any one of several freeware C compilers on your computer it will make a .bat file for you to automatically recompile the Euphoria program. THUS, the Euphoria program runs as fast as any C program. This technique is also wonderful if you are studying computer languages like C/C++.
The bad news is that the binder, Euphoria to C translator, or source code cost money. The good news is the cost is cheap. There is also some major freeware developed for the Euphoria program. So, there are lots of options and room to grow. Interestingly now that they allow people to buy the source code, I would not be surprised if Euphoria starts to fork and their are completely free versions of it, but you will have to research their license to double-check.
I'm so impressed by the Euphoria programming language that I will make it the focus of programming studies for some time to come. A word for newbies:
1. Use the Enhanced IDE by Judith Evans and the various modified EXEs for it.
2. If you are using Windows NT/2000/XP than you may have to modify your environmental variables to something like EUINC (variable name) = C:\EUPHORIA;C:\EUPHORIA\INCLUDE\WIN32LIB (variable value) Note- if you search the archives there is a tool to do this automatically.
3. Many Euphoria tools need to have their files placed in the Euphoria\include folder before they will run.
If you are looking for a very good program to supplement AutoHotKey, but don't want the complexity or not ready for C/C++ than this is it. This program is easier than Basic or Pascal (but Object Pascal is close). Also since they often compare Euphoria to C/C++ you will learn a bit about C and the Euphoria developers are so bold and confident about Euphoria that they feel strongly that C/C++ programmers should SWITCH to Euphoria. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|