Control mouse and keyboard? Search screen for specific color

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Jordy
Posts: 32
Joined: Sat Feb 27, 2016 3:59 am

Control mouse and keyboard? Search screen for specific color

Post by Jordy » Mon Jul 04, 2016 8:05 pm

Anyone have any suggestions for the commands to control the mouse and keyboard?

Also wondering if there is a way to search the screen and use something like an "eyedropper" to check the color

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Control mouse and keyboard? Search screen for specific c

Post by Simon » Mon Jul 04, 2016 8:46 pm

Hi Jordy,
1st one is ...set the screenMouseLoc x,y
2nd Is ...type "Hi Jordy"
3rd is ... put the mouseColor

Not sure this is exactly what you were asking for.
Check them out in the dictionary.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jordy
Posts: 32
Joined: Sat Feb 27, 2016 3:59 am

Re: Control mouse and keyboard? Search screen for specific c

Post by Jordy » Mon Jul 04, 2016 9:09 pm

some good hints, dictionary says mouseloc can find or set the mouse cursor (which is what I was looking for). Would this limit to the satck or could it access the entire desktop

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Control mouse and keyboard? Search screen for specific c

Post by Simon » Mon Jul 04, 2016 9:15 pm

Be sure... it's screenMouseLoc
To answer your question, the whole screen.

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jordy
Posts: 32
Joined: Sat Feb 27, 2016 3:59 am

Re: Control mouse and keyboard? Search screen for specific c

Post by Jordy » Tue Jul 05, 2016 5:18 am

screenMouseLoc worked great, it will access the entire desktop.

I tried to use the click command to open IE but click wasn't working outside of the stack.

from dictionary on click command:
If the point is not within one of the application's windows, the click command has no effect. This means that you cannot use the click command to switch to another application.

Any suggestions to get around this?

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: Control mouse and keyboard? Search screen for specific c

Post by SparkOut » Tue Jul 05, 2016 6:41 am

http://forums.livecode.com/viewtopic.ph ... 5&p=101118 will help with Windows. You may be able to do something similar for other platforms

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9578
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Control mouse and keyboard? Search screen for specific c

Post by dunbarx » Tue Jul 05, 2016 3:36 pm

Hi.

Usually, we use the "launch" command to do what you asked for. In that way, the location of the application window is not important. Dictionary, please...

Craig Newman

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”