forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Record and Playback - How to use this?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Dec 17, 2016 6:06 am    Post subject: Record and Playback - How to use this? Reply with quote

I have a section of code that I need an automated way to "run" the selection and processing buttons. ClearWin provides both record and playback functionality. I'm having some trouble getting it to work properly.

To get the file required, I start the record function immediately prior to the window being created, then close the recording when the window closes. The listing below is what is in the recording file.
Code:
<AWAIT,MAIN/5>
<LEFT_MOUSE_DOWN,LS001/5,6,42,1>
<LEFT_MOUSE_UP,LS001/5,6,42,0>
<LEFT_MOUSE_DOWN,LS002/5,30,72,1>
<LEFT_MOUSE_UP,LS002/5,31,71,0>
<LEFT_MOUSE_DOWN,LS003/5,27,24,1>
<LEFT_MOUSE_UP,LS003/5,27,24,0>
<LEFT_MOUSE_DOWN,BT001/5,59,13,1>
<LEFT_MOUSE_UP,BT001/5,59,13,0>
<MENUSELECT,MAIN/5,300>


To then use this data, the code runs up to the point at which the window will be created, opens this file for playback, and proceeds to build the window.

Three list selections are certainly made from the playback file, then the final button to process the selected data is "pressed". But the final button "press" doesn't occur, although the button is selected. Looking at this window, I can see all the selections are properly made. But I have to click this button to get the window to close.

Is the ordering of the opening of the window and/or the creation of the window the playback file is targeting critical? I can find no examples on the Forum on how to use this/these features, and can really use your help.

Thanks,
Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Dec 17, 2016 9:25 am    Post subject: Reply with quote

The first thing that I would check is that the window position at record time is the same as that at play back time.
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Dec 17, 2016 3:29 pm    Post subject: Reply with quote

Thanks, Paul. I very carefully re-created the recording file, making sure no windows were moved.

When I played the file back, the results were the same. And, the window was precisely in the same position as when it was created a few moments prior.

I am not explicitly using %ww to set the window initial parameters. The code snippet is:
[code]
k = winio@('%ca[Quadrangle Selection]&')
K = winio@("%^6bt[Apply] Use the quad you selected below&",QUAD_SPECIAL_DONE) ! returns 4
k = winio@('%ff%nl%6.1ob[invisible]&')
k = winio@('%rjState %cb%^6.4ls%cb&',
$ STATE_NAME_EXTRACTED,MAX_STATE_EXTRACTED,
$ ISEL_STATE,QUAD_SPECIAL_STATE_SELECT)
k = winio@('%rjQuadrangle Name %cb%^20.10ls%cb&',
$ QUAD_NAME_IN_STATE_EXTRACTED,max_in_state,
$ ISEL_QUAD,QUAD_SPECIAL_QUAD_SELECT)
k = winio@('%rjMap Scale %cb%^20.10ls%cb&',
$ MAP_SCALE_IN_QUAD_EXTRACTED,max_in_state,
$ ISEL_SCALES,QUAD_SPECIAL_SCALE_SELECT)
K = WINIO@('%ff%nl%^6bt[New] Add a new quad&',QUAD_SPECIAL_NEW) ! returns 1; DEFINE A NEW quad, ADD TO FILE AND EXIT
k = winio@('%ff%nl%`6bt[Cancel] Quit with no selection&') ! returns 3
k = winio@(' ')

This section is being called from another, active window, if that were to make a difference.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Sat Dec 17, 2016 6:34 pm    Post subject: Reply with quote

Bill

If you can send me your code then I will take a look at it when I can.
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Dec 17, 2016 6:56 pm    Post subject: Reply with quote

Thanks, Paul. I'll put something together (much shorter than the original) and post a link here.
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Sat Dec 17, 2016 8:44 pm    Post subject: Reply with quote

Here is the link to the Project file.

https://drive.google.com/file/d/0B5fbkRqVCqoMYnVPdHAxVDg1N00/view?usp=sharing

It's about as trimmed down as I could make it. It exhibits the same behavior as I see in my full code.

Thanks for taking a look.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
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