Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Matlab and Autohotkey, anybody?


  • Please log in to reply
16 replies to this topic
Andromon
  • Members
  • 129 posts
  • Last active: Jun 08 2014 12:09 PM
  • Joined: 23 Feb 2013

So, I will explain first a little bit, the main code I know it's Matlab, because I study Physics and it's really a powerful tool and a simpler code than C, but with its ideas, just more mathematically oriented.

 

Some of the functionallities that Matlab lacks in my opinion are some that AutoHotkey really has and easy to do, like copying thing, automating, etc.

 

So imagine I want to collect data with AutoHotkey and then integrate it in Matlab for working with it.

 

Or make a programme with some mathematical expressions made in Matlab but with some other things make with AHK.

 

Does anybody that uses the two programms now if this might be useful, or just with Matlab I should have enough to do everything?

 

PD: I really don't use Octave because I didn't find it easy to install, and in my University Matlab is already there, although I think Universities should move to freeware, specially in Spain with our debts problems...


Spanish and just learning AHK, please be patient with me! Thank you.


Rino
  • Members
  • 250 posts
  • Last active: Dec 18 2015 05:09 PM
  • Joined: 12 Apr 2012

Hm  don't know anything about Matlab, but I'd like to think AHK could output the information, perhaps even automate the writing/ partial writing of something you would use in Matlab. I personally don't have the time to look into it but I'd imagine if you dig enough you could figure out the formats.



Andromon
  • Members
  • 129 posts
  • Last active: Jun 08 2014 12:09 PM
  • Joined: 23 Feb 2013

Until know what I have done is just thing like hotstrings, fu for function and etc for the Matlab main commands.

 

But Matlab is terrible getting input from the internet or external fonts, and I think AHK may be the option right for me, since I have seen a user in other thread that was wanting to separate numbers and characters of thing in excel sheets, I think I can do something similar in the future between Matlab and AHK.

 

Supposedly Matlab has also a C programmer, but C it's like you have to compile it everytime and I just know the very basics, and AHK is by far easier to learn.

 

So my idea is to get data from the internet with an "automata" like AHK and then working mathematically with that data in Matlab, since their capabilities for "complicated" Maths operations are by far better than those AHK (of course, since Matlab is written for that and AHK not), and some mathematical expressions are really way more simpler there, like variables operations.


Spanish and just learning AHK, please be patient with me! Thank you.


Rino
  • Members
  • 250 posts
  • Last active: Dec 18 2015 05:09 PM
  • Joined: 12 Apr 2012

Results from the internet-- yes AHK can do it, however it is most effectively done when you use IE. 

 

Results from spreadsheets- you can easily do this with AHK using com. If you can somehow mold this into an array, a list, or something I would assume from there that Matlab may be able to read the contents of a file.



Andromon
  • Members
  • 129 posts
  • Last active: Jun 08 2014 12:09 PM
  • Joined: 23 Feb 2013

Results from the internet-- yes AHK can do it, however it is most effectively done when you use IE. 

 

Results from spreadsheets- you can easily do this with AHK using com. If you can somehow mold this into an array, a list, or something I would assume from there that Matlab may be able to read the contents of a file.

 

IE? Omg I really hate it, it's the hell of browsers.

 

Array are really treateable using Matlab, but I yet don't totally know how to use it. Matlab is specially designed for working with Matrix, generally of numbers, it's name comes from Matrix Laboratory.


Spanish and just learning AHK, please be patient with me! Thank you.


Rino
  • Members
  • 250 posts
  • Last active: Dec 18 2015 05:09 PM
  • Joined: 12 Apr 2012

I know, I hate it with a passion as well but I was just saying it is the best way to get something solid from ahk. If you are using FF or chrome I would say you may be better off trying greasemonkey for better results; it has ground paved for coding.

 

Reading contents from websites not using IE would be like trying to manipulate the find function it won't be very fun for each thing you need to manipulate. 

 

And something reading from excel I'd suggest using com as I believe you'd be able to get it into an array easier unless it doesn't come from excel the things you need to do math with.



Andromon
  • Members
  • 129 posts
  • Last active: Jun 08 2014 12:09 PM
  • Joined: 23 Feb 2013

I know, I hate it with a passion as well but I was just saying it is the best way to get something solid from ahk. If you are using FF or chrome I would say you may be better off trying greasemonkey for better results; it has ground paved for coding.

 

Reading contents from websites not using IE would be like trying to manipulate the find function it won't be very fun for each thing you need to manipulate. 

 

And something reading from excel I'd suggest using com as I believe you'd be able to get it into an array easier unless it doesn't come from excel the things you need to do math with.

 

Yes, I need Matlab rather than Excel, Excel is good for low-medium Maths things, but from delicated ones Matlab is the best software I know, with Wolfram Mathematica (Idk if Nasa and US Army has even better, lol, surely they will...). They are both languages of programmation, so can use them like Excel via mouse, of typing everything into commands, and for that, you have the control of all.

 

I don't understand at all why it's easier to get data from IE rather than FF or GC, are they different languages, or what? Sorry if it sounds too noob.

 

Thanks.


Spanish and just learning AHK, please be patient with me! Thank you.


Rino
  • Members
  • 250 posts
  • Last active: Dec 18 2015 05:09 PM
  • Joined: 12 Apr 2012

As far as I'm aware it is vastly different. I'd say the only real way to do so is to try using com or something similar. I'd say try to research how to. IE can handle com, as far as I'm aware com does not play very nice with GC and FF. I believe that would be something for someone who knows more about AHK than I do to get it to play nice with com.



Andromon
  • Members
  • 129 posts
  • Last active: Jun 08 2014 12:09 PM
  • Joined: 23 Feb 2013

With COM do you mind http://en.wikipedia....nt_Object_Model

 

??

 

I have not any idea of what it is.


Spanish and just learning AHK, please be patient with me! Thank you.


Rino
  • Members
  • 250 posts
  • Last active: Dec 18 2015 05:09 PM
  • Joined: 12 Apr 2012

Yes it is that. It more or less would allow you to get the data from excel with over 3000 active cells and it taking less than 1 minute to get the data into an array. However you will then have the issue of how to output the array so that it will be very useable to Matlab scriptting. The questions you would need to ask is how do you transfer an array from AHK into an array that another script/ program can read effectively.  



Andromon
  • Members
  • 129 posts
  • Last active: Jun 08 2014 12:09 PM
  • Joined: 23 Feb 2013

Ok, I see

 

Matlab has the option of importing data from Excel, but I still don't totally know how to manage arrays there, it's way more powerfull than excel, but more complicated, since it's code based.

 

I will be researching it when I get more confidence with AHK, now I'm with the loops and breaking conditions.

 

BTW, are in general programmation languages similar to AHK? I mean, I'm not losing my time learning it even if I then have to change language, right?

 

At University they taught us Mathematica, Matlab and C#, it depends of each University, Matlab is like C but more Math oriented, the same for Mathematica, and C#, well, it's the language for excellence...

 

What about Javascript? It is similar to some things of AHK?

 

I think almost all the languages use the Boolean Algebras, right? Just a matter of syntax and their built in commands that make things easier I suppouse.


Spanish and just learning AHK, please be patient with me! Thank you.


Rino
  • Members
  • 250 posts
  • Last active: Dec 18 2015 05:09 PM
  • Joined: 12 Apr 2012

All those answers are available on the forums. The short summary is the reason AHK does not have "street credit" is because it is so much different. It is more or less structured differently.



Andromon
  • Members
  • 129 posts
  • Last active: Jun 08 2014 12:09 PM
  • Joined: 23 Feb 2013

All those answers are available on the forums. The short summary is the reason AHK does not have "street credit" is because it is so much different. It is more or less structured differently.

 

And there is no way or extensions to add to GC to support that feature of AHK?

 

Ty


Spanish and just learning AHK, please be patient with me! Thank you.


Rino
  • Members
  • 250 posts
  • Last active: Dec 18 2015 05:09 PM
  • Joined: 12 Apr 2012

You might be able to cook up something using the add on Greasemonkey but I can't say 100% sure it would work to play nice with AHK (I know GM would work to automate stuff for GC, you might be able to force AHK to auto manipulate GM but that I am not completely sure, though I would say it probably could). I know the amount GC can be automated by AHK is limited GM has a much better chance (a few places on the forum will back this up). 



Andromon
  • Members
  • 129 posts
  • Last active: Jun 08 2014 12:09 PM
  • Joined: 23 Feb 2013

You might be able to cook up something using the add on Greasemonkey but I can't say 100% sure it would work to play nice with AHK (I know GM would work to automate stuff for GC, you might be able to force AHK to auto manipulate GM but that I am not completely sure, though I would say it probably could). I know the amount GC can be automated by AHK is limited GM has a much better chance (a few places on the forum will back this up).

 
GreaseMonkey is for FF, for GC I have found Tampermonkey, is that what you mean?
 
Thanks.

Spanish and just learning AHK, please be patient with me! Thank you.