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 


Window Send Bug ?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1054
Location: India

PostPosted: Sun Nov 09, 2003 8:54 am    Post subject: Window Send Bug ? Reply with quote

Window Send Bug ?
=============

Code:
WINDOW SEND,<window>,@SHIFT(@KEY(RIGHT))


This will send only @KEY(RIGHT)
So the text will not be selected.
@SHIFT(@KEY()) combination doesn't seem to
work in Win XP (On win 98 - works fine)

Is it just me ?
My System/hardware with XP ??
A bug in VDS ??? - Lt/Rt shift different on NT

Similar command in SKTEST.dsc
for copy paste also won't work on XP
Anyone else had this problem ?

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1054
Location: India

PostPosted: Tue Nov 11, 2003 4:04 am    Post subject: Reply with quote

Anyone Question Rolling Eyes
_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Vic D'Elfant
Past Contributor
Past Contributor


Joined: 26 Jun 2002
Posts: 673
Location: The Netherlands

PostPosted: Tue Nov 11, 2003 8:43 am    Post subject: Reply with quote

Hi CodeScript,

I had the same problem when trying to select some text from another window, but I gave up after weeks of trying... Rolling Eyes

Where exactly do you need it for? Perhaps there's a workaround Confused

Best regards Smile,
Vic

_________________
phpBB Development Team
Back to top
View user's profile Send private message Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1710
Location: Space and Time

PostPosted: Tue Nov 11, 2003 12:57 pm    Post subject: Reply with quote

Does @shift(@key(HOME)) or @shift(@Key(END)) work?
_________________
Chris
Http://vdsfreak.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Tue Nov 11, 2003 1:59 pm    Post subject: Reply with quote

The sktest.dsc demo that comes with VDS doesn't work for me. Sad
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


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

PostPosted: Tue Nov 11, 2003 5:58 pm    Post subject: Reply with quote

sktest.dsc works as well as it's always done for me, using XP and the latest (unreleased) build of the runtime.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1537

PostPosted: Tue Nov 11, 2003 6:01 pm    Post subject: Reply with quote

sktest.dsc works for me as well - tested on 3 pc's. Tested on two Windows XP Home machines and both worked.

Tried on another Windows 98 machine and it works as well.
Back to top
View user's profile Send private message
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1054
Location: India

PostPosted: Tue Nov 11, 2003 6:41 pm    Post subject: Reply with quote

I think it is related to hardware on some NT/XP machines differentiating Rt and Left Shift - even with direct API it won't work givenm my keyboard - It worked when I attached a different keyboard Insane . On win 9x it always works irrespective of anything.
Using Rt Shift Virtual keycode in API works though on both win 9x and XP Rolling Eyes

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
DaveŽ
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 403
Location: Australia

PostPosted: Tue Dec 27, 2005 10:22 am    Post subject: Reply with quote

CodeScript wrote:
Using Rt Shift Virtual keycode in API works though on both win 9x and XP Rolling Eyes

Anyone got a code example of this?

_________________
cheers

DaveŽ
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Tue Dec 27, 2005 4:30 pm    Post subject: Reply with quote

Code:

LOADLIB user32
%%VK_RIGHT = $027
%%VK_RSHIFT = $0A1
 rem Push Right Shift Down
 %x = @lib(user32,keybd_event,NULL:,INT:%%VK_RSHIFT,INT:0,INT:0,INT:0)
rem Push Right Arrow Key Down
 %x = @lib(user32,keybd_event,NULL:,INT:%%VK_RIGHT,INT:0,INT:0,INT:0)
 rem Let Keys Up
 %x = @lib(user32,keybd_event,NULL:,INT:%%VK_RIGHT,INT:0,INT:$002,INT:0)
 %x = @lib(user32,keybd_event,NULL:,INT:%%VK_RSHIFT,INT:0,INT:$002,INT:0)
FREELIB user32

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


Joined: 03 Sep 2005
Posts: 403
Location: Australia

PostPosted: Wed Dec 28, 2005 1:59 am    Post subject: Reply with quote

Thanks SS,

But are you sure the $002 argument to release a key is correct? I can't get the shift key to release. Which stangely, only affects my application and the VDS IDE. Once I close and reopen VDS, the shift key has been released.

I've tried releasing VK_LSHIFT and VK_SHIFT as well. Plus added 0.3 second waits just in case it was needed. I've also tried using window send @shift() to release the key.

_________________
cheers

DaveŽ
Back to top
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Wed Dec 28, 2005 2:42 am    Post subject: Reply with quote

You might try $02, but &H2 is the value for KEYEVENTF_KEYUP.
Not sure why it wouldn't release the shift key.

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


Joined: 03 Sep 2005
Posts: 403
Location: Australia

PostPosted: Wed Dec 28, 2005 3:54 am    Post subject: Reply with quote

Hmm, I still end up with a locked shift key.

But I have discovered that in the IDE if I select the selection's anchor point and press RSHIFT and then LSHIFT (or LSHIFT and then RSHIFT) it clears the locked shift key in the IDE.

I probably should have mentioned I'm using XP SP2 with a wireless USB keyboard connected via a USB KVM switch - with default qwerty XP keyboard driver.

_________________
cheers

DaveŽ
Back to top
View user's profile Send private message Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Jan 03, 2006 4:16 pm    Post subject: Reply with quote

Dave,
Have you tried just using the number two instead of $002. After all $002 hex is the same as the number 2 base 10. Technically speaking you should use $0002 but most likely since you are passing a full integer you may have to put the 02 in either the low word or hi word of the Integer for this to work properly. I cannot remember? If I get a chance I will try to look this up for ya.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Tue Jan 03, 2006 4:44 pm    Post subject: Reply with quote

Dave,
Here is the issue...

Code:
VOID keybd_event(

    BYTE bVk,   // virtual-key code
    BYTE bScan,   // hardware scan code
    DWORD dwFlags,   // flags specifying various function options
    DWORD dwExtraInfo    // additional data associated with keystroke
   );


This function is expecting the first two parameters to be single BYTES.

You can try it like below... Not sure if this works everywhere but it does work for Windows XP?

Code:
LOADLIB user32.dll
  %%VK_RIGHT = $27
  %%VK_RSHIFT = $A1
  %%RightBin = @Binary(BYTE,%%VK_RIGHT)
  %%RShiftBin = @Binary(BYTE,%%VK_RSHIFT)
  rem Push Right Shift Down
  %x = @lib(user32,keybd_event,NIL:,%%RShiftBin,BYTE:0,DWORD:0,DWORD:0)
  rem Push Right Arrow Key Down
  %x = @lib(user32,keybd_event,NIL:,%%RightBin,BYTE:0,DWORD:0,DWORD:0)

  rem Let Keys Up
  %x = @lib(user32,keybd_event,NIL:,%%RightBin,BYTE:0,DWORD:$00000002,DWORD:0)
  %x = @lib(user32,keybd_event,NIL:,%%RShiftBin,BYTE:0,DWORD:$00000002,DWORD:0)
  FREELIB user32


The code above is faking out the function by sending the binary values in a string format to the function for the single byte parameters

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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