×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Send key for ctrl 5

Send key for ctrl 5

Send key for ctrl 5

(OP)
I can't seem to figure out the sendkey for ctrl 5. I've tried the following and none work.
Sess0.Screen.SendKeys ("{^5}")
Sess0.Screen.SendKeys ("(^5)")
Sess0.Screen.SendKeys ("^5")

anyone able to post how to use the ctrl then 5 key? thx

RE: Send key for ctrl 5

(OP)
Also I'm using this in excel. thx

RE: Send key for ctrl 5

one way that might work is to open the macro recorder within your EXTRA session and simulate the key press you want by doing it manually.  Then view the code for the macro you just made and the code for the keystrikes you want should be there.  Also, when you say you're using this in excel, do you mean its written in VBA or you are trying to do the ctrl+5 sequence in excel

RE: Send key for ctrl 5

(OP)
it's written in vba in excel 2000, but it's getting teh data and the putting the keystrokes into extra mainframe

RE: Send key for ctrl 5

ok, then using the macro recorder within extra to reveal the commands necessary to simulate the ctrl+5 keystroke should solve the problem

RE: Send key for ctrl 5

(OP)
ctrl 5 doesn't show up in the code when you use the macro editor. i have no idea why.

RE: Send key for ctrl 5

if im not mistaken, doesnt the control key just move the cursor down a line in the extra session.  one first glance, it seems like you are trying to move the cursor down a row and then send the 5 key to the field the cursor moved to....is this correct or no, if not, please explain what you are using the ctrl key to do in the extra session.  if it is correct you can avoid the ctrl key altogether by using the Sess0.Screen.MoveTo 10, 2  command.  10 is the row and 2 is the column you want the cursor moved to, you might have to do some screen mapping but that isint too hard
 

RE: Send key for ctrl 5

(OP)
no what I'm trying to do is move to another screen and hitting ctrl 5 does moves extra to another screen.

RE: Send key for ctrl 5

i was lookin over your codes again, am i mistaken or do you need to surround keys like pressing enter wrapped in <Enter>. since this isint an actual character you are sending does wrapping it in <> help....as in

CODE

Sess0.Screen.SendKeys ("<^5>")
personally i do not use the ctrl key in my sessions because we use the page up/f1-12 keys to navigate through the screens

RE: Send key for ctrl 5

(OP)
I'm not sure I understand that page.

RE: Send key for ctrl 5

ok, where did you get the idea of using the "^5" to simulate ctrl + 5?
 

RE: Send key for ctrl 5

(OP)
the help files in both excel vba and extra macro editor. I've tried almost every variation of that I can think of. Even "<^5>"

RE: Send key for ctrl 5

(OP)
I've looked all over the next and there really doensn't seem to be a clear answer. There's a lot of questions about it, but not a real solution that i've found. Everyone goes bacak to use ^ as ctrl

RE: Send key for ctrl 5

its seems you will need to kind of fuse the information found in this document
http://support.attachmate.com/techdocs/2268.html
with the one i linked carlier about the specific codes for control sequences to find the solution

i know it is not the exact same key press you want to send but it should be effective

RE: Send key for ctrl 5

(OP)
I dont belive the version of attachmate I have uses this.

RE: Send key for ctrl 5

hi ptw78,

out of curiosity, did you record this in Extra macro recorder? and did it work?

i suspect if you code this in Excel Vba, then you would need to first use AppActivate Extra before you can evoke the Sess0.Screen.SendKeys ("^5")


zach
 

RE: Send key for ctrl 5

(OP)
it was done in excel vba. I've never used AppActive Extra, what exactly is that?

RE: Send key for ctrl 5

Ctrl in attachmate is the same as a Carrage Return which would equal
Sess0.Screen.Sendkeys("<Newline><Newline><Newline><Newline><Newline>")

Ctrl 5 in Excel is

Selection.Font.Strikethrough = True

RE: Send key for ctrl 5

Ctrl 5 is not a normal function of attachmate.
if it works to change screens then it was programmed
to do so by someone else.

Unless your using f5 instead of 5 then <^F5 or ^PF5>
could work if they were programmed to do a screen change.

Usually the F keys are programmed for these types of
functions.
 

RE: Send key for ctrl 5

what's interesting in excel, i was able to code Control C to copy but was not able to evoke Control V to paste...rather odd
 

RE: Send key for ctrl 5

Have you tried

SendKeys "<Ctrl+5>"

RE: Send key for ctrl 5

(OP)
I'll give that a try in the morning. thx

RE: Send key for ctrl 5

(OP)
SendKeys "<Ctrl+5>"  doesn't work, looks like it's just one of those things that requires a lot of digging around

RE: Send key for ctrl 5

Have you looked at your keyboard map to see what command is mapped to Ctrl+5?  It should give you the literal command for what your attempting to simulate.

For example to turn my page the "<Transmit>" call does the trick, although it is mapped to several key combinations on my Key Mapping.

try Sess0.Screen.SendKeys("<Transmit>")

Options>Settings>Keyboard Maps>clickie clickie selected>hold control and click on the 5 of the onscreen keyboard.

Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black

RE: Send key for ctrl 5

once again, this all goes back to the keyboard mapping i described in my previous posts which cited attachmate reference articles.  Please send me an update ptw78 and let me know how this is going for you.  maybe you can let someone from the forum remote in and view your screen to walk you through keyboard mapping

RE: Send key for ctrl 5

ptw78, I don't know if you resolved this yet.  If you haven't, what is your keyboard Ctrl 5 actually mapped to under Options | Settings | Keyboard?  Under a default mainframe keyboard it just selects the entire screen.  Is this the action you want?  It could have been changed to a different value and that is what you need to send to the host.

RE: Send key for ctrl 5

(OP)
thx, i'll have to check when i go into work.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close