Jump to content
Sign in to follow this  
BattleOfMoonShae

Send Issue

Recommended Posts

BattleOfMoonShae

I am wondering, if anyone would have a solution to a issue that is eluding me? Out 27 pages of script, the section listed below is the only part that I can not get to work for me.

On this section of a script that I am developing I am pulling a busn # and a customer # from one server and placing the data to another server.

With the MVS server the busn # and the customer# are on separate file lines.

Busn id # 12345

Cust id # 12345678

With the TCH server the Busn id & Cust ID are on the same file line with only 13 char. allowed

Cust id # 1234512345678

With all the variations that I have tried, when the data is copied from MVS into the file2.txt then from the file2.txt into the TCH server (and notepad as a test platform) it pastes incorrectly. It pastes like this,

12345 12345678 instead of 1234512345678. Looking at in notepad the spacing is equal to a tab and for the life of me I can not see why it would place the spacing of a tab between the two sends in the server and notepad.

If anyone has a solution it would be greatly appreciated. I am sure the answer is a simple one but as I said before it eludes me.

____________________________________________________________________

WinWait('MVS - RUMBA Mainframe Display')

If Not WinActive('MVS - RUMBA Mainframe Display', '') Then

WinActivate('MVS - RUMBA Mainframe Display')

EndIf

WinWaitActive('MVS - RUMBA Mainframe Display')

Send('!e')

Sleep(100)

Send('l')

Sleep(100)

Send('!e')

Sleep(100)

Send('c')

If FileExists('file2.txt') Then

Run('cmd.exe /c del file2.txt')

EndIf

Sleep(500)

FileWriteLine('file2.txt', ClipGet())

$line = FileReadLine('file2.txt', 4)

$Busn_ID = StringMid($line, 16, 5)

Sleep(50)

$tempvar = $Busn_ID

$Busn_ID = $tempvar

$line = FileReadLine('file2.txt', 5)

$Cust_ID = StringMid($line, 16, 9)

Sleep(50)

$tempvar = $Cust_ID

$Cust_ID = $tempvar

$line = FileReadLine('file2.txt', 19)

$Comment1 = StringMid($line, 26, 60)

Sleep(50)

$tempvar = $Comment1

$Comment1 = $tempvar

$line = FileReadLine('file2.txt', 20)

$Comment2 = StringMid($line, 26, 60)

Sleep(50)

$tempvar = $Comment2

$Comment2 = $tempvar

;WinWait("TCH Credit Manager (TCH:credit)","")

;If Not WinActive("TCH Credit Manager (TCH:credit)","") Then

;WinActivate("TCH Credit Manager (TCH:credit)","")

;WinWaitActive("TCH Credit Manager (TCH:credit)","")

;notepad paste test

WinWait("Untitled - Notepad","")

If Not WinActive("Untitled - Notepad","") Then WinActivate("Untitled -

Notepad","")

WinWaitActive("Untitled - Notepad","")

Send("{TAB 4}")

Send($Busn_ID & $Cust_ID)

; Send($Cust_ID)

msgbox ;error stop here

Share this post


Link to post
Share on other sites
CyberSlug

Perhaps you are reading one character too many in

$Busn_ID = StringMid($line, 16, 5)

or in

$Cust_ID = StringMid($line, 16, 9)

Maybe adjust the StringMid parameters?

You might also want to try the following workaround:

Send( StringStripWS($Busn_ID & $Cust_ID, 8) )

;remove all whitespace before sending


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites
BattleOfMoonShae

Thanks Cyberslug I will try the work around when I get back on the job tomorrow. I did notice that when I typed the post I did make a error

$Cust_ID = StringMid($line, 16, 9) - the script at work is

$Cust_ID = StringMid($line, 16, 8)

I have tried moving or shorting the char. count. Same problem with the space between the Busn and the Cust # everytime.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.