How to insert text in active window

G

Guest

I'm trying to write a simple app that runs in the background on Pocket PC and
inserts static string into a textbox control when a specific form is modal.
I have no idea how to do this on a pocket pc compact framework device. Any
ideas at all appreciated.Thanks, Jim
 
P

Paul G. Tobey [eMVP]

There are various key sending methods on OpenNETCF Smart Device Framework
(SDF), www.opennetcf.org. That's how I think you should get this ability.

Paul T.
 
G

Guest

Thanks Paul - the sendkeys method from opennetcf has been working well so
far. I'm using FindWindow from coredll.dll to identify the window and that
working ok too. My next challenge is how to identify a URL in the IE address
bar. Any ideas?
Jim
 
G

Guest

Paul - I posted this as a new question today - here it is.
I'm trying to write an app that launches when mobile IE is on a specific web
page. I can use a Timer and FindWindow (coredll.dll) to know when IE is
running and what the Caption is but I need the current URL. Is there a
function that can do this or maybe see the DOM of the current mobile IE web
 
P

Paul G. Tobey [eMVP]

Well, you won't be able to *launch* when the address is some given random
value. No, I don't believe that you can, unless *you* are the host of the
IE browser control, do anything via ordinary means to poll the address where
it's pointing. If you can figure out, using Remote Spy, what EDIT control
is the URL editor, you might be able to use FindWindow or something similar,
again, and a timer to poll the contents of the edit control.

I still don't understand the 'why' of this, however...

Paul T.
 
G

Guest

Paul - The "why" is because I'm trying to write an app that inserts text such
as username/password and other custom data into some of the forms and web
mobile apps we use in my organization. Sendkeys and FindWindow are adequate
for form apps but I'm unable to positively identify a web login page (window
caption not reliable) before using sendkeys to insert username,password,
ENTER. I don't see any web DOM properties/handles when using Remote Spy.
 
P

Paul G. Tobey [eMVP]

No, you won't see any DOM stuff. Spy is like Spy on the desktop. It shows
window messages. You should be looking at this like the EDIT control where
the URL is shown as another text field that, instead of sending keys to, you
want to get the text from.

You're sure that you wouldn't be better off to write your own browser
program specifically to handle your internal pages? You'd just wrap the
WebBrowser control, set the page that it jumps to when launched to the right
page and use the messages sent by that control to its owner to monitor when
someone tries to leave the site.

Paul T.
 
G

Guest

Thanks Tobey - It turns out findwind only handles to level windows but it
might be possible to find the top and then iterate through the children and
checking their text by using getwindow and getwindowtext. Regarding PIE, the
combox box seems to remain visible in remote spy even when in full screen
mode.
Jim
 
P

Paul G. Tobey [eMVP]

Then all you have to know is what the 'right' text is? This really sounds
to me like you'd be better off building a browser into your application...

Paul T.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top