alain75014 Posted February 10, 2008 Share Posted February 10, 2008 Hello , sorry for my very bad english ,my script is a switch monitor and sound to tv for vista with nvidia...It's work well exept when i reinstall vista because {C3D807BC-3B33-4F35-8295-4B482EA9F1B0} is "variable" HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\{C3D807BC-3B33-4F35-8295-4B482EA9F1B0}\0001","Attach.ToDesktop" I have syntax error in: $current = RegRead("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\"$var"\0001","Attach.ToDesktop") Please help me to correct this ...thank you expandcollapse popup#notrayicon BlockInput(1) WinMinimizeAll() FileInstall ("", @tempDir & "\black.bmp", @tempDir & "\black.bmp") SplashImageOn("", @tempDir & "\black.bmp", 3000, 2500, -1, -1, 1) For $i= 1 to 10 $var = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO", $i) If @error <> 0 then ExitLoop Next $current = RegRead("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\"$var"\0001","Attach.ToDesktop") $dual = "0x00000001" $moniteur= "0x00000000" If $current = $moniteur Then Run("rundll32.exe shell32.dll, Control_RunDLL mmsys.cpl") WinWaitActive("Son") Send("{down}{down}{tab}{tab}{space}{tab}{tab}{space}") Run("rundll32.exe shell32.dll, Control_RunDLL desk.cpl") WinWaitActive("Paramètres d'affichage") Send("{tab}{down}{tab}{tab}{space}{ENTER}") WinWaitActive('[CLASS:#32770]') Send("{tab}{ENTER}") BlockInput(0) ElseIf $current = $dual Then Run("rundll32.exe shell32.dll, Control_RunDLL mmsys.cpl") WinWaitActive("Son") Send("{down}{tab}{tab}{space}{tab}{tab}{space}") Run("rundll32.exe shell32.dll, Control_RunDLL desk.cpl") WinWaitActive("Paramètres d'affichage") Send("{tab}{down}{tab}{tab}{tab}{space}{ENTER}") WinWaitActive('[CLASS:#32770]') Send("{tab}{ENTER}") BlockInput(0) EndIf WinWaitNotActive('[CLASS:#32770]') SplashOff() Link to comment Share on other sites More sharing options...
Achilles Posted February 10, 2008 Share Posted February 10, 2008 $current = RegRead("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\" & $var & "\0001","Attach.ToDesktop")You need the & symbol to combine strings. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
alain75014 Posted February 10, 2008 Author Share Posted February 10, 2008 $current = RegRead("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\" & $var & "\0001","Attach.ToDesktop")You need the & symbol to combine strings. OK, tank you ...no synthax error ! But that not run with " & $var & " ?? Why? Link to comment Share on other sites More sharing options...
Achilles Posted February 10, 2008 Share Posted February 10, 2008 Right before this line: $current = RegRead("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\" & $var & "\0001","Attach.ToDesktop") Use this: Msgbox(0, 'Test', "HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\" & $var & "\0001")To make sure that the whole value is exactly what it's supposed to be... Maybe the $var needs something added before or after it.. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
alain75014 Posted February 10, 2008 Author Share Posted February 10, 2008 Msgbox(0, 'Test', "HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\" & $var & "\0001") Send...in message box... "HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\aucune donnee disponible\0001") no datas ??? and For $i= 1 to 10 $var = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO", $i) If @error <> 0 then ExitLoop MsgBox(4096, "La clef est", $var) Next Send in a message box.... {C3D807BC-3B33-4F35-8295-4B482EA9F1B0} my "variable".... tank for your patience... Link to comment Share on other sites More sharing options...
alain75014 Posted February 11, 2008 Author Share Posted February 11, 2008 Please... Can use me has correct my script I arrive there not .And I do not find examples on this forum which can be applied has my case... Link to comment Share on other sites More sharing options...
woodstock Posted February 21, 2008 Share Posted February 21, 2008 Please... Can use me has correct my script I arrive there not .And I do not find examples on this forum which can be applied has my case... Hello... I am french, so I will use french language to answer... but, it won't be very difficult to understand for the others... I hope. Ton erreur vient de la lecture de la clef par RegEnumKey ... ici: For $i= 1 to 10 $var = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO", $i) If @error <> 0 then ExitLoop NextSelon l'aide sur cette fonction, tu as: RegEnumKey => Success: Returns the requested subkey name.. ; Failure: Returns an error message string and sets the @error flag Donc, avant ton test de sortie de boucle, $var contient le message d'erreur "aucune donnee disponible". La correction de ta boucle pourrait-être du type: For $i= 1 to 10 $tmp = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO", $i) If @error <> 0 then ExitLoop $var = $tmp Next Voilà... Link to comment Share on other sites More sharing options...
Kilhian Posted February 22, 2008 Share Posted February 22, 2008 Hello ,... hum...there is a mistake:$current = RegRead("HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\"$var"\0001","Attach.ToDesktop")oÝ÷ ÚÈhºW[y«¢+ØÀÌØíÕÉɹÐôII ÅÕ½Ðí!-14ÀäÈíMeMQ4ÀäÈí ÕÉÉ¹Ñ ½¹Ñɽ±MÐÀäÈí!ÉÝÉÁɽ¥±ÌÀäÈí ÕÉɹÐÀäÈíMåÍÑ´ÀäÈí ÕÉÉ¹Ñ ½¹Ñɽ±MÐÀäÈí ½¹Ñɽ°ÀäÈíY% Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 22, 2008 Share Posted February 22, 2008 Just for reference, there is a French language site that supports AutoIt (unofficially, I believe) at: www.autoit.frJuste pour la référence, il y a un emplacement français de langue au lequel soutient AutoIt (unofficially, je crois): www.autoit.fr Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Tlem Posted September 1, 2008 Share Posted September 1, 2008 What do you mean by (unofficially, I believe)Are there foreigner official forums ? Best Regards.Thierry Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 1, 2008 Share Posted September 1, 2008 What do you mean by Are there foreigner official forums ?Unofficial only meant not affiliated with Jon or his site at autoitscript.com. I don't know that Jon "officially" supports any non-english AutoIt sites, but he is always looking for people to help with translating documentation. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Tlem Posted September 2, 2008 Share Posted September 2, 2008 Unofficial only meant not affiliated with Jon or his site at autoitscript.com.Jon is just informed about French forum (I do it by mail) and he is welcome when he wants (And all those who wishes to come ).but he is always looking for people to help with translating documentation.It's what we are doing, but it will take more time than planned. Best Regards.Thierry Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 2, 2008 Share Posted September 2, 2008 Jon is just informed about French forum (I do it by mail) and he is welcome when he wants (And all those who wishes to come ).It's what we are doing, but it will take more time than planned. Thank you for your efforts then, it can't be easy to keep up with the changes. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Tlem Posted September 3, 2008 Share Posted September 3, 2008 I hope we can do it nevertheless all. Best Regards.Thierry 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