SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
mouse support

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
mouse support
Author Message
Henry Harris



Joined: 27 May 2005
Posts: 1

Post mouse support Reply with quote

Is there anyway 247 can script my mouse movements? I can't figure out a way to checkmark boxes using keystrokes. Help please

Fri May 27, 2005 5:42 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7975

Post Re: mouse support Reply with quote

1. If you send a space it will check or uncheck the active checkbox. Sending Tab will move the focus to the next control.

2. You can also script mouse using the 24x7 Macro Recorder. Run this tool records all operations and save them as .MCS file. Schedule the .MCS file as instructed in the on-line help.

3. A more complicated but much better way is to use WindowsGetChild and similar commands to find checkbox objects and then use WindowsSendMessage to programmatically check them. Best of all this method can be applied to any graphical application including these that do not have input focus or even run hidden.
Using WindowsXXX commands requires some knowledge of how Windows works and also basic knowledge of Windows events. A Windows Spy utility which is part of any C/C++ development environments can be a great help in identifying window controls and their order.

Here is an example script

Dim window_handle, number
Dim button_handle, number
Dim checkbox_handle, number

// first find the required window
WindowFind( "Some Window Caption", window_handle )
// get handle of the first control which is a button in this exmaple
WindowGetChild( window_handle, button_handle )
// get handle of the next control which is a checkbox
WindowGetNext( button_handle, checkbox_handle )

// Check the checkbox
WindowSendMessage( checkbox_handle, 241, 1, 0 )
// Click the button
WindowSendMessage( window_handle, 273, 0, button_handle )

This may first look complicated, but once you get used to it, it will not be very difficult.

: Is there anyway 247 can script my mouse movements? I can't figure out a way
: to checkmark boxes using keystrokes. Help please

Fri May 27, 2005 6:16 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.