[jawsscripts] Re: Finding and clicking the string from the desired window.

  • From: Jackie McBride <abletec@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Thu, 6 Aug 2009 06:51:29 -0700

Jitendra:

U r correct that this is from band in a box. I hope u enjoy the
scripts! Separator is actually declared in the bbw.jsm file, though
probably would fit better in the .jsh 1.

GetListOfObjects is an fs-built-in function.

Ok, Mr. Moderator, please forgive this, but Jitendra, or any1 else for
that matter, if u like making music, then I invite u to join the
midimag list by sending an email to
midimag-subscribe@xxxxxxxxxxx

I'm the list mom on there & it's a great list. Although the name says
midi, we discuss all aspects of making electronic music. Folks on
there range from rank hobbyist amateurs like me to pros on record
labels.

On 8/6/09, Jitendra <jeet.invincible@xxxxxxxxx> wrote:
> Ok, thanks and btw, you are correct, there should be another separator,
> as sometimes, there is a string "click me", and in that case where space
> is used, those will come as 2 different items in the list, but clicking
> any of them would make the same thing.
> it seems that the code you have given is from the band in a box scripts,
> if yes, I have them and can see the header file as well, and if not,
> where you declared those variables found in the code?
> what are you talking about, the function "GetListOfObjects?
> Thank you, Jitendra.
> You wrote:
> Space is not a great separator, Jitendra. The reason is that if u have
> a string "click me", it's 2 words, & u don't wanna click the word me.
> Try to find another separator, e.g, newline, tab, etc.
>
> When I can, I try to use a list of object names rather than strings.
>
> However, here is some code that might do similarly to what u want.
> Note that separator has been defined in the header file as "\007"
> Basically it walks the window, collecting the list of the desired
> items, & then displaying them in a list.
>
> Void Function FindButtons (string track)
>
> var
> handle wh,
> handle HTrack,
> string windowname,
> string list,
> string SelectedItem,
> int item
>
> let windowname = track + " Track"
> if (StringContains(GetWindowName(GetRealWindow(GetCurrentwindow())),
> "DirectX Plugins")) then
> ;in synth settings dialog, 1st combo is to select synth
> let wh = FindWindow(GetTopLevelWindow(GetCurrentWindow()), "", windowname)
> if (wh) then ;wh
> let HTrack = wh
> MoveToWindow(wh)
> LeftMouseButton()
> let wh = GetFirstChild(wh)
> let wh = GetLastWindow(wh)
>
> while (wh && !IsKeyWaiting ())
> let wh = GetPriorWindow(wh)
> pause()
> if (GetWindowSubtypeCode(wh) == wt_button) then ;button
> let list = list + GetWindowName(wh)+separator
> endif ;button
> endWhile
> PcCursor()
> let item = DlgSelectItemInList (list, "Synth Settings Dialog", 0, 1)
> let selectedItem = StringSegment(list, separator, item)
> let wh = FindWindow(HTrack, wcButton, selectedItem)
> if (wh) then ;handle of the button was found?
> MoveToWindow(wh)
> LeftMouseButton()
> endif ;handle of the button was found?
>
> endif ;window was found, we're in synth settings
> else ;not in synth dialog, whole thing is invalid
> say(msgErr4, ot_message)
> endif;synth dialog
> PcCursor()
> return
> EndFunction
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
>


-- 
Change the world--1 deed at a time
Jackie McBride
Check out my homepage at:
www.abletec.serverheaven.net
& please join my fight against breast cancer
<http://teamacs.acsevents.org/site/TR?px=1790196&pg=personal&fr_id=3489>
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
http://www.freelists.org/list/jawsscripts

Other related posts: