Sign in to follow this  
Followers 0
Allasso

bash shell to autoit conversion

7 posts in this topic

Hello,

I have a fairly comprehensive unix bash script that I would like to adapt to using in windows. Are there any tools available that would help in the conversion to an AutoIt script?

I have done quite a bit of googling and have read the faqs here but have not found anything on that.

Thank you,

Allasso

Share this post


Link to post
Share on other sites



Hello,

I have a fairly comprehensive unix bash script that I would like to adapt to using in windows. Are there any tools available that would help in the conversion to an AutoIt script?

I have done quite a bit of googling and have read the faqs here but have not found anything on that.

Thank you,

Allasso

How about just running it in CYGWIN instead?

>_<


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

How about just running it in CYGWIN instead?

>_<

Now the long version...

I have written a search engine that is part of a package that is a archive of HTML files. This is something peculiar to the community I work in, and the archive is distributed on a DVD and designed to be used on the local machine without a web server. The search engine, which uses a shell script I have written in bash, is all part of the package, and is designed to just be usable "right out of the box", when the archive is loaded on someone's computer. I have it up and running just fine on Mac OSX machines. However there are a few folks here that use Windows machines, and I would like it to be available to them also.

My goal, originally, as I said is for it to work "right out of the box". I didn't want each user to have to download and install cygwin. I am not discounting it, but for me, it would be ideal if I just had a script that ran on Windows just the way it is.

Thanks for your input, and I am not closed to any suggestions.

Allasso

Share this post


Link to post
Share on other sites

There aren't any automated tools that will help you in the process of converting this that I know. Might end up having to do it by hand.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

There aren't any automated tools that will help you in the process of converting this that I know. Might end up having to do it by hand.

Okay, thank you. It looks like it may not be that bad anyway. I have been looking through the autoit help files and it seems pretty simple to learn. The help files are really good. There are a number of common GNU tools ported to Windows, eg grep (grep.exe), sed (sed.exe), etc, that are the heart of the script, so maybe I can use those in the script in a way that is similar to what I am used to. We'll see....

Allasso

Edited by Allasso

Share this post


Link to post
Share on other sites

How about just running it in CYGWIN instead?

>_<

One thing I didn't mention with my scenario, is that I am depending on the script being wrapped as an executable. The reason is that the trick that initiates the script from the browser is a window.open statement in javascript, which is called when the user submits the search. This launches an "open with...(application)". I tell it to open a peculiar (made up) mime type, and if the user chooses my script (which is wrapped as an executable) and selects "always use this blah blah..", then from then on, initiating a search will always run the script.

Firefox (and afaik, any other browser) will not allow you to choose a shell script. On the Mac, I used Platypus to wrap the script. If this is also the case on Windows, then the script would have to be made into a standalone executable. This is what drew me to AutoIt in the first place.

Share this post


Link to post
Share on other sites

Would it not be better to run a webserver and have this interpret the browser's request as a GET or POST? That is the standard way of implementing that kind of functionality. You could use a Linux virtual machine, then you need not convert your existing script. Plus, if the webserver was hijacked the damage would be limited that way.

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  
Followers 0