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 


API and Copy Command?

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


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Tue Oct 19, 2004 10:41 pm    Post subject: API and Copy Command? Reply with quote

Hi Guys,

Does anyone know of a way to send a copy command to a window (similar to Ctrl-C) using API?

Something like:

%%Activewin = @winactive(C)
%%copy = @sendmsg(~%%Activewin,$0301,0,0)

Which does not work...

Thanks,

- Boo
Back to top
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1565

PostPosted: Tue Oct 19, 2004 11:11 pm    Post subject: Reply with quote

If you are sending a copy command to another window; in your @sendmsg( ) function do not put ~ infront of the window handle. When you put ~ infront of the window handle it tells vds to search for the handle/window in your app and not any global handles/windows that might be open.
Back to top
View user's profile Send private message
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Tue Oct 19, 2004 11:26 pm    Post subject: Reply with quote

Yeppers, tried that. But to no avail.

Any suggestions?

Thanks,

- Boo
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Oct 19, 2004 11:29 pm    Post subject: Reply with quote

Hey Boo,

Have you tried,

Code:

  window send,<window id>,@ctrl(C)

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Tue Oct 19, 2004 11:31 pm    Post subject: Reply with quote

Howdy,

Yeppers. The problem is that I want to avoid sending a CTRL key to the window... Was hoping API might be the solution.

Thanks,

- Boo
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Oct 19, 2004 11:36 pm    Post subject: Reply with quote

Another thought about the
Code:
@sendmsg()
function.

Sometimes it is necessary to send the message to the parent window of a
control and then sometime the message needs to be sent to the control
itself.

That might help Wink , and then might not Confused .

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Tue Oct 19, 2004 11:40 pm    Post subject: Reply with quote

Yeppers, aware of that. But thanks just the same. Wink

I need to avoid use of the CTRL key altogether...
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Oct 20, 2004 1:30 am    Post subject: Reply with quote

Well.. if you are trying to copy from an editbox/combo and have the actual handle to it, you can send WM_COPY:
Code:

%%WM_COPY = $0301
%P = @SENDMSG(<edit/combo handle>,%%WM_COPY,0,0)

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Wed Oct 20, 2004 1:40 am    Post subject: Reply with quote

Thanks Sheep. However, how can you use API to copy text from a non-edit/non-combo window/control? Such as highlighted text on a Web page?

FYI: The following API code works fine in VDS 3.5, but not in version 5.x:

Code:
%%pos = @mousepos(XY)
parse "%%Xpos;%%Ypos",%%pos
%x = @WINATPOINT(%%Xpos,%%Ypos)
%z = @sendmsg(%x,$0301,0,0)


Thanks,

- Boo[/code:1:c251638227]
Back to top
View user's profile Send private message
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Wed Oct 20, 2004 1:48 am    Post subject: Reply with quote

Correction. The above code in VDS 3.5 and VDS 5.x, but only when copying text from certain edit boxes/combos.

Still need a solution for copying text from windows/controls other than edit boxes/combos. (That is, that contain text that may be copied/pasted.)


Last edited by Boo on Wed Oct 20, 2004 2:03 am; edited 1 time in total
Back to top
View user's profile Send private message
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Oct 20, 2004 2:03 am    Post subject: Reply with quote

I'm really not sure on how to copy selected text from another window unless it's in an edit. Odd that WM_COPY worked on non-edit windows in VDS 3..
Maybe someone else knows something I'm missing.

_________________
-Sheep
My pockets hurt...
Back to top
View user's profile Send private message Send e-mail
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Wed Oct 20, 2004 9:27 am    Post subject: Reply with quote

WM_COPY is just a Windows message. I can't see how it could make any difference what version of VDS is sending it.

However, it's certainly possible that some controls other than the basic Windows controls don't support WM_COPY. For example, many enhanced components created using VCL in Delphi. The developer may not have provided support for this message. In that case, sendng CTRL-C to the application may work, but still only if the developer provided support for this shortcut.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Boo
Valued Contributor
Valued Contributor


Joined: 31 Oct 2003
Posts: 599
Location: Gulf Breeze, Florida USA

PostPosted: Wed Oct 20, 2004 1:03 pm    Post subject: Reply with quote

Yeppers, it seems to work in VDS 3.5 and 5.0, but only in editboxes/combos.

Still hoping for a solution for the copying of non-editable text....
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