Champak Posted November 30, 2013 Share Posted November 30, 2013 In my app I'm using visualization from wmp. I can get it to work in my script, but my issue is I can't change it realtime in my app. I have to save the settings in my app and then start the app again for the new visualization to take place. I've tried many code combos, but I just can't get a real time reload like wmp12. Any help please. This is the part in my app that shows the visualization: $MEDIAVISUALGUI = GUICreate($APPTITLE & " - Visual Screen", 640, $MVHeight, 0, -$MVHeight, $WS_POPUP);, $WS_EX_TOPMOST) GUISetBkColor(0x000000) $OIE_AD = _IECreateEmbedded() $MEDIA_PLAYER_ARRAY[18] = GUICtrlCreateObj($OIE_AD, 0, 0, $MVWidth, $MVHeight-95) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0x000000) _IENavigate($OIE_AD, "about:blank", 1) _IELoadWait($OIE_AD, 180, 4000) Do Sleep(50) $ODOC_AD = $OIE_AD.document Until IsObj($ODOC_AD) Sleep(25) $OBODY_AD = $ODOC_AD.body $OBODY_AD.scroll = "no" $OBODY_ADSTYLE = $OBODY_AD.style With $OBODY_ADSTYLE .margin = "0px" .border = "0px" .padding = "0px" .backgroundcolor = "#ff0000" EndWith $OPLAYER1 = $ODOC_AD.createElement("OBJECT") With $OPLAYER1 .style.width = $MVWidth .style.height = $MVHeight .style.background = "#000000" .classid = "CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" .uiMode = "none" .settings.setMode("loop", "false") EndWith $OBODY_AD.appendChild($OPLAYER1) Guisetstate() This is the function in my app that saves the setting: $UNIVERSALVAR0 = _ArraySearch($MEDIA_VISUALIZATION_ARRAY, GUICtrlRead($MEDIA_SETTINGS_ARRAY[18][1]), 0, 0, 0, 0, 1, 1) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Preferences", "CurrentEffectPreset", "REG_DWORD", $MEDIA_VISUALIZATION_ARRAY[$UNIVERSALVAR0][2]) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\Preferences", "CurrentEffectType", "REG_SZ", $MEDIA_VISUALIZATION_ARRAY[$UNIVERSALVAR0][0]) Link to comment Share on other sites More sharing options...
Champak Posted December 2, 2013 Author Share Posted December 2, 2013 I found this and think its what i need tomdo, but don't know how to impliment it in autoit. http://msdn.microsoft.com/en-us/library/windows/desktop/dd563271(v=vs.85).aspx Any help. Link to comment Share on other sites More sharing options...
Champak Posted December 10, 2013 Author Share Posted December 10, 2013 Bump Link to comment Share on other sites More sharing options...
Wruck Posted December 10, 2013 Share Posted December 10, 2013 Have you thought about destroying and then creating a new IE object to resolve? Link to comment Share on other sites More sharing options...
Champak Posted December 11, 2013 Author Share Posted December 11, 2013 i thought about that but didnt do it for two reasons. 1 if i have something playing it would interrupt it, also, 2 i figure there is a specific way to program it since wmp does it. Link to comment Share on other sites More sharing options...
Champak Posted December 16, 2013 Author Share Posted December 16, 2013 One more question on this topic. When changing songs the background in the object area sometimes flashes white...70% of the time. How can I make sure that doesn't happen? Locking and Disabling the GUi doesn't help. I programmed the background of the object black, I also set the GUICTRL to black even though that isn't supposed to be able to do anything according to msdn. I also set a black gui window to pop up and stay for a half a second which works 50% of the time. Any other thoughts or ways of painting the background of the object black? NOTE: I used red in the example in the op just to see what was happening. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now