Archive: some questions


some questions
i created a AVS Preset-Pack, so i want to know,
a) how can i set the AVS as actual Vis-Plugin?
b)how can i set my preset pack as the actual preset pack in AVS(set a random for 10 seconds too) ?
c)create a Dialog Box that shows any coments after installation?
d) how can i close Winamp befor install and restart after?

thanx

GreatWho


I don't have any idea about a and b, maybe killahbite can help you. He worked on some AVS packs.

c) Use either MessageBox or InstallOptions (in your contrib dir)
d) Have a look at functions.htm, it has a function called CloseWinamp :D


a) use this line to set avs as default visualization plugin.

WriteINIStr $INSTDIR\Winamp.ini Winamp visplugin_name vis_avs.dll


additionally you should copy a preset of your choice to the plugins directory, rename it to vis_avs.dat (name of the currently played avs).

b) this sets the current preset pack


WriteINIStr $INSTDIR\Winamp.ini AVS config_pres_subdir "NAME OF YOUR PACK"


additionally you need these two to make it switch at random time. the first line activates the random mode, the second sets the interval

WriteINIStr $INSTDIR\Winamp.ini AVS cfg_fs_rnd 1
WriteINIStr $INSTDIR\Winamp.ini AVS cfg_fs_rnd_time 10


[edited by kichik]c+d have already been answered[/edit]

sorry, had problems with opera, let's continue

d) if you additionally want to close winamp 3.x, use this code

Section -CloseWinamp3
Call CloseWinamp3
SectionEnd
Function CloseWinamp3
Push $0
loop:
FindWindow $0 "STUDIO"
IntCmp $0 0 done
SendMessage $0 16 0 0
Sleep 100
Goto loop
done:
Pop $0
FunctionEnd


just make sure the functions are not within a section.

to restart winamp after the installation, simply use

Execute $INSTDIR\Winamp.exe


additional info: you might want to use this, to search the registry for the winamp installation part.

InstallDir $PROGRAMFILES\Winamp
; detect winamp path from uninstall string if available
InstallDirRegKey HKLM \
"Software\Microsoft\Windows\CurrentVersion\Uninstall\Winamp" \
"UninstallString"


have fun,

j

btw, this might be interesting for you (in future). i'm currently optimizing my so called avscript for NSIS2, a simple .nsi file, that allows various features to install avs. future version will check for the installed version of avs. i also need to work on the compatibility with winamp 3. once avscript is final, i will release the source in this forum.

you might check full circle remixes, just click the link below. it's the first avs-pack using my avscript, but as i said, it's not yet the final.


(sorry for the many replies)

current features of avscript for NSIS2:

* configure avs within nsis (resolution, color, overlay)
* modify avs settings in winamp.ini (settings will be restored)
* closes winamp 1.x, 2.x and 3.x

work in progress:

* the whole configuration progress will be optional
* more settings to be altered through setup (interval, random)
* documentation of the source code
* optimized winamp 3.x support (detection and correct setup)

well, as i said, will keep you updated ;)


thanx for your help
thanx alot... so i can finish my new Pack in near future and publish it on Winamp.com. i hope it will become five Stars, so i want that all is perfect ;) :D :D

GreatWho


I had ONE question for you all ! A just very simple one, but i can't find the answer :

In the MessageBox function, there's an argument MB_SETFOREGROUND !
Well, i can't find the use of this function ! this should normally change text 's color, shouldn't it ?
Well, does anybody knows what this function does, and how to use it ?
Thansk a lot ;) :) !


From MSDN:

MB_SETFOREGROUND
The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box.

sorry... may be tired ... of course, you're right !