AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AutoHotKey.NET
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
AHKnow



Joined: 03 Jul 2004
Posts: 118

PostPosted: Sun Aug 21, 2005 8:28 pm    Post subject: AutoHotKey.NET Reply with quote

AutoHotKey.NET? Yeah, maybe this should be done. Now before people start jumping on the anti-Microsoft wagon, read some more first.

1. Microsoft has standardized C# and their Common Language Infrastructure (CIL) with the EMCA. This means that this aspect of .NET is an international standard, just like C or C++. Even Java, despite its popularity, is not accepted as widely as an international standard (this is also partially due to Sun's insanity, which has really hurt Java). Also, I think Microsoft is really going to "stick it to Sun and Java", by bashing it over the head with .NET.

The future of .NET languages is mostly assured. As a result many companies and organizations are going to create programs and products that adhere to this standard.

2. Projects like Mono ( http://www.mono-project.com/Screenshots ) and DotGNU ( http://www.dotgnu.org/ ) have created freeware alternatives to Microsoft's .NET framework (based on the EMCA/ISO standards) and allow .NET programs to run on LINUX and MACs.

This would also mean that AutoHotKey.NET could run on Linux and Macs too.

3. AutoHotKey as a .NET would increase developers and tools for the language. A person that knows VB.NET, Lisp.NET ( http://www.lsharp.org/ ), Forth.NET ( http://www.dataman.ro/dforth/ ), Perl.NET, Jscript.NET ( http://www.gotdotnet.com/team/jscript/ ), etc.. can all be potential developers for AutoHotKey.

For those that are not familiar with .NET... In a nutshell all .NET languages get "broken down" to MSIL/CIL (Intermediate Language). C#/VB.NET/AutoHotKey.NET > MSIL/CIL > .exe Therefore all .NET languages have a common language among them. With .NET what language you choose is more about your personal preference, than it is about power or performance.

More on MSIL/CIL:

http://www.codeguru.com/Csharp/.NET/net_general/il/article.php/c4635/

http://weblogs.asp.net/kennykerr/category/7140.aspx


4. AutoHotKey.NET would have advantages as a way easier to understand programming language that could possibly make programs faster, in addition to its automation/macro-recording functionality.

P.S. links to free C# tools for those that are interested...:

SharpDevelp IDE for .NET (C#, VB.NET... free and with source...), an alternative to Visual Studio.
http://www.icsharpcode.net/OpenSource/SD/

CS-Script ( C#... free and with source... )
http://www.members.optusnet.com.au/~olegshilo/index.html

CSI ( C# interpreter... free and with source... )
http://www.codeproject.com/csharp/csi.asp

EDIT:

C# Tutorials (from many different sources)


http://www.programmingtutorials.com/csharp.aspx


What do you guys think about this?


Last edited by AHKnow on Mon Aug 22, 2005 2:01 am; edited 1 time in total
Back to top
View user's profile Send private message
Guest






PostPosted: Sun Aug 21, 2005 9:38 pm    Post subject: Reply with quote

And for all those that do not want to install the .Net Framework? Not to mention the need for keeping up to date with new releases.
Back to top
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sun Aug 21, 2005 11:01 pm    Post subject: Reply with quote

Thanks for the very informative post. It's an introduction at the highest possible level. This is something often hard to find when you search the web, though it's usually easy to find something obviously biased, such as from Microsoft itself. But now that Wikipedia has emerged, maybe we'll be able to spend less time searching and more time learning. Incidentally, here is Wikipedia's entry for Dot Net.

I'll have more of an open mind toward Dot Net in the future. However, creating a .Net version of AutoHotkey would likely be hindered if .Net lacks support for the low-level OS features used to support hotstrings and custom hotkeys, among other things.
Back to top
View user's profile Send private message Send e-mail
Nemroth



Joined: 07 Sep 2004
Posts: 262
Location: France

PostPosted: Mon Aug 22, 2005 5:40 pm    Post subject: Reply with quote

Anonymous wrote:
And for all those that do not want to install the .Net Framework? Not to mention the need for keeping up to date with new releases.

Perfectly agree.
I saw some forums topics in different forums about AHK and .Net (integration of CS-Script, etc...). It seems that AHKnow likes .Net very much...
As far as I know, it's an additional software layer above the Windows API witch contains functions/procedures witch simplify the use of the API by calling one or more API functions/procedures with a single call of a .Net function/procedure.
So it is "easier" to programm with .Net than to programm directly with the APIs
But I read that .Net programs are slowler than "APIs" ones (I think it's true but I didn't try), as the program call a procedure/function of the .Net framwork witch in turns call one or more procedure(s)/function(s) of the API, and the returned results take the same way...
In an heavy app (spreadsheet, ...), may be this isn't very important, but may be it is very important in an app so near of the system like AHK.
And above all, I'm agree : if I don't want to use the framework ? I want to use AHK but I don't see why I should be obliged to use .Net.
Back to top
View user's profile Send private message
AHKnow



Joined: 03 Jul 2004
Posts: 118

PostPosted: Tue Aug 23, 2005 10:22 am    Post subject: Reply with quote

There is no stopping .NET We can't turn back the clock.

The next version of Windows will be making greater use of it and the Mono and DotGNU clones for the .NET framework are well on there way for Linux and MACs. You also have a modified .NET framework for Pocket PCs too.

Microsoft has also been pushing their Visual Studio product to adapt to .NET as well via C++.NET in addition to C# and VB.NET. Also, numerous other program languages are modifiying themselves to work with .NET

AutoHotkey can get ahead of the coming "wave".

I think CS-Script (C# script) might be a way for AutoHotkey to get the best of "both worlds", short of a conversion to an AutoHotkey.NET. A "add-on" language of AutoHotkey might be created and/or an alternate AutoHotKey compiler. This opens the door for AutoHotKey to do things like:

. Make DLLs

. COM/ACTIVEX

. OO ( object oriented programming )

AutoHotkey can be viewed as an automation and simplified programming language built over C++. You are taking things that are really hard or what people don't usually do in C++ and making them possible with AutoHotkey.

Why not do the same thing with .NET? CS-Script is basically C#, but with a more "pro script" slant. Thus making it great to be used by AutoHotkey in the same way C++ is used now.

Making a move for AutoHotkey source code all the way to .NET may not be bad either. We are now talking about having AutoHotkey run on LINUX and MACs and perhaps Pocket PCs, in addition to all the other things you can do with a .NET language.
Back to top
View user's profile Send private message
Nemroth



Joined: 07 Sep 2004
Posts: 262
Location: France

PostPosted: Tue Aug 23, 2005 5:51 pm    Post subject: Reply with quote

Of course AHKnow, I know what you said. I know the basics of C and C++ and I don't know (for the moment) C#, nor CS-Script of course. But I think that C#-Script must be a script language simpler than C# but more complex for non programmers than AHK (witch of course is more specialised too).
.Net is an upper level above API, so probably that what can be done in C# and it derivatives can be done in C++, probably with more difficulty but also with more speed.
The philosophy of .Net seems to be the same as the one of VB : you can't make stand alone EXEs, as they need the .Net framework to be present to be able to run, as in VB you need the runtimes to be presents. In each case, the code of the exe is "semi-compiled".
Not all the AHK users are programmers, able to programm in C# or in C#-Script. I think it is the opposite. Probably more of them like AHK as it is easy to learn and with a basic knowledge, you can do interesting things.
I don't say it's a bad thing to be able to interface (if possible) AHK with C#-Script. I think it is probably more usefull to interface it (in a first time) with a more well known script lagnuage like WSH (in witch there is also COM/ActiveX capabilities) or VBscript.
One is not exclusive of the other.
And I maintain that if there are people who don't whant to install the .Net framework, even if it will become an important piece of software in the Windows environnement, they must be able to do so without other penalty than the one to not be able to run the .Net dependant progs.
For my point of vue, .Net is (as "semi-compiled") slowler than a stand alone exe and I don't think there is anything (or at least that there are only few things) new with .Net.
That's only my opinion.
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Aug 23, 2005 11:25 pm    Post subject: Reply with quote

I think that .Net works well in a corporate environment where there is control over deployment. In the "public arena", not so well.
Back to top
corrupt



Joined: 29 Dec 2004
Posts: 2397

PostPosted: Wed Aug 24, 2005 3:29 am    Post subject: Reply with quote

AHKnow wrote:
There is no stopping .NET We can't turn back the clock.
Laughing No, but we could unplug it, throw it in the trash, and replace it with a new clock that will allow us to change the time and that can possibly tell time properly... Laughing

Sorry, couldn't resist...
Back to top
View user's profile Send private message Visit poster's website
savage



Joined: 02 Jul 2004
Posts: 206

PostPosted: Mon Aug 29, 2005 1:28 am    Post subject: Reply with quote

Quote:
.Net lacks support for the low-level OS features used to support hotstrings and custom hotkeys, among other things.


It does lack these things. If you want to write something low level .Net is useless, it makes it even more difficult than just writing it in c. P/Invoke is NOT designed for the in depth workout that something like AHK would give it, it's just waaay to slow (20 times the time for a single call) and far too awkward. Also, .net wouldn't give you cross platform ahk anyway, one of the problems of most cross platform frameworks is that they often keep compatability by focusing on the lowest common denominator - ie they work the same on all platforms but they only address the things that are present on all platforms which of course rules out system hooks and stuff. Unix doesn't have the capabilities windows has for this sort of software anyway. As far as I can tell the parts of X relevant to automation (Xtest and others) are simply not as mature as those in windows. And mac os x doesn't NEED ahk, a decent hotkey program and applescript does the job nicely. It's much easier to script gui stuff in mac os.

It would be great if later versions of .Net addressed low level system issues - an object oriented interface to the guts of the OS would be a beautiful thing, but I doubt it'll happen as MS seems more interested in making insipid crap like the "My" namespace.

Don't get me wrong, I like .Net (as far as I can like a fat framework). But people need to be more realistic when thinking about what to use it for.

Quote:
AutoHotkey can get ahead of the coming "wave".


.Net's been out for how many years now? I've yet to see any kind of "wave." Companies aren't adopting .Net in anywhere NEAR the quantities that MS would like.

Quote:

. Make DLLs

. COM/ACTIVEX


I think you're missing the point. Why does ahk need these things?

Parts of your idea have merit though, but I think it would be better addressed by seperating ahk's functional core from its language component. Make the core available as a dll that can be bound to whatever language is needed while keeping the good old ahk language around for people who don't need anything more.
_________________
<enormous animated gif>
Back to top
View user's profile Send private message AIM Address
AHKnow



Joined: 03 Jul 2004
Posts: 118

PostPosted: Tue Aug 30, 2005 12:10 pm    Post subject: Reply with quote

I have nothing against the idea of a AutoHotkey .DLL version that can be uses in mutiple program languages. I'm all for a AutoHotkey DLL.

Some counter points:

1. There is also SWIG to consider when making the argument about P/invoke.

http://www.swig.org/ Ok, I admit swig is a bit funky, but maybe there is something there...


2. There are some macro recorder utilities for .NET out there. The below shows it can be done...

http://www.codeproject.com/csharp/GlobalSystemHook.asp

http://www.codeproject.com/csharp/globalhook.asp

note- you may have to join to download source code.


3. This speed thing can be very relative. C# is not going blow away C++ in a speed contest, but there has been a lot of comparisons that show C# is not slow either. We also are talking about recording and playing back recorded macros in many cases, not about time critical applications where a few seconds makes all the difference in 95% of the cases.

4. What about bringing AutoHotkey to the LINUX and MAC world? Oddly enough, .NET seems to be the best way to try to do it.
Back to top
View user's profile Send private message
Nemroth



Joined: 07 Sep 2004
Posts: 262
Location: France

PostPosted: Tue Aug 30, 2005 5:15 pm    Post subject: Reply with quote

I will not come back on what I already said about Net
I don't see why to adopt .Net, C# and C#-script as a priority.
I think they are other things more important.
OK (not immediatelly of course) to have AHK in a DLL usable by other programming and languages, OK to be able to manage ActiveX, DOM/COM, etc..., but why with the intercept of .Net ?
Hooking ? This technique exists since windows 95 (I'm not sure it was avaible in Windows 3.11, but it isn't impossible...), so it isn't a discovery !!! It is avaible in C# ? Good thing, but as it can be done with C++ since a long time (I speak of course about hooking inside a DLL, not about the form of hooking used by AHK), I don't see any advantage to do that with C# and .Net, as it is only a translate of things witch already exists.
And it is a translation witch is less powerfull than the C++ solution.
Bringing AHK in Linux and MAC ? I'm not certain that .Net is the best solution for that...
Back to top
View user's profile Send private message
daonlyfreez



Joined: 16 Mar 2005
Posts: 745
Location: Berlin

PostPosted: Tue Sep 06, 2005 8:57 pm    Post subject: Reply with quote

I'm already doubting the direct and full support of ActiveX/DOM/COM/OLE/MCI etcet., and certainly of .Net.

AutoHotkey does work on the Windows platforms, but full support (and undoubtingly more implementations that use it) would make it far to dependant on it, I fully agree with Nemroth. Some functionalities might need a 'form of'/calls/hooks, but that should be basic only.

E.g.: I installed Limnor to give it a try, which has almost full 'Microsoft' objects control support, and it errored out on the install, complaining about my MDAC (database drivers) not being up to date, which isn't true. I don't want to have to have all and latest drivers/updates/fixes installed to make something work, I think nobody does.

We can do without using Access as a database, Excel as a spreadsheet, and Word as a wordprocessor. If data is in there and you want to/have to use it, it would ofcourse be convenient to have an easy way to pull it out/put it back in, maybe even thru basic AHK support, but advanced use please as an add-on, a dll or whatever...

I feel since AutoHotkey is free, simple and open source, the functionalities/support added should be so too. DLLCall is complicated enough already Razz

There is more need for support/libraries like CMDRet/StinStout (CMDRet, but with full 'tailing'), Serial (serial port support), IR (infrared support), mySQL (database support), HTML/BrowserControl (an addition to the GUI controls, but DISABLE ActiveX please, for support for it would really leave the door open for abuse) and RichEdit (advanced editing as a new GUI control), cURL (advanced net) etcet. etcet.., as a dll, an include, functions or direct support in AHK.

What do you want to achieve with full support for ActiveX/DOM/COM/OLE/MCI etcet. exactly?

And what can .Net/C# do that is so special (apart from downloading a huge install in the case of .Net)?

If need be, you can still use a temp-file, the environment, the command line or whatever to launch someother 'language', like VBScript
_________________
(sorry, homesite offline atm)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
specialGuest
Guest





PostPosted: Tue Sep 06, 2005 9:46 pm    Post subject: Reply with quote

daonlyfreez wrote:

We can do without using Access as a database, Excel as a spreadsheet, and Word as a wordprocessor.


What a wonderful world ...

I agree completetly to your answer, daonlyfreez.

What you describe, is exactly the AHK of my dreams (I rarely remember my dreams, so I dont know, if I just didnt remember some of your points - or if I even in my dreams couldnt imagine them).

Anyway, right now I will lean myself back, smiling happily and praying that one day Chris will ...
Back to top
Nemroth



Joined: 07 Sep 2004
Posts: 262
Location: France

PostPosted: Tue Sep 06, 2005 11:26 pm    Post subject: Reply with quote

daonlyfreez wrote:
I'm already doubting the direct and full support of ActiveX/DOM/COM/OLE/MCI etcet., and certainly of .Net.

I will not say again what I said ine the Visual Basic Script support in AutoHotKey topic.
I don't see any benefit to use something like .Net, and I said why. But for VBScript, ActiveX/COM/ADO, I'm not agree with you, daonlyfreez.
daonlyfreez wrote:
We can do without using Access as a database, Excel as a spreadsheet, and Word as a wordprocessor.

Of course but not at work. MS Office si a standard used by the great majority of firms.
daonlyfreez wrote:
What do you want to achieve with full support for ActiveX/DOM/COM/OLE/MCI etcet. exactly?
For me, MS Office automation. I think that ActiveX/COM/ADO support would be a plus, bot of course not a necessity as I can do without them. But I think it would be more powerfull with...
daonlyfreez wrote:
And what can .Net/C# do that is so special (apart from downloading a huge install in the case of .Net)?
Yes yes yes !!!!
daonlyfreez wrote:
If need be, you can still use a temp-file, the environment, the command line or whatever to launch someother 'language', like VBScript
I think it isn't a very powerfull, nor professionnal, method to do the things...
Back to top
View user's profile Send private message
daonlyfreez



Joined: 16 Mar 2005
Posts: 745
Location: Berlin

PostPosted: Wed Sep 07, 2005 12:48 am    Post subject: Reply with quote

I'm not saying basic support for getting data in and out the MS Office applications (Access, Excel, Word, Outlook, or even the satan Twisted Evil itself: PowerPoint) wouldn't be a good thing! If some access to ActiveX/COM etcet would be necessary to achieve that, so be it.

But...

If you allow full access to those, soon scripts would arise and soon the standard for using databases would be Access, we'd have an Access Control, since, well, the code is there anyway, why not use it..., for spreadsheets one would use an Excel Control, we'd have a Word Control in our GUI etcet....

Sounds all good for those who have it, but makes it inwillingly or not the standard, thus incompatible for those who don't have Office...

I'm not against Office or Microsoft, and I'm not that dreamy that I don't realise that most work with it, I do myself, all day. Automating those in an easy way would be a very nice addition, but I think the core of AutoHotkey should depend on itself, and (not much more than) the standard OS install. Any nice add-ons, like a dll, no problem, I don't mind FileInstall, excellent... Isn't there an open source OLE library out there? That would cover most, right?
_________________
(sorry, homesite offline atm)
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group