Here is the script, but something is wrong. CAn someone point it out for me?
The code is a fragment of the entire script. I'm using an InstallOptions page to present a text field where one can enter a title, the ARTIST and ALBUM is variables declared with Var and set to static values using StrCpy. When user clicks the next button, the function above gets called, and it just executes the commands past next label and then keeps the page by using an undocumented message to reload the page. This is so I can write to the IO ini file and have the new data reloaded by InstallOptions.
Function Page1Leave
ReadIniStr $R0 "$PLUGINSDIR\msnmsgr-nowplaying.ini" "Settings" "State"
StrCmp $R0 0 next
Abort
next:
ReadIniStr $R1 "$PLUGINSDIR\msnmsgr-nowplaying.ini" "Field 1" "State"
StrCpy $TITLE $R1
StrCpy $ARTIST "Saivert"
StrCpy $ALBUM "The last one"
StrCpy $R4 'Music\01\0{0} - {1}\0 $ARTIST \0 $TITLE \0 $ALBUM \0WMContentID'
StrLen $R5 $R4
IntOp $R5 $R5 * 2
System::Alloc /NOUNLOAD 256
Pop $R6
System::Call /NOUNLOAD "*$R6(&w128 R4.)"
System::Call /NOUNLOAD "*(i 0x547, i R5, i R1) i .R2"
FindWindow $R3 "MsnMsgrUIManager"
SendMessage $R3 ${WM_COPYDATA} $HWNDPARENT $R2
System::Free /NOUNLOAD $R2
System::Free $R6
; Write to IO ini file
WriteIniStr "$PLUGINSDIR\msnmsgr-nowplaying.ini" "Field 3" "Text" $R4
SendMessage $HWNDPARENT 0x408 0 0 ; Reload page
Abort
FunctionEnd