Jump to content
Sign in to follow this  
HypercamJ

Need help with error

Recommended Posts

HypercamJ

I'm pretty much a newbie at AutoIt and I was trying to build a program to get the serial for a drive for the USB Key program but when I ran it an error kept popping up. Please help and thank you in advance!

Program AutoIt code:

$text = InputBox("Get Drive Serial", "Type the drive letter to get the serial from and click OK")
$var = DriveGetSerial "( "$text":\ )"
MsgBox(4096, "Serial Number: ", $var)

And this is what the error looks like:

Line 2 (Location)

$var = DriveGetSerial "("$text":\)"
$var = ^ ERROR

Error: Error parsing function call.

Prove, and I will believe...

Share this post


Link to post
Share on other sites
Richard Robertson

DriveGetSerial "( "$text":\ )"

should be

DriveGetSerial($text & ":\")

because your quotes were horribly arranged.

Share this post


Link to post
Share on other sites
HypercamJ

Yay, It works! (Finally!) Thanks Rich! :)


Prove, and I will believe...

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  

×