walle Posted June 1, 2007 Share Posted June 1, 2007 Func DriverStatus() $var1 = DriveStatus( "e:\" ) MsgBox(4096,"Status",$var1) EndFunc If $var1 = "NOTREADY" Then Msgbox(4096,"INGEN DVD-R SKIVA FUNNEN","Sätt i en DVDr skiva") EndIf Well, as you probably can see, this script won't work.... I'm still learing, Can u lend me a helping hand? Link to comment Share on other sites More sharing options...
Developers Jos Posted June 1, 2007 Developers Share Posted June 1, 2007 You need to perform the func ... something like this ? If DriverStatus() = "NOTREADY" Then Msgbox(4096,"INGEN DVD-R SKIVA FUNNEN","Sätt i en DVDr skiva") EndIf ; Func DriverStatus() Return DriveStatus( "e:\" ) EndFunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
walle Posted June 1, 2007 Author Share Posted June 1, 2007 Ah, stupid me, Thanks for the fast replay! Back too scripting, you will probably hear more from me ^^ Link to comment Share on other sites More sharing options...
JSunn Posted June 1, 2007 Share Posted June 1, 2007 No need for a function here, how about somthing like CODESelect Case DriveStatus( "e:\" ) = "UNKNOWN" MsgBox(0, "", "Drive status: unknown") Case DriveStatus( "e:\" ) = "READY" MsgBox(0, "", "Drive status: ready") Case DriveStatus( "e:\" ) = "NOTREADY" MsgBox(0, "", "Drive status: not ready") Case DriveStatus( "e:\" ) = "INVALID" MsgBox(0, "", "Drive status: invalid") EndSelect Link to comment Share on other sites More sharing options...
McGod Posted June 1, 2007 Share Posted June 1, 2007 No need for a function here, how about somthing like CODESelect Case DriveStatus( "e:\" ) = "UNKNOWN" MsgBox(0, "", "Drive status: unknown") Case DriveStatus( "e:\" ) = "READY" MsgBox(0, "", "Drive status: ready") Case DriveStatus( "e:\" ) = "NOTREADY" MsgBox(0, "", "Drive status: not ready") Case DriveStatus( "e:\" ) = "INVALID" MsgBox(0, "", "Drive status: invalid") EndSelect OR Switch DriveStatus("e:\") Case "UNKNOWN" MsgBox(0, "", "Drive status: unknown") Case "READY" MsgBox(0, "", "Drive status: ready") Case "NOTREADY" MsgBox(0, "", "Drive status: not ready") Case "INVALID" MsgBox(0, "", "Drive status: invalid") EndSwitch [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
JSunn Posted June 1, 2007 Share Posted June 1, 2007 Symantics.. Link to comment Share on other sites More sharing options...
walle Posted June 1, 2007 Author Share Posted June 1, 2007 Well, that's a new approach! Select, Case, Endselect worked better with the rest of the script Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now