Sign in to follow this  
Followers 0
jesternaut

Having trouble with passing params to a func

2 posts in this topic

Hello all,

I am trying to pass in some params into my function but I keep getting:

"C:\Program Files\AutoIt3\bstest\bstest.au3 (949) : ==> Error in expression.:

Local $sExe = "ca_devmgr -mediainfo " & $x & " " $y & " " & $z

Local $sExe = ^ ERROR"

the call to the func is "$chknam = get_mediainfo($schg_adpt_no, $schg_scsi_no, $schg_lun_no)" the vars here are supplied by the user and are valid.

the code is:

CODE
Func get_mediainfo($x, $y, $z)

;fakes a library

;$sChanger = "0"

; this function get the media info of the loaded tape

Local $sDir = "C:\Program Files\CA\BrightStor ARCserve Backup"

Local $sExe = "ca_devmgr -mediainfo " & $x & " " $y & " " & $z

Local $sOutput = ""

Local $PID = Run($sDir & "\" & $sExe, $sDir, @SW_MINIMIZE, $STDOUT_CHILD + $STDERR_CHILD)

Do

Sleep(20)

If StdoutRead($PID, 0, 1) Then $sOutput &= StdoutRead($PID)

If StderrRead($PID, 0, 1) Then $sOutput &= StderrRead($PID)

Until Not ProcessExists($PID)

If StringInStr($sOutput, "TAPE0") Then

Return "yes"

EndIf

EndFunc

Thanks for any help

Share this post


Link to post
Share on other sites



I am trying to pass in some params into my function but I keep getting:

"C:\Program Files\AutoIt3\bstest\bstest.au3 (949) : ==> Error in expression.:

Local $sExe = "ca_devmgr -mediainfo " & $x & " " $y & " " & $z

Local $sExe = ^ ERROR"

Try:

Local $sExe = "ca_devmgr -mediainfo " & $x & " " & $y & " " & $z

:)


My Projects:DebugIt - Debug your AutoIt scripts with DebugIt!

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  
Followers 0