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!

Putstring doesnt insert next to text

Status
Not open for further replies.

Tai Tran

Vendor
Oct 18, 2016
2
0
0
US
Hi all,

I'm kinda new to this so i'm not sure how to make this work.

So basically, I'm trying to run this report once a week for the following week, so the dates need to change to match.

After i recorded up to the part where i need to enter the command to run the report, i'm trying to make it insert date with format mmddyy after the command string ...IGF-. So i tried and insert the Putstring command below. However, instead of inserting the string after ..IGF, it inserted the dates right at the beginning, after 15C.

Can anyone help shed some light on this?

Below is the what i have.

' This section of code contains the recorded events
Sess0.Screen.Sendkeys("15C<Enter>")
Sess0.Screen.Sendkeys("<Down><Down><Down><Down><Down><Down><Down><Down>1<Enter>")
Sess0.Screen.Sendkeys("IRQ-FLO.IGF-.")
Sess0.Screen.Putstring format(date+7,"mmddyy")

System.TimeoutValue = OldSystemTimeout
End Sub

Much appreciated.
 
Hi,

SendKeys is usually for commands to control screen navigation and processing commands.

If you want to put text on the screen, I'd use the PutString() method (check HELP) using the optional row & column arguments.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Hi,

Thanks for your suggestions. I'm a total newbie here. The Sendkeys were entered using the 'Record macro' function.

So basically, I need the steps to be followed in order. I.e. enter 15C -> Enter -> Go down to required selection -> put 1 -> type in IRQ-FLO.IGF-. -> type in dates (mmddyy)

I recorded the steps up to the ...IGF bit but then when i added the putstring method, it enters the strings in the first step above, right next to 15C.

I think my question is somewhat similar to thread99-1656965

Could you please help?

TT.

 
Notice that the example PutString, that you referenced, did have arguments: 1,2 placing that string at row 1, column 2.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top