View previous topic :: View next topic |
Author |
Message |
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sun Nov 09, 2003 8:54 am Post subject: Window Send Bug ? |
|
|
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
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue Nov 11, 2003 4:04 am Post subject: |
|
|
Anyone _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
Vic D'Elfant Past Contributor
Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Tue Nov 11, 2003 8:43 am Post subject: |
|
|
Hi CodeScript,
I had the same problem when trying to select some text from another window, but I gave up after weeks of trying...
Where exactly do you need it for? Perhaps there's a workaround
Best regards ,
Vic _________________ phpBB Development Team |
|
Back to top |
|
|
LiquidCode Moderator Team
Joined: 05 Dec 2000 Posts: 1751 Location: Space and Time
|
Posted: Tue Nov 11, 2003 12:57 pm Post subject: |
|
|
Does @shift(@key(HOME)) or @shift(@Key(END)) work? _________________ Chris
Http://theblindhouse.com |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Tue Nov 11, 2003 1:59 pm Post subject: |
|
|
The sktest.dsc demo that comes with VDS doesn't work for me. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Nov 11, 2003 5:58 pm Post subject: |
|
|
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 |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1563
|
Posted: Tue Nov 11, 2003 6:01 pm Post subject: |
|
|
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 |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue Nov 11, 2003 6:41 pm Post subject: |
|
|
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 . On win 9x it always works irrespective of anything.
Using Rt Shift Virtual keycode in API works though on both win 9x and XP _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Tue Dec 27, 2005 10:22 am Post subject: |
|
|
CodeScript wrote: | Using Rt Shift Virtual keycode in API works though on both win 9x and XP |
Anyone got a code example of this? _________________ cheers
Dave |
|
Back to top |
|
|
SnarlingSheep Professional Member
Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Tue Dec 27, 2005 4:30 pm Post subject: |
|
|
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 |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Wed Dec 28, 2005 1:59 am Post subject: |
|
|
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 |
|
|
SnarlingSheep Professional Member
Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Wed Dec 28, 2005 2:42 am Post subject: |
|
|
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 |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Wed Dec 28, 2005 3:54 am Post subject: |
|
|
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 |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Jan 03, 2006 4:16 pm Post subject: |
|
|
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 |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Tue Jan 03, 2006 4:44 pm Post subject: |
|
|
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 |
|
|
|