Func ScriptCOMMAND($cmd, $info=False) RunWait($cmd) If $info<>False Then InfoShowWindow($cmd & @CRLF & @CRLF & $info) EndIf EndFunc Func ScriptSQL($sql, $DatabaseName, $info=False) RunWait(@ComSpec & " /c " & $mysql_bin_path & "\mysql.exe -u root -e """ & $script[4] & """ " & $DatabaseName) If $info<>False Then InfoShowWindow($sql & @CRLF & @CRLF & $info) EndIf EndFunc Func ScriptSQLFILE($file, $DatabaseName, $info=False) If NOT FileExists($file) Then MsgBox(64, l("Error"), l("FileNotFound") & @CRLF & $file) EndIf RunWait(@ComSpec & " /c " & $mysql_bin_path & "\mysql.exe -u root -e ""source " & $file & """ " & $DatabaseName) If $info<>False Then InfoShowWindow($info) EndIf EndFunc Func ScriptREPLACE($file, $search, $replace, $info=False) If NOT FileExists($file) Then MsgBox(64, l("Error"), l("FileNotFound") & @CRLF & $file) EndIf $filec=FileOpen($file,0) $content=FileRead($filec) FileClose($filec) $filec=FileOpen($file,2) $content = StringRegExpReplace($content, $search, $replace) if (@error=0) Then If $info<>False Then InfoShowWindow($info) EndIf Else MsgBox(32, l("RegExpReplace"), l("RegExpReplaceFail")) If $info<>False Then InfoShowWindow($info) EndIf EndIf FileWrite($filec, $content) FileClose($filec) EndFunc Func ScriptEDIT($file,$info=False) If NOT FileExists($file) Then MsgBox(64, l("Error"), l("FileNotFound") & @CRLF & $file) EndIf ShellExecute($file) EndFunc Func ScriptURL($url) ShellExecute($url) EndFunc