Hi,
I use AutoIT to develop small windows applications which make life simpler.
One such application I developed & use is a "PrintScreenRecorder". Its a small application which resides in the system tray and activates when "F1" is pressed. The application will simulate a "ALT + PrintScreen" key press, start paint.exe, paste the image in paint and then save it as .jpg. This prevents me from doing all this manually.
I know, there are 100s of better ways of doing this using windows function, DLL and what not; but you see, I am not a programmer. I just use simple tools like AutoIT3 which helps a non-programmer like me to do all with in about 30-60 minutes of time using simple BASIC like scripting. I do not need knowledge of VB, .NET, DLLs, and so much more. I have numerous such application which make life of a layman like me so much more simpler .
Once I move to Linux Desktop, I will need some such tools (like AutoIT3) which can help me develop such small applications.
Doing my bit on google, I have come across programming languages like Python, Ruby, C, C++. For creating GUIs, I am suggested Qt / GTK. But I need some simple scripting tools which can help me create such applications without having to learn Python, Ruby, C, C++ in detail.
I am sure there are application (like AutoIT3) which will help me create small GUI based application for my linux desktop. Application which can interact with MySQL, Firefox, OS functions etc.
Seeking help from Linux experts who can point me to such tools which will help me.
Thx Sandeep
On Wednesday 19 August 2009, RSCL Mumbai wrote:
Once I move to Linux Desktop, I will need some such tools (like AutoIT3) which can help me develop such small applications.
Doing my bit on google, I have come across programming languages like Python, Ruby, C, C++. For creating GUIs, I am suggested Qt / GTK. But I need some simple scripting tools which can help me create such applications without having to learn Python, Ruby, C, C++ in detail.
I am sure there are application (like AutoIT3) which will help me create small GUI based application for my linux desktop. Application which can interact with MySQL, Firefox, OS functions etc.
Firstly one does not need any gui to do most of jobs - simple or complex. A few lines of bash script will do most simple jobs. Linux is not handicapped or deliberately hobbled on the command line. However there is kde Kommander if you really need a gui builder for simple jobs. Also GNU/Linux is not one monolithic mess like doze. Hence each of the apps stated above (MySql, FF) have their own scripting tools that make them do whatever u want. Further whatever WM you use has it's own set of controls to interact with every window and it's elements.
So there are a innumerable ways of achieving "simple things" like switching on a light bulb in your farmhouse at three in the morn, recording all the images in that place, mmxing the images to you, saving it in your mysql server parked in LA, while you are swimming with the spy who loves you in the bahamas and alerts you if .......yak yak.
On Wed, Aug 19, 2009 at 12:44 AM, RSCL Mumbairscl.mumbai@gmail.com wrote:
One such application I developed & use is a "PrintScreenRecorder". Its a small application which resides in the system tray and activates when "F1" is pressed. The application will simulate a "ALT + PrintScreen" key press, start paint.exe, paste the image in paint and then save it as .jpg. This prevents me from doing all this manually.
How about pressing PrintScreen key and click on save instead of F1 key. That's all that's needed in linux to print the screen.
I am sure there are application (like AutoIT3) which will help me create small GUI based application for my linux desktop. Application which can interact with MySQL, Firefox, OS functions etc.
What kind of interaction with them?
On Wed, Aug 19, 2009 at 7:58 AM, Mehul Vedmehul.n.ved@gmail.com wrote:
On Wed, Aug 19, 2009 at 12:44 AM, RSCL Mumbairscl.mumbai@gmail.com wrote:
One such application I developed & use is a "PrintScreenRecorder". Its a small application which resides in the system tray and activates when "F1" is pressed. The application will simulate a "ALT + PrintScreen" key press, start paint.exe, paste the image in paint and then save it as .jpg. This prevents me from doing all this manually.
How about pressing PrintScreen key and click on save instead of F1 key. That's all that's needed in linux to print the screen.
+1. Linux distros already have an application that pops up a dialog to save screenshots, whether printed with Printscreen or Alt+Printscreen.
I am sure there are application (like AutoIT3) which will help me create small GUI based application for my linux desktop. Application which can interact with MySQL, Firefox, OS functions etc.
So AutoIT does not use any language for you to customize application building? That is quite odd. In all cases, if you want to do any kind of application development, your tool will have some kind of programming language backend. You will find that most of your tiny tools needs are taken care of. For those that are not, if you want it bad enough, you will learn python and get around to doing it yourself. Python is extremely easy to learn -- many guys around here will vouch for it. Depending on your distro, you can peek into the development tools section of your package manager to see the huge variety of development tools you can immediately get access to. You have tools such as glade for GTK, monodevelop for mono and kdevelop for kde that can aid you in preparing GUIs.
And then you have eclipse, which can potentially work as an IDE for virtually every language and platform -- once you are finally done configuring it ;)
PrintScreenRecorder was just an example :)
Siddhesh has given a direction. Thx Siddhesh. Will look at Python, Glade for GTK, Eclipse. These are the pointers I was looking for.
While checking on google, I found Ruby, Python to be suitable for my needs. Also, the following projects. http://wwwsearch.sourceforge.net/mechanize/ http://glade.gnome.org/ http://xdialog.dyns.net/
Also, I need it to have API for Firefox for 'browsing automation'. Automate tasks like launch Firefox, open url google.com, enter search string in the text box, press submit button. This is just a simple example. Its gets a bit complex in some cases.
We are into data processing, so automating such tasks, saves us time.
Do share your thoughts.
Thx Sandeep
On Wed, Aug 19, 2009 at 11:28 AM, RSCL Mumbai rscl.mumbai@gmail.com wrote:
PrintScreenRecorder was just an example :)
Siddhesh has given a direction. Thx Siddhesh. Will look at Python, Glade for GTK, Eclipse. These are the pointers I was looking for.
Instead of working with glade(which is having only front end creation tool for GTK)You can try anjuta ,which is having inbuilt glade tool,project management, application wizard,debugger, Source code editor , compiler etc etc. For more info visit http://projects.gnome.org/anjuta/features.shtml
While checking on google, I found Ruby, Python to be suitable for my needs. Also, the following projects. http://wwwsearch.sourceforge.net/mechanize/ http://glade.gnome.org/ http://xdialog.dyns.net/
Also, I need it to have API for Firefox for 'browsing automation'. Automate tasks like launch Firefox, open url google.com, enter search string in the text box, press submit button. This is just a simple example. Its gets a bit complex in some cases.
We are into data processing, so automating such tasks, saves us time.
Do share your thoughts.
Thx Sandeep -- http://mm.glug-bom.org/mailman/listinfo/linuxers
On Wednesday 19 Aug 2009 11:39:02 am Siji Sunny wrote:
On Wed, Aug 19, 2009 at 11:28 AM, RSCL Mumbai rscl.mumbai@gmail.com wrote:
PrintScreenRecorder was just an example :)
Siddhesh has given a direction. Thx Siddhesh. Will look at Python, Glade for GTK, Eclipse. These are the pointers I was looking for.
Instead of working with glade(which is having only front end creation tool for GTK)You can try anjuta ,which is having inbuilt glade tool,project management, application wizard,debugger, Source code editor , compiler etc etc. For more info visit http://projects.gnome.org/anjuta/features.shtml
or go for boaconstructor with wxPython
On Wed, Aug 19, 2009 at 11:28 AM, RSCL Mumbai rscl.mumbai@gmail.com wrote:
PrintScreenRecorder was just an example :)
Siddhesh has given a direction. Thx Siddhesh. Will look at Python, Glade for GTK, Eclipse. These are the pointers I was looking for.
Instead of working with glade(which is having only front end creation tool for GTK)You can try anjuta ,which is having inbuilt glade tool,project management, application wizard,debugger, Source code editor , compiler etc etc.
While checking on google, I found Ruby, Python to be suitable for my needs. Also, the following projects. http://wwwsearch.sourceforge.net/mechanize/ http://glade.gnome.org/ http://xdialog.dyns.net/
Also, I need it to have API for Firefox for 'browsing automation'. Automate tasks like launch Firefox, open url google.com, enter search string in the text box, press submit button. This is just a simple example. Its gets a bit complex in some cases.
We are into data processing, so automating such tasks, saves us time.
Do share your thoughts.
Thx Sandeep -- http://mm.glug-bom.org/mailman/listinfo/linuxers
Hi Sandeep,
On 08/19/2009 11:28 AM, RSCL Mumbai wrote:
PrintScreenRecorder was just an example :)
Siddhesh has given a direction. Thx Siddhesh. Will look at Python, Glade for GTK, Eclipse. These are the pointers I was looking for.
While checking on google, I found Ruby, Python to be suitable for my needs. Also, the following projects. http://wwwsearch.sourceforge.net/mechanize/ http://glade.gnome.org/ http://xdialog.dyns.net/
Also, I need it to have API for Firefox for 'browsing automation'. Automate tasks like launch Firefox, open url google.com, enter search string in the text box, press submit button. This is just a simple example. Its gets a bit complex in some cases.
We are into data processing, so automating such tasks, saves us time.
Do share your thoughts.
If you love automating every day tasks (and it seems like you do), you'll absolutely love linux ! I too started off this way -- writing small scripts to automate stuff that I was too lazy to do. The best thing about linux is[1] it has a whole toolkit of things to do stuff like this.
A lot of people tend to forget something these days. Linux was built around the unix principle of 'Small is beautiful', which means that you have commands which do small things (and pretty uninteresting and boring ones at that) by themselves, but when chained together, they can do anything from simple text file processing to acting as a webserver -- and in all of this I am talking /only/ about the linux shell (ie: the command line) !!! ...I am not even considering the 'proper' programming languages.
So, well, where do you start.
a. Learn to tame the shell -- http://tldp.org/LDP/abs/html/ b. Learn a scripting language (I'd recommend python) -- http://wiki.python.org/moin/BeginnersGuide c. Play around with various desktop environment and settle on one that feels right for you. Most people go with either KDE or Gnome, some with Xfce. Others like me stick to using a bare bones window manager rather than a desktop environment. Each will have different things to offer, but if you are looking for automation and doing everything by the keyboard, you'll find yourself drawn more to the likes of openbox, windowmaker etc.
The whole point here is, unlike windows, where the frustrating factor is the inflexibility of the environment which limits the amount you can customize and automate, the frustrating factor in linux is making the choice from the apparently limitless number of ways to customize/automate :).
HTH, cheers, - steve
On Wednesday 19 Aug 2009, steve wrote:
[asnip] b. Learn a scripting language (I'd recommend python) -- http://wiki.python.org/moin/BeginnersGuide
Just playing Devil's Advocate here, but the day I start recommending Python as a scripting language is the day it lets me do something like this from a command-line:
perl -e 'undef$/;$"=chr(10);foreach(@ARGV){open(F,$_); $l=<F>;@l=reverse(split(/\n/,$l));close(F);open(F,">$_");print F "@l";close(F);}' file1 file2 file3...
[Don't try this in a directory where you have files valuable to you: it reverses the lines in the files whose name you provide on the command line. On the other hand, if you run it twice the files are back to their original stage (I think :) ]
You'd be surprised how may of these semi-complex one-liners I've used to get Real Work done, both personally and for clients (e.g. I remember when the client wanted a quick list of all the IP addresses that had hit his site more than 50 times from logs spread over a thousand files, and the list of URLs they had hit). Yup, you got it -- Perl one-liner!
I must admit there's a downside to this: if you use Perl you can't charge the client a bomb for developing an application which will do the same task in 1000 lines of beautifully indented and commented code -- not because you can't write that in Perl, but because it seems such a waste when one line is enough ;)
Regards,
-- Raju
On Wednesday 19 Aug 2009 4:48:38 pm Raj Mathur wrote:
On Wednesday 19 Aug 2009, steve wrote:
[asnip] b. Learn a scripting language (I'd recommend python) -- http://wiki.python.org/moin/BeginnersGuide
Just playing Devil's Advocate here, but the day I start recommending Python as a scripting language is the day it lets me do something like this from a command-line:
perl -e 'undef$/;$"=chr(10);foreach(@ARGV){open(F,$_); $l=<F>;@l=reverse(split(/\n/,$l));close(F);open(F,">$_");print F "@l";close(F);}' file1 file2 file3...
looks like chinese - so it must be perl
Kenneth Gonsalves wrote:
On Wednesday 19 Aug 2009 4:48:38 pm Raj Mathur wrote:
On Wednesday 19 Aug 2009, steve wrote:
[asnip] b. Learn a scripting language (I'd recommend python) -- http://wiki.python.org/moin/BeginnersGuide
Just playing Devil's Advocate here, but the day I start recommending Python as a scripting language is the day it lets me do something like this from a command-line:
perl -e 'undef$/;$"=chr(10);foreach(@ARGV){open(F,$_); $l=<F>;@l=reverse(split(/\n/,$l));close(F);open(F,">$_");print F "@l";close(F);}' file1 file2 file3...
looks like chinese - so it must be perl
I am guessing, he must be a sed expert too. WOW!
Hi Raju,
Sucks ...you sent this post when I was traveling. I saw this just before I shut the laptop and I /knew/ I could p0wn this if only i had some free time. Well now I do, so here goes ...
Firstly disclaimer: this is all in good-natured jest.
On 08/19/2009 04:48 PM, Raj Mathur wrote:
On Wednesday 19 Aug 2009, steve wrote:
[asnip] b. Learn a scripting language (I'd recommend python) -- http://wiki.python.org/moin/BeginnersGuide
Just playing Devil's Advocate here, but the day I start recommending Python as a scripting language is the day it lets me do something like this from a command-line:
ORLY ?
perl -e 'undef$/;$"=chr(10);foreach(@ARGV){open(F,$_); $l=<F>;@l=reverse(split(/\n/,$l));close(F);open(F,">$_");print F "@l";close(F);}' file1 file2 file3...
python -c 'import sys for f in sys.argv[1:]: l = open(f).readlines(); l.reverse(); open(f, "w").writelines(l)' file1 file2 file3...
...and anyone who can read english would understand what is happening.
so next ? but wait, here are some stats:
[steve@laptop ~]$ cat <<EOF | wc -c perl -e 'undef$/;$"=chr(10);foreach(@ARGV){open(F,$_); $l=<F>;@l=reverse(split(/\n/,$l));close(F);open(F,">$_");print F "@l";close(F);}' EOF 129
[steve@laptop ~]$ cat <<EOF | wc -c python -c 'import sys for f in sys.argv[1:]: l = open(f).readlines(); l.reverse(); open(f, "w").writelines(l)' EOF 111
[steve@laptop ~]$ time perl -e 'undef$/;$"=chr(10);foreach(@ARGV){open(F,$_); $l=<F>;@l=reverse(split(/\n/,$l));close(F);open(F,">$_");print F "@l";close(F);}' bar
real 0m0.112s user 0m0.050s sys 0m0.047s
[steve@laptop ~]$ time python -c 'import sys
for f in sys.argv[1:]: l = open(f).readlines(); l.reverse(); open(f,
"w").writelines(l)' bar
real 0m0.073s user 0m0.043s sys 0m0.028s
[Don't try this in a directory where you have files valuable to you: it reverses the lines in the files whose name you provide on the command line. On the other hand, if you run it twice the files are back to their original stage (I think :) ]
When I read this description, i immediately tried to write the equivalent in python. In my enthusiasm, I didn't bother to verify what your one-liner /actually/ does -- it reverses the order of the lines in the file. A cursory glance led me to believe it reversed every /character/ of every line in the file and I came up with:
python -c "import sys for fl in sys.argv[1:]: rev = ''.join([ l[-1::-1] for l in open(f).readlines() ]); open(f, 'w').write(rev + '\n')"
...which is butt ugly, but did just that.
You'd be surprised how may of these semi-complex one-liners I've used to get Real Work done, both personally and for clients (e.g. I remember when the client wanted a quick list of all the IP addresses that had hit his site more than 50 times from logs spread over a thousand files, and the list of URLs they had hit). Yup, you got it -- Perl one-liner!
Sure, I believe that, though it'd be naive to assume that it won't be possible with python too.
I must admit there's a downside to this: if you use Perl you can't charge the client a bomb for developing an application which will do the same task in 1000 lines of beautifully indented and commented code -- not because you can't write that in Perl, but because it seems such a waste when one line is enough ;)
Well, that's really up to you. If I ever have to write the same one-liner more than say 5 times, I make a script out of it; and the scripting/programming language doesn't matter.
cheers, - steve
On Wed, Aug 19, 2009 at 12:44 AM, RSCL Mumbairscl.mumbai@gmail.com wrote:
Hi,
I use AutoIT to develop small windows applications which make life simpler.
AutoKey seems to be a drop in replacement for AutoIT: http://autokey.sourceforge.net/
Here are some sample scripts : http://code.google.com/p/autokey/wiki/SampleScripts