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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy and Pase

Status
Not open for further replies.

samato

Technical User
Apr 26, 2003
37
US
Using the code below, at the line that shows "Copy" I want to copy the 16 digit account# at row 3 character 19 through 34 and then paste them later in the macro at the line that shows "Paste". Any help is appreciated.


' This section of code contains the recorded events
Sess0.Screen.Sendkeys(&quot;<Tab>am<Enter>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(&quot;<Pf9>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(&quot;<Tab><Tab><Tab><Tab><Tab><Tab><Tab><Tab>Z68<Tab><Tab><Tab>SIF<Enter>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Copy
Sess0.Screen.Sendkeys(&quot;<Pf12>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(&quot;<Pf12>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(&quot;<Pf12>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(&quot;<Pf12>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Paste
Sess0.Screen.Sendkeys(&quot;cis <Down><Enter>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(&quot;cds<Enter>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sess0.Screen.Sendkeys(&quot;cja zb<Enter>&quot;)
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
 
Samato,

Copy the string from row 3, column 19 to a temporary variable

result = Sess0.Screen.GetString(3, 19, 16)

Use this variable to do whatever you want. If u want to send this to the session using send keys use

Sess0.Screen.Sendkeys(result).

Let me know if u want to do something else.

/* STANDARD DISCLAIMER */
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top