Capital letters with Press and Type

Discussion of Inner Space

Moderators: Lavish Software Team, Moderators

Post Reply
defenestrate
GamingTools Subscriber
Posts: 2
Joined: Mon Jan 17, 2005 12:35 am

Capital letters with Press and Type

Post by defenestrate » Tue Jan 18, 2005 4:12 am

I'm playing around now and I noticed that the shift modifier on a Press and Type doesn't always work. For example, if I have the console displayed while within WoW and enter "Press T", a capital T is placed in the input textbox. But, if I have a script containing:

Code: Select all

function main() 
{ 
  Type `
  Type /
  Wait 2
  Type Hi HoW ArE YoU
} 
It hides the console, which changes input focus, and sent to the input in WoW is "/hi how are you", no capitals.

I started thinking about keybd_event and the shift modifier and then wondering how IS was accomplishing it. I imagine there is some sort of

Code: Select all

// if shift-modded key, press and hold shift
if (ReturnFromVkKeyScan & 0x0100) keybd_event(0x10, bScan, 0, 0);

do the keybd_event stuff

//lift shift
keybd_event(0x10, bScan, KEYEVENTF_KEYUP, 0);
but yet it works within IS console, so I have no idea, and I don't expect to, not my place. Another example is if you do a "Type ()", in the console you get "()" in game you get "90", not shifted.

Is there another command to send a string of text, as written, to the host application that IS is connected to? All of the scripts I'm playing with have to add a "Type `" to the top of the main function to hide the console.

I just started with IS lately, and I love the idea, good work Lax. Thanks for the effort.

Def

Lax
Owner
Posts: 6634
Joined: Fri Jun 18, 2004 6:08 pm

Post by Lax » Tue Jan 18, 2005 4:39 am

use the "console" command to toggle the console, rather than press or type `. "console off" works :)

Shift usage for Type depends entirely on the input system for the game. I will double check it for each system, thanks for the note

defenestrate
GamingTools Subscriber
Posts: 2
Joined: Mon Jan 17, 2005 12:35 am

ahh

Post by defenestrate » Tue Jan 18, 2005 4:47 am

Cool, good to know, thank you.

Def

Post Reply