[已解决]读取INI文件键值问题
本帖最后由 天天笑 于 2018-8-2 08:16 编辑大神们,
有啥办法可以读取INI文件键值中含有"="的内容。
如下面
Content=ABCRestore = USB Reset
现在用 IniReadSection读取的结果是:
G74002 Content ABC
G74002 Restore USB Reset
我期望的结果是:
G74002 Content ABCRestore = USB Reset
不知道能不能实现 http://www.autoit3.cn/thread-12319-1-1.html
_IniRead('xxx', 'G74002', 'Content=ABCRestore') 提个思路,先读整行,然后从第一个=截取两段... afan 发表于 2018-7-30 09:08
http://www.autoit3.cn/thread-12319-1-1.html
_IniRead('xxx', 'G74002', 'Content=ABCRestore')
Hi Afan,
我的附件是这样的,可以麻烦你帮忙看一下吗?感谢
天天笑 发表于 2018-7-30 11:29
Hi Afan,
我的附件是这样的,可以麻烦你帮忙看一下吗?感谢
你试试下载看看能不能解压… afan 发表于 2018-7-30 12:24
你试试下载看看能不能解压…
可以的。我再用ZIP试一下 天天笑 发表于 2018-7-30 13:18
可以的。我再用ZIP试一下
这个可以解压。
测试没问题,只是你的数据里面含有很多@LF换行符,需要组织成字符串
#include '_Ini.au3'
Local $fIni = @ScriptDir & '\INI多个=.ini'
Local $str = _IniRead($fIni, 'A10006', 'Content=Use NAPPHDD/Lan Download method to load your image into test SKU.(NAPPHDD/Lan Download should meet NAPP SPEC definition) ' & @LF & _
'*** Partition Ratio should be follow DT HDD Partition Spec (the latest version)' & @LF & _
'** You can downloadDT HDD Partition Spec from :ftp://ftp.kgqt00.tw/Testscript/Tools' & @LF & _
' account/password : ODM/ODM_Login' & @LF & @LF & _
' * Make sure the brand display on UI was correct' & @LF & _
' * System drive (HDD/SSD) size <', '')
MsgBox(0, '', $str) afan 发表于 2018-7-30 13:36
这个可以解压。
测试没问题,只是你的数据里面含有很多@LF换行符,需要组织成字符串
不好意思,Afan,应该是我没有表达清楚。
我想要的结果是:
A10006 Content Use NAPPHDD/Lan Download method to load your image into test SKU.(NAPPHDD/Lan Download should meet NAPP SPEC definition)
*** Partition Ratio should be follow DT HDD Partition Spec (the latest version)
** You can downloadDT HDD Partition Spec from :ftp://ftp.kgqt00.tw/Testscript/Tools
account/password : ODM/ODM_Login
* Make sure the brand display on UI was correct
* System drive (HDD/SSD) size <= 256GB, should apply “single partition” for all brands except Veriton China and Founder.
(For China Commercial HPA projects , always create partitions into C:\ 50% & D:\ 50%)
Content Alaunch process
After reboot , the system will start Alaunch process automatically. Make sure there are no error messages on Windows boot or Alaunch process such as a failed Windows boot on previous start-up.
-Make sure Alaunch process(bar UI)
*During the Alaunch process, please don't use mouse and keyboard. Besides, make sure the system not getting into S3 mode.
Content Only for LPCD ENUS
Not for disk size is <= 16GB
- You must do this test case whatever the hidden partition is exist or not
- Put SCD in the ODD and press F12 to select boot from ODD when turning on the PC
- And then follow the instruction to insert RCD, Language Package CD in order.
- Make sure you can restore to factory default.
- After D2D via SCD & RCD, W10 OOBE settings should be the same as NAPP process.
- The OOBE process, please connect Internet and step by step PASS OOBE
- Make sure you can into end user desktop without error message.
- Please execute #B25015 test item
- Please into WinPE environment.(Alt+F10) & WinRE(press Shift + system reboot) environment , make sure all USB3.0 ports workable
Content Issue that release notice listed "Fixed Issue" have been fixed.
#include '_Ini.au3'
Local $fIni = @ScriptDir & '\INI多个=.ini'
Local $sD = 'A10006'
Local $sAD = _IniReadSection_str($fIni, $sD)
MsgBox(0, '', $sD & @TAB & StringReplace($sAD, '=', @TAB, 1)) afan 发表于 2018-7-30 14:41
#include '_Ini.au3'
Local $fIni = @ScriptDir & '\INI多个=.ini'
Local $sD = 'A10006'
感谢afan,问题已解决
页:
[1]