Mimic Keyboard Input - Background Process
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Mimic Keyboard Input - Background Process
Hello,
I am trying to build a stack that would mimic a keyboard with other actives apps. Basically, if the cursor were placed on a field on a web page of a browser for example, I could use my stack to fire off a macro that would fill the field with text. Obviously, the browser would be the active app at that point, not my stack. Can LiveCode be active as a background process?
I'm not sure if this is even possible with LiveCode, is it?
Thanks in advance for your help.
Glen
I am trying to build a stack that would mimic a keyboard with other actives apps. Basically, if the cursor were placed on a field on a web page of a browser for example, I could use my stack to fire off a macro that would fill the field with text. Obviously, the browser would be the active app at that point, not my stack. Can LiveCode be active as a background process?
I'm not sure if this is even possible with LiveCode, is it?
Thanks in advance for your help.
Glen
Re: Mimic Keyboard Input - Background Process
Not sure about LiveCode (guru's can chime in at any time), but if you are using Windows, either of these freebies should do what you want:
AutoHotKey
http://www.autohotkey.com/
AutoIt
http://www.autoitscript.com/autoit3/index.shtml
AutoHotKey
http://www.autohotkey.com/
AutoIt
http://www.autoitscript.com/autoit3/index.shtml
Re: Mimic Keyboard Input - Background Process
Hello, I am aware this is an old post, but it sums up my question as well except for the fact I am trying to move away from autohotkey entirely or at least partially. Can LiveCode perform send commands, activate window ____, copy text to a variable, and such. I much rather use LiveCode as my as my main base than autohotkey as I find it more professional it seems and good support.
Thanks
Thanks
Re: Mimic Keyboard Input - Background Process
LiveCode certainly can help with *some* of those sort of things (such as storing a vbscript to "do" something, such as "sendkeys"). Interacting directly with other applications by manipulating their controls is not LiveCode's forte though. Where LC really does score is in web interaction. Instead of faking keystrokes to fill in a web form and click a submit button to post the data, you can create the post directly in LC and submit.
For instance http://forums.livecode.com/viewtopic.php?f=7&t=16602
For instance http://forums.livecode.com/viewtopic.php?f=7&t=16602
Re: Mimic Keyboard Input - Background Process
Thanks for replying SparkOut, I am pretty familiar with autohotkey and I would say the number one thing I would need done is basically screen scraping, gathering data from a highlight-able text field and storing as variable so LiveCode could use it. Would VB Script be able to achieve this that you know of.
Thanks for the link also.
Thanks for the link also.
Re: Mimic Keyboard Input - Background Process
I guess it *could* but you would be better off sticking with what you know if you are going to go the 3rd party route.
What you could do better in LiveCode is to "get" the URL (directly - without using a browser at all) and then parsing the returned page data to extract the variable information you need.
What you could do better in LiveCode is to "get" the URL (directly - without using a browser at all) and then parsing the returned page data to extract the variable information you need.
Re: Mimic Keyboard Input - Background Process
That is a great idea, unfortunately I am working with standalone programs, not URLs. I assume that LiveCode can parse a CSV file so I could just have LiveCode activate an exe file of hotkey and then have hotkey send data to a csv file, then have LiveCode read the csv file to use the data.
Re: Mimic Keyboard Input - Background Process
Yes, that's the way I think you'd need to go. Some similarities with this approach: http://forums.livecode.com/viewtopic.ph ... 18#p101118
Re: Mimic Keyboard Input - Background Process
Ok thanks SparkOut, I will try to limit the use of hotkey if possible. You mentioned VBScript, by chance you have a suggested link where I can learn this aspect. Thanks for help.
Re: Mimic Keyboard Input - Background Process
I guess it depends to some extent what applications you are using and what objects they expose to windows scripting control via vbscript.
An example is here http://opencodeproject.com/2012/01/29/a ... -vbscript/
Whether you can achieve what you wish using vbscript interaction with your applications called from LiveCode I can't really say.
Googling briefly should give you many vbscript resources, if you do manage to go down this route. Good luck!
An example is here http://opencodeproject.com/2012/01/29/a ... -vbscript/
Whether you can achieve what you wish using vbscript interaction with your applications called from LiveCode I can't really say.
Googling briefly should give you many vbscript resources, if you do manage to go down this route. Good luck!