Source language: Translate to:

sendkeys to click on a button within a pub

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

sendkeys to click on a button within a pub

Postby cp4w » Wed Jun 22, 2011 5:00 pm

I know it was discussed but I forgot how.

I want to programmaticly click on a button from code runnning in a pub( it should be in the page enter section.

How is it done?
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Re: sendkeys to click on a button within a pub

Postby dpayer » Wed Jun 22, 2011 6:15 pm

shx wrote:I know it was discussed but I forgot how.

I want to programmaticly click on a button from code runnning in a pub( it should be in the page enter section.

How is it done?


If all the code for the button click was in a subroutine you could simply call the subroutine as needed.

David P
User avatar
dpayer
 
Posts: 1380
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Postby cp4w » Wed Jun 22, 2011 9:11 pm

i know, but was looking for a way to click the button
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Postby HPW » Wed Jun 22, 2011 11:18 pm

Several options:

Focus the object and sendkey a ENTER.

Define a shortcut and sendkey it (Not tested)

When you want to see the real mousecursor OnClick you might use hpwAutoIt.

Edit later: Define a shortcut and sendkey it does not work.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Neosoft Support » Thu Jun 23, 2011 10:39 am

This should work:

SetMousePos "100" "100"
ClickMouse

Make sure SetMousePos places the cursor on top of the button you want to click.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby cp4w » Thu Jun 23, 2011 2:53 pm

As Dave said, this script works

GetObjectInfo "PushButton1" "Left" "[L]"
GetObjectInfo "PushButton1" "Top" "[T]"
SetMousePos "[L]" "[T]"
ClickMouse

Ciao
Licia
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY

Postby cp4w » Thu Jun 23, 2011 9:00 pm

thanks,
i just thought that if you define a hotkey for a button that there was a way of clicking the button by doing a sendkey.
cp4w
 
Posts: 533
Joined: Sun Apr 03, 2005 4:37 pm
Location: Great Neck, NY


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 3 guests

cron