Ask a Question related to Macromedia Director Lingo, Design and Development.
-
W. Locke Morgan #1
Buddy API - Sending a keystroke
Hey,
I got Buddy API and am using the following method to send stuff to an
outside App.
on sendStuff me
step1 = baActivateWindow(getAt(theWin, 1))
baWaitForWindow(getAt(theWin, 1), "active", 300)
if step1 = 1 then
step2 = baSendKeys("{ENTER}")
if step2 = 0 then
step3 = baSendKeys(theMsg)
if step3 = 0 then
step4 = baSendKeys("{ENTER}")
if step4 = 0 then
step5 = baActivateWindow(baWinHandle())
baWaitForWindow(baWinHandle(), "active", 300)
else
alert "mess up 4"&&step4
end if
else
alert "mess up 3"&&step3
end if
else
alert "mess up 2"&&step2
end if
else
alert "mess up 1"&&step1
end if
end
theMsg is a string and theWin is a list that has the correct windows
handler.
The problem is when this script is run, (for instance with WordPad being
theWin), WordPad only halfway comes up (it was minimized), nothing is
entered and the mouse locks. The only way to break out is to Ctrl+Alt+Del,
and then the movie moves on, having not accomplished its job.
Any ideas?
W. Locke Morgan
W. Locke Morgan Guest
-
Is there a right-indent tab keystroke?
In Quark, you can use option-tab to right-align just a portion of a line of text and not affect the text in that line that appears before it (such as... -
Feather Keystroke - Photoshop OS X
works like a charm, thanx macmanx -
help with keystroke navigation
i'm very new to director, and wondering if anyone can provide code for this: when the user presses spacebar, the playhead advances to the next... -
Sending a keystroke to another App
Hi, I am a psychology research assistant at a local university. I am using dirertor to present some video stimuli while the participants are... -
OT: how to send a keystroke to another program
On Sat, 2003-08-02 at 00:01, Andrej Hocevar wrote: Just an idea, There was a thread not long ago about a virtual keyboard. I don't know how it... -
Gretchen Macdowall #2
Re: Buddy API - Sending a keystroke
> > I got Buddy API and am using the following method to send stuff to an
It sounds like the input is getting sent before the window is ready to> Ctrl+Alt+Del,> > outside App.
> >
> > on sendStuff me
> > step1 = baActivateWindow(getAt(theWin, 1))
> > baWaitForWindow(getAt(theWin, 1), "active", 300)
> > if step1 = 1 then
> > step2 = baSendKeys("{ENTER}")
> > if step2 = 0 then
> > step3 = baSendKeys(theMsg)
> > if step3 = 0 then
> > step4 = baSendKeys("{ENTER}")
> > if step4 = 0 then
> > step5 = baActivateWindow(baWinHandle())
> > baWaitForWindow(baWinHandle(), "active", 300)
> > else
> > alert "mess up 4"&&step4
> > end if
> > else
> > alert "mess up 3"&&step3
> > end if
> > else
> > alert "mess up 2"&&step2
> > end if
> > else
> > alert "mess up 1"&&step1
> > end if
> > end
> >
> > theMsg is a string and theWin is a list that has the correct windows
> > handler.
> >
> > The problem is when this script is run, (for instance with WordPad being
> > theWin), WordPad only halfway comes up (it was minimized), nothing is
> > entered and the mouse locks. The only way to break out is to> > and then the movie moves on, having not accomplished its job.
> >
receive it. I'm not familiar with Buddy but I sell and support MasterApp
which has simulated keystrokes and mouse clicks, and that's usually the
reason input doesn't work. That, or sending it to the wrong window.
From the looks of your code you must have an exitframe loop that calls
sendStuff at each stage. If you don't, that's your problem. You have to
have some breathing space between each step. If you already do, then
instead of baWaitForWindow you could try calling some other function in
the exitframe that tells you when the window has finished drawing and only
advance to the next step after that.
There are a couple of example movies in the MasterApp section of downloads
that send a sequence of simulated input that might help - the Window
Message and Close Acrobat 4 dialog examples both send a sequence of input.
[url]http://www.updatestage.com/xtras/xtradownloads.html[/url]
Gretchen Macdowall
[url]http://www.updatestage.com/[/url]
Gretchen Macdowall Guest
-
W. Locke Morgan #3
Re: Buddy API - Sending a keystroke
Here: [url]http://www.mods.com.au/frameset.htm[/url]
"davidC" <crouchorama@bigpond.com> wrote in message
news:bjuoqv$30b$1@forums.macromedia.com...> What is Buddy Api?
> can you post a link to it
> it seems interesting
> david
W. Locke Morgan Guest



Reply With Quote

