Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Pass Text into other application at current cursor position...?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-29-2008, 10:28 AM
Senior Member
 
Join Date: Apr 2008
Location: Duesseldorf, Germany
Posts: 154
Default Pass Text into other application at current cursor position...?

Hello,

i'm wondering if it would be possible to insert a text at the current cursor position on the mobile device.Let's say, the user has opened a Pocket Excel and the cursor is on a certain area, e.g. a cell.

Can i then pass text to the cursor input that's not coming from the keyboard..? Or in other word, my application want's to send some text into the text input, to the current cursor position.

If so, how can this be achieved..?

kind regards

TWELVE
Reply With Quote
  #2 (permalink)  
Old 04-30-2008, 07:01 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Maybe you can achieve it by sending keyboard messages to Pocket Excel.
dzt's library should help you: http://www.basic4ppc.com/forum/additional-libraries/384-useful-library.html
Reply With Quote
  #3 (permalink)  
Old 04-30-2008, 07:49 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Ioannina, Greece
Posts: 356
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

I confirm, it can be done. Look at post #8
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #4 (permalink)  
Old 12-02-2008, 08:46 PM
Junior Member
 
Join Date: Jun 2007
Location: South Africa
Posts: 42
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Dzt,
I am trying to send some info to Excel on a desktop aplication, but it does not seem to work. It works for the calculator, but no other program.
can u please have a look and see why the code doesn't work
I think it may have something to do with the name, I have tried "Microsoft Excel" also no go.
I looked in Taskmanager for the application name, is there a better method
Even in the test program the second Desktop Demo button does nothing
I would like to transfer somthing like 12.005 plus a carrage return CHR(13)
taking the cursor to the next cell in Excel
Please note that this is for a desktop application.
I am using dzHW-3 Dll's copied into the samples directory and the library directory, i even tried remove and add object to make sure i am using the correct LIB.
Thanks Friedrich
Attached Files
File Type: sbp test to excel.sbp (1.6 KB, 12 views)
Reply With Quote
  #5 (permalink)  
Old 12-02-2008, 09:11 PM
Junior Member
 
Join Date: Jun 2007
Location: South Africa
Posts: 42
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Dzt
How would i use the following command and analize the result, or am I going the wrong way
r = FindWindowLike(hWnds(), 0, "Microsoft Excel*", "XLMAIN", Null)
Returns: All the windows having window text that begins with "Microsoft Excel" and that contains class name "XLMAIN"
Thanks Friedrich
Reply With Quote
  #6 (permalink)  
Old 12-03-2008, 06:54 AM
Junior Member
 
Join Date: Jun 2007
Location: South Africa
Posts: 42
Awards Showcase
Beta Tester 
Total Awards: 1
Default

hi Everyone
I have found that it is directly related to the name
if i use dz.BringWindowToFront("Microsoft Excel - Book1")
then it works
so
how would i use
r = FindWindowLike(hWnds(), 0, "Microsoft Excel*", "XLMAIN", Null)
to find the correct name for the window, when the file name Book1 changes
and
how do I pass enter (chr(13)) i get an error when i try
error= input string was not in correct format
thanks Friedrich
Reply With Quote
  #7 (permalink)  
Old 12-04-2008, 08:38 AM
Junior Member
 
Join Date: May 2007
Posts: 41
Default

I have tried with this and it works:

'(Send WM_SYSKEYDOWN message (260) and ASCII code of Return as wParam)

dz.PostMessageToWindow("Microsoft Excel - Book1", 260, 13, 0)
Reply With Quote
  #8 (permalink)  
Old 12-04-2008, 06:11 PM
Junior Member
 
Join Date: Jun 2007
Location: South Africa
Posts: 42
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by francisco cobos View Post
I have tried with this and it works:

'(Send WM_SYSKEYDOWN message (260) and ASCII code of Return as wParam)

dz.PostMessageToWindow("Microsoft Excel - Book1", 260, 13, 0)
Thank you Francisco,
I have found that if i replace the 13 with a 9 it tabs to the next cell

greatly apppreciated
Friedrich
Reply With Quote
  #9 (permalink)  
Old 12-04-2008, 06:42 PM
Junior Member
 
Join Date: Jun 2007
Location: South Africa
Posts: 42
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Everyone
Here is a commented version of my test program for those who may be interested in passing a string to excel using dzHW-3 library
http://www.basic4ppc.com/forum/addit...l-library.html
thanks for the help so far
Friedrich
Attached Files
File Type: sbp test to excel.sbp (1.9 KB, 19 views)
Reply With Quote
  #10 (permalink)  
Old 12-05-2008, 10:52 AM
Junior Member
 
Join Date: May 2007
Posts: 41
Default

Quote:
Originally Posted by Softselect View Post
Thank you Francisco,
I have found that if i replace the 13 with a 9 it tabs to the next cell

greatly apppreciated
Friedrich
Hi Friedrich end everyone,
I'm very interested in manage an excel book form a basic4 application too. I would like to send not only characters, but Function keys and combination of keys like-"Ctrl-B" in order to find a text into a book of excel. Someon knows how to preform that?

Thanks in advance
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I get the position of cursor in then text box? fishworld2006 Questions (Windows Mobile) 4 08-20-2008 04:53 AM
Get cursor position in textbox? tsteward Questions (Windows Mobile) 3 08-08-2008 01:16 AM
Harware, get selected text from other application levi Questions (Windows Mobile) 3 07-15-2008 12:40 PM
Pass variables to programm MM2forever Questions (Windows Mobile) 2 04-20-2008 02:33 PM
Not losing cursor position after running/compiling Woinowski Basic4ppc Wishlist 0 01-16-2008 07:18 AM


All times are GMT. The time now is 09:21 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0