Jump to content
Sign in to follow this  
mariano

Autoit running on GNu/Linux !

Recommended Posts

mariano

Ok, I've already seen that Autoit was mever intended for other platforms than Windows. But....

I've been testing it with PClinuxOS (an user friendly distro) and Wine (not a windows emulator but very likely). Scite works like a charm, so does all of the GUI commands that I tried. As expected, those too close/dependant on the hardware fault, but not a big amount of them. Both compiled and interpreted scritps seem to be working fine. So these are my news:

As far as I tried, you can use Autoit under Linux!!!!!

Last, my own feature request (I know, there is already a different place for this and surely it will be not approbed): What about a new feature called "RunShell" or alike?. As it is for now you can not use bash-scripting from Autoit (or am I wrong?). These could tune it into a powerfull developer tool under Linux as well.

Share this post


Link to post
Share on other sites
mariano

No RunShell. AutoIt = Windows and will never ever be ported.

Perhaps you've missunderstood due to my limited english skills. Didn't I say "I've already seen that Autoit was never intended for other platforms than Windows" and "you can use Autoit under Linux" ?. Autoit=Windows, that is out of the question and I'm aware of it, man. What I mean is exactly what I wrote: you can USE it under GNU/linux. Nobody has requested a port but a simple command, a interface that could be an open door to the internals of such systems. I guess that it should be clear that a port is a different thing by far.

Anyway my intention is not arguing. If I were a Linux fanatic I wouldn't be using Autoit. I'm just an open mind and It just happened that I gave it a try and worked much better than suposed. This info could be important for some people, obviously not you but who knows....

Cheers.

Share this post


Link to post
Share on other sites
Richard Robertson

The only way an executable file can interact with the Linux shell is by being compiled with code to specifically interact with it. Same goes for any other OS. There is no generic way to make system calls.

Share this post


Link to post
Share on other sites
mariano

Wow! this happened to be a very active forum. Nice!

The only way an executable file can interact with the Linux shell is by being compiled with code to specifically interact with it. Same goes for any other OS. There is no generic way to make system calls.

But that's not what I asked. No need for real system calls, just some way of invoquing bash. If provided it would be possible to take total control of the alien system from that single command. I ignore how difficult could be to include it but I do believe that there is nothing imposible in the end. And this is the funny thing: if denied as I supose, perhaps I'll try to do it by myself in some months from now and post it here as an UDF, plug-in or whatever could be.

Many people (myself included) know that AutoIt works on Linux.

You'b better have started telling me so, my friend!. I didn't know that. Mine was not such a a great new after all muttley

Share this post


Link to post
Share on other sites
mariano

...perhaps I'll try to do it by myself in some months from now and post it here as an UDF, plug-in or whatever could be.

Already done!

All you need for recoverying faulty commands is replacing them for your own linux shell scripts/commands.

Want to test it? create a new empty bash script and fill it with:

#!/bin/sh

echo "Bash: Start"

kdialog --msgbox "This pop-up was called from Bash." &

xterm

echo "Bash: Ended"

Let's name it "bashscript.exe" and set it executable, start Autoit and type this single script:

RunWait("D:\projects\bashscript.exe", @ScriptDir)

Notice that you'll need to replace the path by the yours. Both scripts are in the same folder in my example.

When you run the Autoit script you'll get a testing pop-up run from Linux and a Xterm.

You've got the power!

Tested running Wine 0.9.58 and TMLinux2007 (PClinuxOS in spanish).

Many thanks to "Cladan" who had posted all the info I needed at http://forum.winehq.org/viewtopic.php?t=14...f0551643d95fd6b

Post here your complains or let me know by email muttley

Share this post


Link to post
Share on other sites
Richard Robertson

That's not what the OP was asking for though. The OP was asking for a function that calls things from the command interpreter.

Share this post


Link to post
Share on other sites
mariano

(Richard, I'm sorry if you were not talking to me; I wonder what an "OP" is)

Actually the "function that calls things from the command interpreter" is as familiar as "Run" or "RunWait"!

What I meant before is that there is no need for the "RunShell" thing, cause it is already possible to call a linux script with Autoit as is, hence no need for complicated hacking into its code, etc. That's what I found out and what my example is intended for. If you use Autoir in Linux+WINE and some commands don't work for you, just replace their functionalities by your own bash scripts. It's great that with a little extra-effort, I (anyone) can make portable applications!

Surprisingly there are things that already go fine, as mouse management. Others need some home-made work under linux. For ex., @IPAddress1 doesn't return the correct value. But now we know how to solve it: "RunWait" your bash script as said, instead, perhaps such a simple one as:

#!/bin/sh

ifconfig|grep "inet addr"

Now one step beyond...

If anyone else is willing to make some bash scripts we could join our efforts to build something like a wine-alternate-functions collection. Anybody interested?

By the way, I hope that those not using KDE have already noted that kdialog should not be avaliable using other window managers. Please replace it for the proper command under your WM... of forget it: that was just a toy.... you've already got a shell from Autoit!!!

Share this post


Link to post
Share on other sites
James

(Richard, I'm sorry if you were not talking to me; I wonder what an "OP" is)

Original Post(er).

If anyone else is willing to make some bash scripts we could join our efforts to build something like a wine-alternate-functions collection. Anybody interested?

AutoIt is for making your life eaiser. The one time, I have seen a useful function or script which writes its own batch script is _SelfDelete(). If you go into Linux and have to write the bash scripts yourself (FileWrite() etc) to copy the script, knowing that @IPAddress1 does not work, then you have caused more problems for yourself.

Sure, you can ignore all of us and hopefully prove me and others wrong then go for it, but AutoIt will never (not so long as Jon and team are deving) will AutoIt support Linux systems practically or as the "mother tongue".

Edited by JamesBrooks

Share this post


Link to post
Share on other sites
mariano

James:

I agree: Autoit is for making life easier, that's why I love it and prefer it. You're right also about those kinds of scripts: self-writing scripts and things like that are not unusual in Linux world.

I don't need to replace each single command in Autoit, only a few when needed. For example, if you provided the right paths, "FileWrite" and related work like a charm, so does GUIs and others. I was talking about a few things perhaps too dependant of the hardware, like @IPAdress1. Easy to find workarounds now.

"Autoit will never support Linux systems as mother tongue". I know and I knew from the beginnig as I stated in my first post. Why can't some of you believe that I am already aware of that?. I'm afraid that the power of my proposal is not being fully understood, cause you keep on warning me about "system internals", "Windows world", "recompiling"...

Well, I did what I had to do: tell the others about this. It's a pity but never mind if no one cares. The fact is that I've already started making my first portable app with a very little effort, it's working nicely and that will be a persistant plus for my creations. IMHO it's worth to write some more lines if you get such an advantage but I don't want to make me and others waste time explaining the same thing more than once, so thank you for your comments; just let's do it in each one's way and joy for everyone muttley

Share this post


Link to post
Share on other sites
Richard Robertson

We listened, and we told you what we know. I think your problem is that you don't understand.

I also want to point this out. If AutoIt is running through Wine, or any other Windows emulator/mini kernel, wouldn't the call to the command shell be stopped? The only shell AutoIt would be able to access would be the Wine shell. Try thinking about program layers too.

Share this post


Link to post
Share on other sites
mariano

We listened, and we told you what we know. I think your problem is that you don't understand.

I DO understand and I've got no problem.

If AutoIt is running through Wine, or any other Windows emulator/mini kernel, wouldn't the call to the command shell be stopped? The only shell AutoIt would be able to access would be the Wine shell. Try thinking about program layers too.

Absolutely not. From Autoit you CAN access the linux shell. Didn't you checked it before blind posting?. No you didn't; it's clear from your words that you have not tried my example, nor ever worked with Wine. Too lazy for trying? "Mini-kernels" and "program layers"? Who's the one that does not understand some points? More, have you got any particular interest in people not trying by theirselves what I proposed?

My example is here to stay, so that everybody can test it and decide weather it's me or you who is right, hehehe.

A special gift for unbelievers:

post-38072-1216610282_thumb.png

Share this post


Link to post
Share on other sites
Richard Robertson

No, I do not work with Wine. I never will because Wine is made for idiots who can't run programs in the correct shell. If you have a Windows application, run it in Windows, and Linux to Linux. Not Windows on Linux.

I did not blindly post. I'm telling you that AutoIt cannot directly interact with bash. If you want to prove me wrong, do it without an intermediate file. That script is NOT AutoIt.

What you proposed is a hack. It is not a true interaction between AutoIt and the shell.

Share this post


Link to post
Share on other sites
mariano

No, I do not work with Wine.

It was clear. The question that arises here is how can you argue a single word about what you ignore.

I never will because Wine is made for idiots who can't run programs in the correct shell.

No comment. You've self-described here.

If you have a Windows application, run it in Windows, and Linux to Linux. Not Windows on Linux.

Is this an advice, a cosmical law, or just means that you are too limited for imagining new horizonts?

I did not blindly post.

Posting about issues that you ignore and never will to learn is not blind posting. I see....

I'm telling you that AutoIt cannot directly interact with bash. If you want to prove me wrong, do it without an intermediate file.

This must be one more "cosmical law". The fact is that it works like a charm.

That script is NOT AutoIt.

The bash one? It isn't, indeed, smart boy. It's a linux script as I said, thank you muttley

What you proposed is a hack. It is not a true interaction between AutoIt and the shell.

I can run bash from autoit and viceversa through Wine. What a "true" interaction should be under "cosmical laws"?

Share this post


Link to post
Share on other sites
Richard Robertson

Say what you want. You are using AutoIt in a way it wasn't designed.

I'm leaving this thread.

Share this post


Link to post
Share on other sites
aromo

Say what you want. You are using AutoIt in a way it wasn't designed.

I'm leaving this thread.

You should have long time ago, bud!

Mariano, I thank you for finding out how to make bash calls from AutoIt scripts. I write (Windows) AutoIT scripts at work, but at home I have Ubuntu. I just love AutoIt and wanted to write (Linux/Wine) AutoIt scripts at home. You just told me how!

The other option that I had was learning Gambas, but I was lazy.

If you still want help writing bash scripts, give me a shout, I'm willing to help you.


[size="3"][font="Verdana"]Doing more with less!![/font][/size]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×