forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@shift problem

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Jimjams
Newbie


Joined: 23 Sep 2002
Posts: 21

PostPosted: Wed Apr 23, 2003 1:11 pm    Post subject: @shift problem Reply with quote

A while ago (working with Office 97 on Windows NT 4.0) I wrote a little program that created a lettre in Word based on items in a list.
Recently I upgraded to office XP on Windows 2000 and if I use my program now, I've noticed that the @shift-function doesn't work anymore.
(I used it to highlight a block of text, delete and replace it with an item out of the list).
It works fine when I use it on Windows 2000 - Office2000 so I guess it's an OfficeXP-issue.
Has anybody encountered simular problems and if so is there a workaround? Sad
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Apr 23, 2003 8:14 pm    Post subject: Reply with quote

Could you by any chance post some example code you are having
problems with? Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Jimjams
Newbie


Joined: 23 Sep 2002
Posts: 21

PostPosted: Thu Apr 24, 2003 6:39 am    Post subject: Reply with quote

Hi there!

You're right! A bit of sample code always helps so here goes:
Quote:
window send,%W,@SHIFT(@KEY(END))
window send,%W,@KEY(DEL)

Where %W is the active window (Word document).
Actually this is part of an errorcheck. As I said before the word-document is created based on a list which is actually a textfile (.tab) generated by Filemaker Pro. In Vds I simple rename the file to a .dat-file and read it line by line and send the data to the active window.
This list can be in 4 different languages (English, French, Dutch and German) which means that sometimes special characters are included (like the german ü-character etc.). If one of these characters is included in a word Vds skips it.
So what I do is perform a @OK() check after every window send action.
When the result of the check is Not @OK() the program jumps to a subroutine that cuts every word into separate characters and checks it's ascii-code.
Finally VDS reselects the fawlty data using:
Quote:
window send,%W,@SHIFT(@KEY(END))
and deletes it. It then sends the changed data to the window.

As I said before: this has always worked perfectly until I started using Office XP. Crying or Very sad
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Apr 24, 2003 6:43 pm    Post subject: Reply with quote

Check to make sure the class name/window title/window handle you are
using is correct.

Second, I would recommend use DDE to control Word for this. While I
don't have an example I'll dig around and see what I can find. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Jimjams
Newbie


Joined: 23 Sep 2002
Posts: 21

PostPosted: Fri Apr 25, 2003 6:32 am    Post subject: Reply with quote

Hi!

The class name/window title and handle are correct since all the other commands work just fine.

DDE commands however sound great! I've been thinking about those myself but unfortunately it's almost impossible to find info on.

Thanks in advance!
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Apr 25, 2003 2:48 pm    Post subject: Reply with quote

Try the Microsoft data base at Msdn.com.
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Apr 25, 2003 6:40 pm    Post subject: Reply with quote

I think there was an example posted here or in the archives. I'll check in
a minute. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Apr 25, 2003 6:59 pm    Post subject: Reply with quote

Wasn't that for Internet Explorer?
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Jimjams
Newbie


Joined: 23 Sep 2002
Posts: 21

PostPosted: Mon Apr 28, 2003 2:47 pm    Post subject: Reply with quote

Thanks Guys!

I've got it! This does exactly what I want;
Quote:
DDE LINK,winword,system
DDE EXECUTE,+{END}{DELETE}
DDE TERMINATE


Thanks for putting me on the right track! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
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
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group