问题描述
这是我的代码:
export default function App() {
const [text,setText] = React.useState(html);
return (
<>
<textarea value={text} onChange={(e)=>setText(e.target.value)}/>
<ReactQuill value={text} />
</>
);
}
错误是:
(“ C:\ Users \ Javad \ Desktop \ 01.au3”(7):==>在 不可访问的变量。
#RequireAdmin
#Region Directives created by AutoIt3Wrapper_GUI
#AutoIt3Wrapper_UseX64=n
#EndRegion Directives created by AutoIt3Wrapper_GUI
ListDrives("REMOVABLE")
ListDrives("FIXED")
Func ListDrives($type)
$drive = DriveGetDrive($type)
For $i = 1 To $drive[0]
MsgBox(64,"",$drive[$i])
Next
EndFunc
如何调试“对不可访问的变量使用下标”?
解决方法
也许您的驱动器不是可移动的,而是CD-ROM。 试试看一下您的驱动器。
#include <AutoItConstants.au3>
#include <MsgBoxConstants.au3>
#include <Array.au3>
$re = ListDrives($DT_ALL)
_ArrayDisplay($re,'Drives and Drivetypes')
;~ ListDrives($DT_FIXED)
Func ListDrives($type)
Local $aArray = DriveGetDrive($type)
Local $drive_A[0][2]
If @error Then
; An error occurred when retrieving the drives.
MsgBox($MB_SYSTEMMODAL,"","It appears an error occurred.")
Else
For $i = 1 To $aArray[0]
_ArrayAdd($drive_A,StringUpper($aArray[$i]) & '|' & DriveGetType($aArray[$i]))
Next
EndIf
Return $drive_A
EndFunc ;==>ListDrives