Hello,
I have referred one of the sample program created by someone to open 5250 session using EHLAPI function. I am able to get into the screen but my requirment is to pass account number from command line and query the screen with account number.
following is my code where am accepting parameteres:
include <Array.au3>
#include <GUIConstantsEx.au3>
Global $dataSrting1 = " "
ReadCmdLineParams(); am calling this function to get the input parameter from command line.
Func ReadCmdLineParams()
$value= 0
for $i = 1 to $cmdLine[0]; $cmdline[0] gives you total no of parameters passed to program
select
case $CmdLine[$i] <> " "
if $i == $CmdLine[0] Then
$dataSrting1 = $cmdLine[1]
EndIf
EndSelect
Next
endfunc
following is the function code which navigates me to the screen
setInputFieldText("Menu","1")
sendCR(); is used to pass Enter button
sendText("2")
sendCR()
sendText("1")
sendCR()
sendText("2")
sendCR()
sendText("1")
sendCR()
sendtext('$dataSrting1'); this code is not working as account number from command line is not getting passed from $datastring1
sendCR()
I am calling my progrm from command prompt as below
C:\Documents and Settings\anantkulkarni\Desktop>test.exe 8029639
C:\Documents and Settings\anantkulkarni\Desktop>test.exe "8029639"
C:\Documents and Settings\anantkulkarni\Desktop>test.exe param1 "8029639"
none of the above three are working, my application is getting started but the place where I am passing this account number is not working properly. I meant I can not search the screen with account number as8029639.
Any help in this is greatly appreciated. I know this is very basic question and I bet have gone through all the help contents and other forum threads to get solution but unfortunately did not get any soution.
Note: I have compiled by application test.exe by pressing (ctrl+F7)
Kindly let me know if you need more details.
Thanking in advance.
Regards,
Anant
I have referred one of the sample program created by someone to open 5250 session using EHLAPI function. I am able to get into the screen but my requirment is to pass account number from command line and query the screen with account number.
following is my code where am accepting parameteres:
include <Array.au3>
#include <GUIConstantsEx.au3>
Global $dataSrting1 = " "
ReadCmdLineParams(); am calling this function to get the input parameter from command line.
Func ReadCmdLineParams()
$value= 0
for $i = 1 to $cmdLine[0]; $cmdline[0] gives you total no of parameters passed to program
select
case $CmdLine[$i] <> " "
if $i == $CmdLine[0] Then
$dataSrting1 = $cmdLine[1]
EndIf
EndSelect
Next
endfunc
following is the function code which navigates me to the screen
setInputFieldText("Menu","1")
sendCR(); is used to pass Enter button
sendText("2")
sendCR()
sendText("1")
sendCR()
sendText("2")
sendCR()
sendText("1")
sendCR()
sendtext('$dataSrting1'); this code is not working as account number from command line is not getting passed from $datastring1
sendCR()
I am calling my progrm from command prompt as below
C:\Documents and Settings\anantkulkarni\Desktop>test.exe 8029639
C:\Documents and Settings\anantkulkarni\Desktop>test.exe "8029639"
C:\Documents and Settings\anantkulkarni\Desktop>test.exe param1 "8029639"
none of the above three are working, my application is getting started but the place where I am passing this account number is not working properly. I meant I can not search the screen with account number as8029639.
Any help in this is greatly appreciated. I know this is very basic question and I bet have gone through all the help contents and other forum threads to get solution but unfortunately did not get any soution.
Note: I have compiled by application test.exe by pressing (ctrl+F7)
Kindly let me know if you need more details.
Thanking in advance.
Regards,
Anant