Send> also submits ENTER command in 7.4

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
oneillb
Newbie
Posts: 1
Joined: Fri Sep 09, 2005 12:52 pm
Location: Australia

Send> also submits ENTER command in 7.4

Post by oneillb » Fri Sep 09, 2005 1:01 pm

I've been using a script using ver 7.3 where a value from Excel is copied to the clipboard and set as a variable. The variable is then SEND> to a field in a Citrix screen and move another field to SEND> a different variable.

I updated to Ver7.4 and the SEND> command sends the variable and simulates press enter.

In Ver 7.4 how can I send a Variable text string to a field and move to another field without the press enter event occuring.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Sat Sep 10, 2005 3:35 am

This is nothing to do with the Send command. We have changed nothing to do with this command. However, sometimes Excel puts carriage return or line feed characters at the end of cell contents. This is probably causing the return. Try trimming the cell contents by one char.
MJT Net Support
[email protected]

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Wed Sep 14, 2005 12:54 am

Here is some simple code to strip the CRLF from the data read from Excel. I am not sure if you can ever read Excel data without the CRLF, but this code is written to handle it if it exists or not.

DDERequest>Excel,C:\SomeFile.xls,R1C6,VarName,30
Position>%CRLF%,VarName,1,CRLFFlag
Length>VarName,LengthOfRecord
if>%CRLFFlag%>0
LET>LengthOfRecord=%CRLFFlag%-1
MidStr>%VarName%,1,%LengthOfRecord%,VarName
Else>
MidStr>%VarName%,1,%LengthOfRecord%,VarName
Endif>

SkunkWorks

Danish_Ken
Junior Coder
Posts: 22
Joined: Mon Sep 12, 2005 1:34 am
Location: Melbourne - Australia

Post by Danish_Ken » Thu Sep 22, 2005 2:22 am

A simple script to tackle problem where Excel includes "hidden" characters at the end of text/linefeed copied from cells.
Asigns text to variable %CellText%
Consider using MsAccess Database for larger jobs. Access doesn't "suffer" from this problem and has the benifit of "Saving" info every time you grab next record.
Tested with MsExcel 2,5,97,XP and 2003



SRT>GetCellTextOnly
Press F2
Press Shift
Press Home
Release Shift
Press CTRL
Send>c
Release CTRL
Press ESC
GetClipBoard>CellText
End>GetCellTextOnly

SetFocus>Microsoft Excel*
GoSub>GetCellTextOnly
MessageModal>Actual text displayed between the arrows%CRLF%>%CellText%
Macro Scheduler since Version 5.0 - 21/10/1998

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts