Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send key for ctrl 5

Status
Not open for further replies.

ptw78

Technical User
Mar 5, 2009
155
0
0
US
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
 
Also I'm using this in excel. thx
 
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
 
it's written in vba in excel 2000, but it's getting teh data and the putting the keystrokes into extra mainframe
 
ok, then using the macro recorder within extra to reveal the commands necessary to simulate the ctrl+5 keystroke should solve the problem
 
ctrl 5 doesn't show up in the code when you use the macro editor. i have no idea why.
 
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
 
no what I'm trying to do is move to another screen and hitting ctrl 5 does moves extra to another screen.
 
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
 
I'm not sure I understand that page.
 
ok, where did you get the idea of using the "^5" to simulate ctrl + 5?
 
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>
 
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
 
its seems you will need to kind of fuse the information found in this document
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
 
I dont belive the version of attachmate I have uses this.
 
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
 
it was done in excel vba. I've never used AppActive Extra, what exactly is that?
 
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
 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top