Automation, AutoIt and AutoHotKey

Want to move your code and projects to LiveCode but don't know where to start?

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller

Post Reply
lpm@lpmmail.info
Posts: 7
Joined: Tue May 21, 2013 9:10 pm
Location: DENMARK
Contact:

Automation, AutoIt and AutoHotKey

Post by lpm@lpmmail.info » Tue May 21, 2013 10:09 pm

Hello all! I am new to LC. I am at present using AutoHotKey and AutoIt as Windows desktop automation tools. They are really good at don't the job, but as I and my programming skills develops I run short and need a more all purpose framework as LC. As newcomer I do have some questions, please bear with me:

Q: Can LC be used to send keyboard shortcuts like Ctrl C and like?
Q: Can I define shortcut keys to be used in LC stacks?

Example:
In AutoIt, I made a "data collector" GUI that uses keyboard shortcuts to copy data from other applications into a form that later stores the data in my CRM by using keyboard shortcuts and the stored variables.
The "copy from application" process in my 'data collector' goes like: Chortcut X ---> Sends Crtl C of the selected area to clipboard and retrieves it into variable X. The "store to CRM" processes are in reverse with "Crtl V" to send variable X content to database form field.
I know that there might be several ways to achieve the above in LC, and I'll learn them eventually, For now, I am just interested in finding out if I can convert to LC and how I do it with the least amount of initial effort.
/Lars
DK
www.lpmathiasen.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5132
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Automation, AutoIt and AutoHotKey

Post by Mark » Tue May 21, 2013 11:05 pm

Hi Lars,

I think you can run a compiled AutoIt script from within LC the same way you'd start an app.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

lpm@lpmmail.info
Posts: 7
Joined: Tue May 21, 2013 9:10 pm
Location: DENMARK
Contact:

Re: Automation, AutoIt and AutoHotKey

Post by lpm@lpmmail.info » Fri May 24, 2013 1:06 pm

Ok. Thanks - But can LC be used to make desktop automation? Without using any other application like AutoIt....

/Lars
/Lars
DK
www.lpmathiasen.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5132
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Automation, AutoIt and AutoHotKey

Post by Mark » Fri May 24, 2013 1:23 pm

Hi Lars,

You can't do that with the current feature set of LiveCode. You'd need an external, a VBScript, AppleScript (GUI Scripting), or AutoHotKey or QuickKeys. I created something for Mac, which allows me to send mouse clicks to other apps, but I had to use Objective-C for this. I will probably ask my assistant to make a similar something for Windows.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

lpm@lpmmail.info
Posts: 7
Joined: Tue May 21, 2013 9:10 pm
Location: DENMARK
Contact:

Re: Automation, AutoIt and AutoHotKey

Post by lpm@lpmmail.info » Fri May 24, 2013 4:01 pm

Ok- Thanks!
/Lars
/Lars
DK
www.lpmathiasen.com

lpm@lpmmail.info
Posts: 7
Joined: Tue May 21, 2013 9:10 pm
Location: DENMARK
Contact:

Re: Automation, AutoIt and AutoHotKey

Post by lpm@lpmmail.info » Fri May 24, 2013 11:13 pm

Ok - Seems very complicated to use AutoIt or similar. I found a simpler system in Automa. Can I use LC with a Pyton API? I imagined something like using LC as the main system and Automa as a GUI handling system. Maybe by passing information and commands via command line, does this seems like an easier solution?

An other open source option is Sikuli. This one is in Java or Jyton.

/Lars
/Lars
DK
www.lpmathiasen.com

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5132
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Automation, AutoIt and AutoHotKey

Post by Mark » Fri May 24, 2013 11:31 pm

Hi Lars,

You can compile Python and call the compiled scripts from LiveCode, as you would with normal apps. You can also use the shell function to run Python scripts the same way you would from the terminal or DOS prompt. I haven't tried Automa and I don't know if you run it the same way as any Python script. I had a look at Sikuli recently, and I find it a bit limited, but it is interesting how it recognises patterns. You can use the shell function to run Sikuli.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

lpm@lpmmail.info
Posts: 7
Joined: Tue May 21, 2013 9:10 pm
Location: DENMARK
Contact:

Re: Automation, AutoIt and AutoHotKey

Post by lpm@lpmmail.info » Sat May 25, 2013 9:22 pm

Thanks a lot.
I'll try to make that work.

/Lars
/Lars
DK
www.lpmathiasen.com

Post Reply

Return to “Converting to LiveCode”