topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:32 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: looking for programming language  (Read 6471 times)

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,823
    • View Profile
    • Donate to Member
looking for programming language
« on: October 09, 2011, 05:24 PM »
hello

Trying to start learning a programming language, I chose Javascript, since it is the most widely used one. However, the fact that it does not work independently, but only according to its environment, made me drop it. Then, I moved to VBScript, which was nice to see how easy it is, but I realized it is limited: you cannot display date using more than 3-4 formats, while Excel offers you 17-18, and to be honest, I expect a programming language to give you the option to create your own date format.

So, do you have any suggestions that would make my searching for a powerful programming language easier?

Given the fact that it must be able to identify and interact with windows and controls of other apps, with databases, with website elements, etc

thanks!

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
Re: looking for programming language
« Reply #1 on: October 09, 2011, 06:03 PM »
Interacting with windows versus with website elements are hugely separated domains. Can you be a bit more specific?

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: looking for programming language
« Reply #2 on: October 09, 2011, 08:06 PM »
Given the fact that it must be able to identify and interact with windows and controls of other apps, with databases, with website elements, etc

Eóin makes a good point that you kind of need to figure out what you want to do... but, if that's the list... Any .NET language will let you do that. e.g.:

Interact with:

  • Windows - This is very basic, but you may need pinvoke
  • Controls of other apps - You will need pinvoke
  • Databases - ADO.NET
  • Website elements - The WebBrowser control or MozNET can help you do this (or WebClient etc.)

Goals are important there as well, e.g. What do you want to do with a web site or web site element?

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,612
    • View Profile
    • Donate to Member
Re: looking for programming language
« Reply #3 on: October 10, 2011, 01:36 AM »
I chose Javascript
searching for a powerful programming language
How come you use those two statements related in 1 message? Or did I misunderstand and are you now looking for a more powerful language than jscript? 8)

Any .NET language will let you do that.
+1

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,823
    • View Profile
    • Donate to Member
Re: looking for programming language
« Reply #4 on: October 10, 2011, 01:55 PM »
to be honest, I don't know what I want to do, I just know that I want to learn a language that will worth it
vbscript failed, isn't the reason mentioned in first post a good reason?

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: looking for programming language
« Reply #5 on: October 10, 2011, 02:12 PM »
How come you use those two statements related in 1 message? Or did I misunderstand and are you now looking for a more powerful language than jscript? 8)
Ummm, JavaScript actually is pretty darn powerful (if also pretty quirky and imho not super suitable for everything) as a language - just because you normally only see it in webbrowsers with a limited standard library doesn't mean the language itself isn't powerful :)
- carpe noctem

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: looking for programming language
« Reply #6 on: October 10, 2011, 03:27 PM »
If you want to manipulate controls on Windows apps, use database etc.. I would recommend AutoIt3.  Esp. if you are new to programming.  The syntax is very much like the Basic language. It's designed to send macros/keystrokes to windows and controls on windows.  It has SQLite library for db stuff.

http://www.autoitscr...pt-editor/downloads/

Forums to get help
http://www.autoitscript.com/forum/


The weakest element may be web page interaction.  But I haven't explored that area.

Here's a "hello world" program that demonstrates displaying a messagebox and also using a For Next loop


For $x = 1 To 3
MsgBox(0,"Hello World Program","Hello World! #" & $x & " of 3")
Next

The language and tools are free.  Also available are customized versions of SciTE editor.  You can use any editor, but the SciTE is set up to run and compile right out of the editor. Also has "intellisense" for auto completion of keywords and functions.  Functions that aren't built in or available as 3rd party scripts, such as Windows API calls that haven't been wrapped in AutoIt code, can be called using DllCall.

As example, to see if Aero Glass is enabled on Vista or Windows Seven DllCall is employed in this function

;returns non 0 if Glass is enabled on Vista/W7
Func _GlassEnabled()
$retValue = DllCall("dwmapi.dll", "int", "DwmIsCompositionEnabled", "int*", "")
If @error Then Return 0
Return $retValue[1]
EndFunc   ;==>_GlassEnabled


AutoIt3 is Windows platform only.  It requires XP or later. It also has COM Object support.  Anything you see on MS site for using stuff like Shell.Application or Scripting.Dictionary you should also be able to do easily in AutoIt3.


widgewunner

  • Member
  • Joined in 2009
  • **
  • Posts: 93
    • View Profile
    • Donate to Member
JavaScript or Python
« Reply #7 on: October 10, 2011, 10:16 PM »
I would second the motion recommending JavaScript (which is and will remain _everywhere_). To learn it proper-like, get and study Flanagan's The Definitive Guide. The recently released 6th edition covers the most recent JavaScript version (ECMAScript5) and all the cool new HTML5 stuff that will soon be running the net. One great thing about JavaScript is that to get started, all you need is a browser and a text editor.

That said, there's also lots of really smart folks who like Python.

Renegade

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 13,288
  • Tell me something you don't know...
    • View Profile
    • Renegade Minds
    • Donate to Member
Re: looking for programming language
« Reply #8 on: October 11, 2011, 05:24 AM »
The weakest element may be web page interaction.  But I haven't explored that area.

If it can hook into typical C++ APIs, then it can do it. However, a lot of that stuff gets EXTREMELY messy with the shdocvw.dll and mshtml.dll/tlb. Another browser engine is likely better to use unless you know what you're doing. Again, you need to be able to hook into typical C/C++/.NET APIs/SDKs/components.

For web browser automation, I'd recommend starting with .NET and the WebBrowser in Visual Studio. It's very easy to get started with, and the .NET interface is relatively clean there. Still, it can get very messy if you need to start doing some complex things. Check my blog at RenegadeMinds.com or Cynic.me and search for "browser" as I've written a fair bit about it in the past.

Slow Down Music - Where I commit thought crimes...

Freedom is the right to be wrong, not the right to do wrong. - John Diefenbaker

kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,823
    • View Profile
    • Donate to Member
Re: looking for programming language
« Reply #9 on: October 12, 2011, 01:15 PM »
as for interacting with other GUI's, is there anything more than a Windows info tool, like http://msdn.microsof...ibrary/ms727247.aspx, that will give more information?
any language or something? for the text in controls that you see, but you cannot reveal it in your windows info tool, etc

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: looking for programming language
« Reply #10 on: October 12, 2011, 03:14 PM »
Both AutoIt3 and AutoHotKey come with their own spy.  They also have "hidden window" and "hidden text" modes.  You'll have to look through the documentation for how they stack up against .NET stuff.

If you try AutoHotKey I recommend starting right off with AutoHotKey_L. It has object support and other advanced features that vanilla AHK doesn't.

AutoIt3 can definitely pull text and send text to controls.  I've only used it in rudimentary fashion when deciding if that or clipboard was the better way to pull file names from Explorer Windows.  But macro manipulation is what they are both about.


kalos

  • Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,823
    • View Profile
    • Donate to Member
Re: looking for programming language
« Reply #11 on: October 12, 2011, 03:39 PM »
Both AutoIt3 and AutoHotKey come with their own spy.  They also have "hidden window" and "hidden text" modes.  You'll have to look through the documentation for how they stack up against .NET stuff.

If you try AutoHotKey I recommend starting right off with AutoHotKey_L. It has object support and other advanced features that vanilla AHK doesn't.

AutoIt3 can definitely pull text and send text to controls.  I've only used it in rudimentary fashion when deciding if that or clipboard was the better way to pull file names from Explorer Windows.  But macro manipulation is what they are both about.



I think they cannot read/see the text of the url in your web-browser's address bar, though you can clearly see it. They need to focus the address bar and copy it, this is the only way afaik.

I was wondering if another language or something would offer something better, would be able to access and read deeper parts of the apps and OS


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,736
    • View Profile
    • Donate to Member
Re: looking for programming language
« Reply #12 on: October 12, 2011, 05:33 PM »
I would suggest you check the help docs for entries that start with "Control" such as ControlGetText.  If you search the forum for the language chances are it's already been answered there.