当我按下 时Enter,VS Code 会在新行的开头添加一个额外的(第 5 个)空格 - 即使我将制表符大小设置为 4 个空格。我该如何让它停止这样做?
Cyman's questions
我正在使用以下脚本,它不会产生错误,但恐怕也不起作用:
if WinActive("ahk_exe wmplayer.exe") or WinActive("ahk_exe Spotify.exe")
{
Left::Send {RCtrl}{Left}
Right::Send {RCtrl}{Right}
}
这个想法是,当 WMP(Windows Media Player)具有焦点时按下箭头键,应该触发全局快捷键(RCtrl + 箭头),这是在 PowerToys 中定义的Prev/Next Track
。全局快捷键有效,但目前还不能通过 Autohotkey 运行...
控制台输出看起来是正确的?
---- M:\Software\Standalone\Apps.ahk
001: if WinActive("ahk_exe wmplayer.exe") || WinActive("ahk_exe Spotify.exe")
006: Exit (14.50)
004: Send,{RCtrl}{Right} (0.03)
004: Return (2.41)
我使用以管理员身份运行的快捷方式(在快捷方式选项中设置)来运行需要管理员权限的 .bat 文件。现在,每次运行时,我都必须允许它,因为 Windows 会弹出警告窗口。
我试过https://superuser.com/a/1613169/313763,但这似乎只适用于 .ps1,而不适用于 .bat 文件?
是否可以在不允许的情况下运行快捷方式?
Windows 进入睡眠模式后,我的 USB 扬声器停止工作。
我尝试过的:
- 在能源选项中禁用选择性 USB 节能
解决方法:
- 拔下/重新插入 USB 电缆:可行,但有点繁琐,因为这种情况每天都会发生几次
- 带开/关按钮的 USB 集线器:效果更好,但音频有时会发出噼啪声(可能是因为集线器)
- 使用 USB 设备树查看器:重新启动设备不起作用,但重新启动端口有效;然而,每次手动执行此操作也有点繁琐
补充说明:
在我的旧电脑上,如果我使用特定的 USB 端口,扬声器在睡眠模式后仍能工作,但我的新电脑似乎不是这样。不知道为什么会这样。
解决方法 3 可以在睡眠模式后自动运行吗(或者有更好的解决方案)?
如果您放大一张图片,Microsoft Photos 不允许浏览图片,只有当您处于默认缩放级别时。这有点令人困惑,所以我决定创建一个 Authotkey 方向来解决这个问题。
由于滚轮始终在 Microsoft Photos 中导航(无论出于何种原因),我的逻辑是在按下导航(箭头)键时始终触发鼠标滚轮滚动。从理论上讲,这很管用,但实际上却行不通。
有谁知道为什么?Autohotkey 方向错误还是其他原因?
#IfWinActive, ahk_exe Microsoft.Photos.exe
Left::Send {WheelUp}
Right::Send {WheelDown}
#If
问题是(这真的很糟糕)每隔一段时间(没有明显原因)备用键在我的键盘上不起作用。我真的尝试了一切(键盘布局,键盘制造商支持,微软多次支持,...),没有工作。所以主要问题是在那种情况下我不能按@,这完全是烦人的。所以我想知道当我按下 AltGr+2 时是否可以强制我的键盘总是生成一个@?
我尝试了 Microsoft PowerToys,但我只能在键盘上分配键,而不是符号。所以这没有帮助。AutoHotkey 可能是可能的,但我不熟悉如何使用这个高级工具来做到这一点。有任何想法吗?
就在几天前,Windows 确实识别出了我全新的 USB 磁盘(也在我的第二台电脑和智能电视上) - 但是有一些问题:Windows 启动后无法识别外部 USB HD - 只有在将其插入并首先插入后才能识别。
现在,从今天开始,Windows 不再识别磁盘了。Windows 磁盘管理也没有。它确实在设备管理器中列出,但是:
当我使用 USB Tree Viewer 检查时,我可以看到磁盘显示有以下详细信息:
=========================== USB Port2 ===========================
Connection Status : 0x01 (Device is connected)
Port Chain : 1-2
========================== Summary =========================
Vendor ID : 0x0BC2 (Seagate Technology LLC)
Product ID : 0x231A
USB version : 2.10
Port maximum Speed : High-Speed
Device maximum Speed : SuperSpeed
Device Connection Speed : High-Speed
Self Powered : no
Demanded Current : 500 mA
Used Endpoints : 5
======================== USB Device ========================
+++++++++++++++++ Device Information ++++++++++++++++++
Device Description : Per USB angeschlossenes SCSI (UAS)-Massenspeichergerät
Device Path 1 : \\?\USB#VID_0BC2&PID_231A#MSFT30NAC25CA9#{2accfe60-c130-11d2-b082-00a0c91efb8b} (GUID_DEVINTERFACE_STORAGEPORT)
Device Path 2 : \\?\USB#VID_0BC2&PID_231A#MSFT30NAC25CA9#{a5dcbf10-6530-11d2-901f-00c04fb951ed} (GUID_DEVINTERFACE_USB_DEVICE)
Kernel Name : \Device\USBPDO-16
Device ID : USB\VID_0BC2&PID_231A\MSFT30NAC25CA9
Hardware IDs : USB\VID_0BC2&PID_231A&REV_0710 USB\VID_0BC2&PID_231A
Driver KeyName : {4d36e97b-e325-11ce-bfc1-08002be10318}\0001 (GUID_DEVCLASS_SCSIADAPTER)
Driver : \SystemRoot\System32\drivers\uaspstor.sys (Version: 10.0.19041.1023 Date: 2021-06-27)
Driver Inf : C:\WINDOWS\inf\uaspstor.inf
Legacy BusType : PNPBus
Class : SCSIAdapter
Class GUID : {4d36e97b-e325-11ce-bfc1-08002be10318} (GUID_DEVCLASS_SCSIADAPTER)
Service : UASPStor
Enumerator : USB
Location Info : Port_#0002.Hub_#0007
Location IDs : PCIROOT(0)#PCI(1602)#USBROOT(0)#USB(2), ACPI(_SB_)#ACPI(PCI0)#ACPI(UHC6)#USBROOT(0)#USB(2)
Container ID : {d7c61337-0c5f-5445-b3f6-b084fcfcf042}
Manufacturer Info : Per USB angeschlossenes SCSI (UAS)-kompatibles Gerät
Capabilities : 0x14 (Removable, UniqueID)
Status : 0x0180600A (DN_DRIVER_LOADED, DN_STARTED, DN_DISABLEABLE, DN_REMOVABLE, DN_NT_ENUMERATOR, DN_NT_DRIVER)
Problem Code : 0
HcDisableSelectiveSuspend: 0
EnableSelectiveSuspend : 0
SelectiveSuspendEnabled : 0
EnhancedPowerMgmtEnabled : 0
IdleInWorkingState : 0
WakeFromSleepState : 0
Power State : D0 (supported: D0, D2, D3, wake from D0, wake from D2)
Child Device 1 : Seagate Expansion SCSI Disk Device (Laufwerk)
Device ID : SCSI\DISK&VEN_SEAGATE&PROD_EXPANSION\6&1EC56E78&0&000000
Class : DiskDrive
Driver KeyName : {4d36e967-e325-11ce-bfc1-08002be10318}\0002 (GUID_DEVCLASS_DISKDRIVE)
Service : disk
Location : Bus Number 0, Target Id 0, LUN 0
+++++++++++++++++ Registry USB Flags +++++++++++++++++
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\0BC2231A0710
osvc : REG_BINARY 00 00
---------------- Connection Information ---------------
Connection Index : 0x02 (Port 2)
Connection Status : 0x01 (DeviceConnected)
Current Config Value : 0x01 (Configuration 1)
Device Address : 0x01 (1)
Is Hub : 0x00 (no)
Device Bus Speed : 0x02 (High-Speed)
Number Of Open Pipes : 0x04 (4 pipes to data endpoints)
Pipe[0] : EndpointID=1 Direction=OUT ScheduleOffset=0 Type=Bulk
Pipe[1] : EndpointID=2 Direction=IN ScheduleOffset=0 Type=Bulk
Pipe[2] : EndpointID=3 Direction=IN ScheduleOffset=0 Type=Bulk
Pipe[3] : EndpointID=4 Direction=OUT ScheduleOffset=0 Type=Bulk
Data (HexDump) : 02 00 00 00 12 01 10 02 00 00 00 40 C2 0B 1A 23 ...........@...#
10 07 01 02 03 01 01 02 00 01 00 04 00 00 00 01 ................
00 00 00 07 05 01 02 00 02 00 00 00 00 00 07 05 ................
82 02 00 02 00 00 00 00 00 07 05 83 02 00 02 00 ................
00 00 00 00 07 05 04 02 00 02 00 00 00 00 00 ...............
--------------- Connection Information V2 -------------
Connection Index : 0x02 (2)
Length : 0x10 (16 bytes)
SupportedUsbProtocols : 0x03
Usb110 : 1 (yes, port supports USB 1.1)
Usb200 : 1 (yes, port supports USB 2.0)
Usb300 : 0 (no, port not supports USB 3.0)
ReservedMBZ : 0x00
Flags : 0x02
DevIsOpAtSsOrHigher : 0 (Device is not operating at SuperSpeed or higher)
DevIsSsCapOrHigher : 1 (Device is SuperSpeed capable or higher)
DevIsOpAtSsPlusOrHigher : 0 (Device is not operating at SuperSpeedPlus or higher)
DevIsSsPlusCapOrHigher : 0 (Device is not SuperSpeedPlus capable or higher)
ReservedMBZ : 0x00
Data (HexDump) : 02 00 00 00 10 00 00 00 03 00 00 00 02 00 00 00 ................
---------------------- Device Descriptor ----------------------
bLength : 0x12 (18 bytes)
bDescriptorType : 0x01 (Device Descriptor)
bcdUSB : 0x210 (USB Version 2.10)
bDeviceClass : 0x00 (defined by the interface descriptors)
bDeviceSubClass : 0x00
bDeviceProtocol : 0x00
bMaxPacketSize0 : 0x40 (64 bytes)
idVendor : 0x0BC2 (Seagate Technology LLC)
idProduct : 0x231A
bcdDevice : 0x0710
iManufacturer : 0x01 (String Descriptor 1)
Language 0x0409 : "Seagate"
iProduct : 0x02 (String Descriptor 2)
Language 0x0409 : "Expansion"
iSerialNumber : 0x03 (String Descriptor 3)
Language 0x0409 : "NAC25CA9"
bNumConfigurations : 0x01 (1 Configuration)
Data (HexDump) : 12 01 10 02 00 00 00 40 C2 0B 1A 23 10 07 01 02 .......@...#....
03 01 ..
------------------ Configuration Descriptor -------------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x02 (Configuration Descriptor)
wTotalLength : 0x0055 (85 bytes)
bNumInterfaces : 0x01 (1 Interface)
bConfigurationValue : 0x01 (Configuration 1)
iConfiguration : 0x00 (No String Descriptor)
bmAttributes : 0x80
D7: Reserved, set 1 : 0x01
D6: Self Powered : 0x00 (no)
D5: Remote Wakeup : 0x00 (no)
D4..0: Reserved, set 0 : 0x00
MaxPower : 0xFA (500 mA)
Data (HexDump) : 09 02 55 00 01 01 00 80 FA 09 04 00 00 02 08 06 ..U.............
50 00 07 05 81 02 00 02 00 07 05 02 02 00 02 00 P...............
09 04 00 01 04 08 06 62 00 07 05 01 02 00 02 00 .......b........
04 24 01 00 07 05 82 02 00 02 00 04 24 02 00 07 .$..........$...
05 83 02 00 02 00 04 24 03 00 07 05 04 02 00 02 .......$........
00 04 24 04 00 ..$..
---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x00
bAlternateSetting : 0x00
bNumEndpoints : 0x02 (2 Endpoints)
bInterfaceClass : 0x08 (Mass Storage)
bInterfaceSubClass : 0x06 (SCSI transparent command set)
bInterfaceProtocol : 0x50 (Bulk-Only Transport)
iInterface : 0x00 (No String Descriptor)
Data (HexDump) : 09 04 00 00 02 08 06 50 00 .......P.
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x81 (Direction=IN EndpointID=1)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0200 (max 512 bytes)
bInterval : 0x00 (never NAKs)
Data (HexDump) : 07 05 81 02 00 02 00 .......
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x02 (Direction=OUT EndpointID=2)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0200 (max 512 bytes)
bInterval : 0x00 (never NAKs)
Data (HexDump) : 07 05 02 02 00 02 00 .......
---------------- Interface Descriptor -----------------
bLength : 0x09 (9 bytes)
bDescriptorType : 0x04 (Interface Descriptor)
bInterfaceNumber : 0x00
bAlternateSetting : 0x01
bNumEndpoints : 0x04 (4 Endpoints)
bInterfaceClass : 0x08 (Mass Storage)
bInterfaceSubClass : 0x06 (SCSI transparent command set)
bInterfaceProtocol : 0x62 (USB Attached SCSI - UAS)
iInterface : 0x00 (No String Descriptor)
Data (HexDump) : 09 04 00 01 04 08 06 62 00 .......b.
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x01 (Direction=OUT EndpointID=1)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0200 (max 512 bytes)
bInterval : 0x00 (never NAKs)
Data (HexDump) : 07 05 01 02 00 02 00 .......
------------- UAS Pipe Usage Descriptor ---------------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x24 (UAS Pipe Usage Descriptor)
bPipeID : 0x01 (Pipe ID=1)
bReserved : 0x00
Data (HexDump) : 04 24 01 00 .$..
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x82 (Direction=IN EndpointID=2)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0200 (max 512 bytes)
bInterval : 0x00 (never NAKs)
Data (HexDump) : 07 05 82 02 00 02 00 .......
------------- UAS Pipe Usage Descriptor ---------------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x24 (UAS Pipe Usage Descriptor)
bPipeID : 0x02 (Pipe ID=2)
bReserved : 0x00
Data (HexDump) : 04 24 02 00 .$..
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x83 (Direction=IN EndpointID=3)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0200 (max 512 bytes)
bInterval : 0x00 (never NAKs)
Data (HexDump) : 07 05 83 02 00 02 00 .......
------------- UAS Pipe Usage Descriptor ---------------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x24 (UAS Pipe Usage Descriptor)
bPipeID : 0x03 (Pipe ID=3)
bReserved : 0x00
Data (HexDump) : 04 24 03 00 .$..
----------------- Endpoint Descriptor -----------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x05 (Endpoint Descriptor)
bEndpointAddress : 0x04 (Direction=OUT EndpointID=4)
bmAttributes : 0x02 (TransferType=Bulk)
wMaxPacketSize : 0x0200 (max 512 bytes)
bInterval : 0x00 (never NAKs)
Data (HexDump) : 07 05 04 02 00 02 00 .......
------------- UAS Pipe Usage Descriptor ---------------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x24 (UAS Pipe Usage Descriptor)
bPipeID : 0x04 (Pipe ID=4)
bReserved : 0x00
Data (HexDump) : 04 24 04 00 .$..
----------------- Device Qualifier Descriptor -----------------
bLength : 0x0A (10 bytes)
bDescriptorType : 0x06 (Device_qualifier Descriptor)
bcdUSB : 0x210 (USB Version 2.10)
bDeviceClass : 0x00 (defined by the interface descriptors)
bDeviceSubClass : 0x00
bDeviceProtocol : 0x00
bMaxPacketSize0 : 0x40 (64 Bytes)
bNumConfigurations : 0x01 (1 other-speed configuration)
bReserved : 0x00
Data (HexDump) : 0A 06 10 02 00 00 00 40 01 00 .......@..
---------- Binary Object Store (BOS) Descriptor -----------
bLength : 0x05 (5 bytes)
bDescriptorType : 0x0F (Binary Object Store)
wTotalLength : 0x0016 (22 bytes)
bNumDeviceCaps : 0x02
Data (HexDump) : 05 0F 16 00 02 .....
------------- USB 2.0 Extension Descriptor ------------
bLength : 0x07 (7 bytes)
bDescriptorType : 0x10 (Device Capability Descriptor)
bDevCapabilityType : 0x02 (USB 2.0 Extension)
bmAttributes : 0xF0E
LPMCapable : 1 (Link Power Management protocol is supported)
BESLAndAlternateHIRD : 1 (BESL & Alternate HIRD definitions are supported)
BaselineBESLValid : 1 (valid)
DeepBESLValid : 0 (not valid)
BaselineBESL : 15 (10000 µs)
DeepBESL : 0
Data (HexDump) : 07 10 02 0E 0F 00 00 .......
----- SuperSpeed USB Device Capability Descriptor -----
bLength : 0x0A (10 bytes)
bDescriptorType : 0x10 (Device Capability Descriptor)
bDevCapabilityType : 0x03 (SuperSpeed USB Device Capability)
bmAttributes : 0x00
Bit 0 Reserved : 0x00
Bit 1 LTM Capable : 0x00 (no)
Bit 7:2 Reserved : 0x00
wSpeedsSupported : 0x0E (Full-Speed, High-Speed, SuperSpeed)
bFunctionalitySupport : 0x01 (lowest speed with all the functionality is 'Full-Speed')
bU1DevExitLat : 0x0A (less than 10 µs)
wU2DevExitLat : 0x0020 (less than 32 µs)
Data (HexDump) : 0A 10 03 00 0E 00 01 0A 20 00 ........ .
-------------------- String Descriptors -------------------
------ String Descriptor 0 ------
bLength : 0x04 (4 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language ID[0] : 0x0409 (English - United States)
Data (HexDump) : 04 03 09 04 ....
------ String Descriptor 1 ------
bLength : 0x10 (16 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "Seagate"
Data (HexDump) : 10 03 53 00 65 00 61 00 67 00 61 00 74 00 65 00 ..S.e.a.g.a.t.e.
------ String Descriptor 2 ------
bLength : 0x14 (20 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "Expansion"
Data (HexDump) : 14 03 45 00 78 00 70 00 61 00 6E 00 73 00 69 00 ..E.x.p.a.n.s.i.
6F 00 6E 00 o.n.
------ String Descriptor 3 ------
bLength : 0x12 (18 bytes)
bDescriptorType : 0x03 (String Descriptor)
Language 0x0409 : "NAC25CA9"
Data (HexDump) : 12 03 4E 00 41 00 43 00 32 00 35 00 43 00 41 00 ..N.A.C.2.5.C.A.
39 00 9.
问题
- 当磁盘在设备管理器中列出,但不在 Windows 或磁盘管理中,这是什么意思?
- 如何使我的磁盘在 Windows 中再次可见并访问磁盘上的数据?
昨天,我的电脑显示器确实说它没有任何信号,即使我的电脑像往常一样插入。我什至尝试了不同的电缆和不同的源(笔记本电脑),但仍然没有图像,甚至显示器的菜单也没有出现。个人电脑和笔记本电脑都很好,它们都可以将电视用作替代显示器。
然而,一天后,显示器再次工作,就好像什么都没发生一样。这只是暂时的(就像硬盘故障一样,它们会慢慢堆积)我应该考虑购买一台新显示器(它已经使用了 5 年以上,每天使用至少 12 小时)还是我错过了一些东西而显示器只是美好的?
有没有办法测试监视器的健康状况,例如使用 CrystalDiskInfo 的硬盘驱动器?
我对这篇博文中提到的以下两条指令感到困惑,Windows Media Player 12 在播放时显示错误的封面艺术
然后(单独地,否则您将不会获得“安全”选项卡)在资源管理器中调出每个人的属性,并向下钻取到每个人的访问控制列表(您可能需要添加一个)。
好吧,我没有看到“所有人”,我该如何添加这个“所有人”选项?
现在在 ACL 窗口中,勾选拒绝写入这些文件
我必须准确勾选哪些选项?有很多可用的选项(完全访问、更改、读取、运行……)
似乎在使用 WMP 增强之前是可能的,但我发现的 [manual][1] 似乎是针对旧版本的,因为我在 WMP 12 中找不到这个选项。
[![截图][2]][2]
是否仍然可以自动标准化播放具有不同音量级别的不同音频文件?
[1]:http://On%20https://www.windows-media-player.com/set-up-the-same-volume-level/#:~:text=1)%20In%20Windows%20Media %20播放器,在%20the%20following%20screen%20shot。[2]:https ://i.stack.imgur.com/urKM6.png
Windows 10 夜间模式可以打开或关闭。但我更愿意一步一步地开始激活它,就像慢慢地调暗灯光一样。例如,从晚上 8 点开始添加 10%,然后每 15 分钟左右添加 10%。这怎么可能实现?
我正在使用带有 PC 的普通外接显示器,并希望能够根据白天自动调整显示器的亮度。
所以,早上它应该开始变暗一点,到中午逐渐变亮。到了晚上,它应该慢慢变暗一点。
如何做到这一点?