I still feel trying to get a working 81 is worth my time,
And of course, we want to make sure it works as expected with the version included!...Haven't had the time yet to dig into the CAPI coding to see what is going on and why it is getting the index wrong and appending the extra characters on some lines but not others...LATER!
interesting. in some cases the 2 rightmost chars are not getting trimmed off. probably because of not counting the "" in the string length. possibly a bug since WriteInterface as that part of the code didn't really change.
My apologies Homes32, but this is not correct.
With a totally clean project installation area (just unpack the archive), and set the source location to an SP1 DVD directory, but without running first the save in the MAIN (i.e. first) configuration script, I get an empty value (Attachment Link) I thought this may be because it couldn't retrieve the WIM tools, so I tried to run the 00-retrieve.script to retrieve the wim tools. It gave me an error about not finding Autoit (AU3361), since it had an empty value for the OS architecture???
[Process]//run HostOSInfoMini if not done in main configurationIf,%OSArch%,Equal,"",Run,%scriptfile%,HostOSInfoMiniand section HostOSInfoMini
WIMImageInfo_Name="Install.wim:",1,1,295,10,255,18,8,BoldScriptInterface,Write,"Install.wim: %WIMIndex% - %WIMNAME%",%scriptfile%,WIMImageInfo_Name givesWIMImageInfo_Name="Install.wim: 5 - Windows 7 ULTIMATE":",1,1,295,10,255,18,8,Bold
WIMImageInfo_Name=Install.wim:,1,1,295,10,255,18,8,Bold givesWIMImageInfo_Name="Install.wim: 5 - Windows 7 ULTIMATE",1,1,295,10,255,18,8,Bold
WIMImageInfo_Arch=Architecture:,1,1,300,75,250,18,8,NormalScriptInterface,Write,"Architecture:%SourceArch%",%scriptfile%,WIMImageInfo_Arch givesWIMImageInfo_Arch=Architecture:x86,1,1,300,75,250,18,8,Normal
Ok, try this (I also modified to introduce compatibility with 077rc2, functions remain untest by me with 080):Code: [Select][_ScriptInterface]// Parent Command for Interface Operations// ScriptInterface,Command[,Parms]Run,%API%,_ScriptInterface_#1,#2,#3,#4,#5,#6,#7,#8,#9[_ScriptInterface_Read]// ScriptInterface,Read,%VarResult%,Filename,ComponentName[,Position][,Interface]// Read the value of an interface element from a different script than the currently executing one.// #1=%VarResult% #2=FileName #3=ComponentName #4=Position #5=InterfaceIf,#2,Equal,,Set,#2,%ScriptFile%If,Not,#5,Equal,,Set,%_Interface_%,#5Else,BeginIniRead,#2,Main,Interface,%_Interface_%If,%_Interface_%,Equal,,Set,%_Interface_%,InterfaceEndIniRead,#2,%_Interface_%,#3,%_Component_%StrFormat,SPLIT,"%_Component_%",#$c,3,%_CpntType_%If,#4,Bigger,0,StrFormat,SPLIT,"%_Component_%",#$c,#4,%tVar%Else,Begin// if no position specified use the "value" parmaterSelect_Case,%_CpntType_%,"0|1|2|3|4|5|6|8|9|10|11|12|13|14","8|1|8|8|1|1|1|1|1|8|8|2|1|8"StrFormat,SPLIT,"%_Component_%",#$c,%Case%,%tVar%If,%_CpntType_%,EQUAL,14,Begin//radiogroup type controls need extra workStrFormat,SPLIT,"%_Component_%",#$c,0,#9StrFormat,SPLIT,"%_Component_%",#$c,#9,%tVar%StrFormat,LEFT,%tVar%,2,#8If,#8,Equal,__,BeginStrFormat,DEC,#9,1StrFormat,SPLIT,"%_Component_%",#$c,#9,%tVar%EndEndEndStrFormat,CTRIM,#1,#$p,%t%Set,%%t%%,%tVar%[_ScriptInterface_State]// ScriptInterface,State,ComponentName[,State][,Filename][,RefreshInterface][,Interface]// State=0(Hide) or 1(Visible) (If State is empty it is set to 1)// Filename=If empty it is set to %ScriptFile%// RefreshInterface=True or False// Ex: ScriptInterface,State,CheckBox_Ram,0,,True// #1=ComponentName #2=State #3=FileName #4=Refresh? #5=InterfaceIf,Not,#2,Equal,0,Set,#2,1If,#3,Equal,,Set,#3,%ScriptFile%If,Not,#5,Equal,,Set,%_Interface_%,#5Else,BeginIniRead,#3,Main,Interface,%_Interface_%If,%_Interface_%,Equal,,Set,%_Interface_%,InterfaceEndIniRead,#3,%_Interface_%,#1,%_Component_%StrFormat,SPLIT,%_Component_%,#$c,1,%Cpnt1%//StrFormat,Len,%Cpnt1%,%_LenCpnt1_%_Calculate,StringLen('%Cpnt1%'),_LenCpnt1_StrFormat,POS,%Cpnt1%,#$s,#9If,#9,Bigger,0,BeginIf,#9,Smaller,%_LenCpnt1_%,Set,%Cpnt1%,#$q%Cpnt1%#$qStrFormat,Inc,%_LenCpnt1_%,2EndStrFormat,Inc,%_LenCpnt1_%,2StrFormat,LTRIM,%_Component_%,%_LenCpnt1_%,%RightResult%IniWrite,#3,%_Interface_%,#1,"%Cpnt1%#$c#2%RightResult%"If,#4,Equal,True,System,REFRESHINTERFACE[_ScriptInterface_Write]// ScriptInterface,Write,NewValue,Filename,ComponentName[,Position][,Interface]// #1=NewValue #2=FileName #3=ComponentName #4=ComponentPosition #5=InterfaceIf,#2,Equal,,Set,#2,%ScriptFile%Set,%Pos_End%,0_Calculate,"StringLen('#1')",_Len1_StrFormat,POS,#1,#$s,#9If,#9,Bigger,0,Begin If,#9,Smaller,%_Len1_%,Set,#1,#$q#1#$qEndIf,Not,#5,Equal,,Set,%_Interface_%,#5Else,Begin IniRead,#2,Main,Interface,%_Interface_% If,%_Interface_%,Equal,,Set,%_Interface_%,InterfaceEndIniRead,#2,%_Interface_%,#3,%_Component_%StrFormat,SPLIT,"%_Component_%",#$c,3,%_CpntType_%If,#4,Equal,,Begin // if no position specified use the "value" parmater Select_Case,%_CpntType_%,"0|1|2|3|4|5|6|8|9|10|11|12|13|14","8|1|8|8|1|1|1|1|1|8|8|2|1|8" Set,#4,%Case% If,%_CpntType_%,EQUAL,14,Begin //radiogroup type controls need extra work StrFormat,SPLIT,%_Component_%,#$c,0,#4 StrFormat,SPLIT,%_Component_%,#$c,#4,#7 StrFormat,LEFT,#7,2,#8 If,#8,Equal,__,StrFormat,DEC,#4,1 EndEndStrFormat,REPLACE,%_Component_%,#$q,|,%_tComponent_%_Calculate,"StringLen('%_tComponent_%')",_LENComponent_StrFormat,SPLIT,%_Component_%,"#$c",1,%Cpnt1%StrFormat,POS,%_Component_%,%Cpnt1%,%CheckQuotes%If,%CheckQuotes%,Bigger,1,Set,"%Cpnt1%","#$q%Cpnt1%#$q"StrFormat,SPLIT,%Cpnt1%,#$q,0,%_Quote%StrFormat,REPLACE,%Cpnt1%,#$q,|,%tCpnt1%_Calculate,"StringLen('%tCpnt1%')",_LenCpnt1_StrFormat,POS,%Cpnt1%,#$s,#9If,#9,Bigger,0,Begin If,#9,Smaller,%_LenCpnt1_%,Set,%Cpnt1%,#$q%Cpnt1%#$q StrFormat,Inc,%_LenCpnt1_%,2EndIf,#4,Bigger,1,Begin StrFormat,Inc,%_LenCpnt1_%,1 StrFormat,LTRIM,%_Component_%,%_LenCpnt1_%,%_Component2_% StrFormat,Dec,#4,1 Set,%Pos_End%,%_LenCpnt1_% Loop,%API%,GetPos,1,#4,%_Component2_% If,%Pos_Star%,Equal,0,Set,%LeftResult%,"" Else,StrFormat,LEFT,%_Component_%,%Pos_Start%,%LeftResult% If,%Pos_End%,Bigger,%Pos_Start%,Begin StrFormat,Dec,%Pos_End%,1 StrFormat,LTRIM,%_Component_%,%Pos_End%,%RightResult% End Else,Set,%RightResult%,"" IniWrite,#2,%_Interface_%,#3,"%LeftResult%#1%RightResult%"EndElse,Begin If,%_Quote%,Bigger,2,StrFormat,Inc,%_LenCpnt1_%,%_Quote% StrFormat,LTRIM,%_Component_%,%_LenCpnt1_%,%RightResult% IniWrite,#2,%_Interface_%,#3,#1%RightResult%End[GetPos]Set,%Pos_Start%,%Pos_End%If,#c,Bigger,6,BeginStrFormat,SPLIT,%_Component2_%,#$c,#c,#7StrFormat,SPLIT,#7,#$q,0,#6_Calculate,StringLen('#7'),_Param9_Set,#9,%_Param9_%StrFormat,POS,#7,#$s,#8StrFormat,Inc,#9,#6StrFormat,LTRIM,#1,#9,#1If,#8,Bigger,0,StrFormat,Inc,#9,2EndElse,BeginStrFormat,POS,#1,#$c,#9StrFormat,LTRIM,#1,#9,#1EndStrFormat,INC,%Pos_End%,#9Regards,Galapo.
actually, the problem is in images.script and not really in Capi ,Label value without spaces are currently written with quotes, and this is the problem.
Quote from: Galapo on May 18, 2011, 03:47:52 AMOk, try this (I also modified to introduce compatibility with 077rc2, functions remain untest by me with 080):sorry. no change in results. :(
Ok, try this (I also modified to introduce compatibility with 077rc2, functions remain untest by me with 080):