Moderators JLogan3o13 Posted December 4, 2018 Moderators Posted December 4, 2018 1 hour ago, boy15 said: I hit autoiscript No idea what this is supposed to mean, care to elaborate? boy15 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
ModemJunki Posted December 4, 2018 Posted December 4, 2018 11 hours ago, boy15 said: I hit autoiscript Well, you've been posting here for 4 years and apparently never tried to learn it. I think you could if only you would try. I'm bored again. Always carry a towel.
boy15 Posted December 20, 2018 Author Posted December 20, 2018 #RequireAdmin #include <AutoItConstants.au3> #include <WinAPI.au3> $a_DDriveLetter = DriveGetDrive($DT_REMOVABLE) For $i = 1 To UBound($a_DDriveLetter) - 1 $letter = StringReplace(StringUpper($a_DDriveLetter[$i]),":","") $handle = FileOpen("script-drive-"&$letter&".txt",2) FileWrite($handle,"select volume " &$letter & @CRLF & _ "clean" & @CRLF & _ "create part pri" & @CRLF & _ "select part 1" & @CRLF & _ "format fs=ntfs quick" & @CRLF & _ "active" & @CRLF & _ "exit" & @CRLF) FileClose($handle) $confirm = MsgBox(0x4,"Confirm","Are you sure you want to make bootable device at letter "&$letter,0,_WinAPI_GetForegroundWindow()) if $confirm = 6 Then $pid = Run(@ComSpec & " /C diskpart /s script-drive-"&$letter&".txt",@ScriptDir,@SW_SHOW,0x10000) ProcessWaitClose($pid) FileClose($handle) FileDelete("script-drive-"&$letter&".txt") endif Next But I do not know what is wrong in the break line $confirm = MsgBox(0x4,"Confirm","Are you sure you want to make bootable device at letter "&$letter,0,_WinAPI_GetForegroundWindow())
TheXman Posted December 20, 2018 Posted December 20, 2018 https://www.autoitscript.com/autoit3/files/beta/autoit/docs/intro/lang_comments.htm Maybe the second sentence on the page will help you understand. If not, maybe the first example will help you understand. CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
boy15 Posted December 20, 2018 Author Posted December 20, 2018 Do you try it ? Does it done without problem?
TheXman Posted December 20, 2018 Posted December 20, 2018 4 minutes ago, boy15 said: Do you try it ? @boy15 I don't need to try it. I see the problem. I pointed to you to the reason why it isn't working, in the Help file. I also pointed you to an example in the Help file that should show you how to do what you are trying to do. CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman
ModemJunki Posted December 21, 2018 Posted December 21, 2018 On 12/19/2018 at 8:51 PM, boy15 said: Do you try it ? Does it done without problem? Come on then, the answer is given by @TheXman. You can solve this now. TheXman 1 Always carry a towel.
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