michelb2 Posted September 18 Posted September 18 My goal is to automate the reading of the gamma setting of my videoprojector. (next step will be the writing) Sony has a program name "Sony Projector Calibration Pro" to read/write/modify the parameter with WinGettext ("[TITLE:Gamma Setting]") i can see the current gamma table select (2.1 in the picture) but i don't know how to select the other possible values (in my case 1.8, 2.0,2.1,....off) Once the gamma is selected, i will need to point to file/export (other option is import) to save the configuration from the projector to my PC
ahmet Posted September 18 Posted September 18 (edited) Can you identify specific control with the AutoIt windows info tool? If you can then you should be able to use ControlCommad to select specific entry inside that combobox. Edit: I see thatvyou can get control info. Play with control command. If it fails try with _GUICtrlComboBox_SelectString Edited September 18 by ahmet
michelb2 Posted September 18 Author Posted September 18 (edited) i try #include <GuiComboBox.au3> local $a $a=WinGettext ("[TITLE:Gamma Setting]") ;CLASS:WindowsForms10.COMBOBOX.app.0.378734a; NAME:ComboBox1; INSTANCE:4 $a=ControlCommand ("[TITLE:Gamma Setting]","","[CLASS:WindowsForms10.COMBOBOX.app.0.378734a; NAME:ComboBox1; INSTANCE:4]","SelectString", '2.1') msgbox(0,@ScriptLineNumber,$a) $a=WinGetHandle("[TITLE:Gamma Setting]") $a=_GUICtrlComboBox_SelectString($a,"1.8") msgbox(0,@ScriptLineNumber,$a) but no good. could you help me more edit : with $a=ControlCommand ("[TITLE:Gamma Setting]","","[NAME:ComboBox1]","ShowDropDown", '') i have a dropdown of the combolist Edited September 18 by michelb2
Nine Posted September 18 Posted September 18 Consider using handle instead of text and always check for error. Also _GUICtrlComboBox_SelectString uses window handle instead of control handle. Try this : #include <GuiComboBox.au3> Local $a=WinGetHandle ("Gamma Setting") ConsoleWrite($a & @CRLF) Local $b=ControlGetHandle ($a,"","WindowsForms10.COMBOBOX.app.0.378734a4") ConsoleWrite($b & @CRLF) ControlCommand($a, "", $b, "SelectString", '2.1') ConsoleWrite(@error & @CRLF) Sleep(2000) Local $c=_GUICtrlComboBox_SelectString($b,"1.8") ConsoleWrite($c & @CRLF) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
michelb2 Posted September 18 Author Posted September 18 Great improvement, i can now select an item in the gamma table and in the color table. now the goal is to Save vp in menu File: (items=Import GCMS File, Export GCMS File ,Exit) i try local $b_file= ControlGetHandle ($a,"","WindowsForms10.Window.8.app.0.378734a7") ; given par au3info_x64 Local $c=_GUICtrlComboBox_SelectString($b_file,"Export GCMS File") but nothing happen (when i manually click on file then on export GCMS File, a window name "Enregistrer sous" (save as) have to open to select a file name) , next step wille be to name the file
Nine Posted September 18 Posted September 18 Is it a menu or a combobox ?! Not clear based on your explanation. Show app screen and au3info report. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
michelb2 Posted September 18 Author Posted September 18 it seems to be a menu (File just under the Gamma Setting title)
Nine Posted September 19 Posted September 19 (edited) It does not seem to be a standard menu. You will need to work with it. Here a few suggestions : 1- Try sending Alt - F to launch the file menu 2- Try clicking the control (MenuStrip1) I am out of town for a week, so good luck... ps. always use handle and confirm that the handle found corresponds to what Au3info tool gives you... Edited September 19 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
rudi Posted September 19 Posted September 19 Try this tool by NirSoft: You can command-line-save the EDID information (and I expect that your beamer will provide them) to a file and process that one with Autoit: https://www.nirsoft.net/utils/monitor_info_view.html Earth is flat, pigs can fly, and Nuclear Power is SAFE!
michelb2 Posted September 20 Author Posted September 20 @nine Alt F works !!!! thanks a lot @rudi the gamma parameters are not at all an EDID information so monitor_info_view is useless
michelb2 Posted September 21 Author Posted September 21 (edited) it's me again ! now, i can open the program, select the window "gamma setting", select the right value of gamma in gamma table, select tue right color and export the data in menu file/export. my mission now is to check AND verify the real time transmitting checkbox and the 64 points radio button. with $a=WinGetHandle("Gamma Setting") $b=ControlGetHandle ($a,"","WindowsForms10.BUTTON.app.0.378734a5") _GUICtrlButton_Click ( $b ) ;ok i can check/uncheck the real time transmitting checkbox (flip -flop) but Local $iCount = ControlCommand($a,"","[ClassNN:WindowsForms10.BUTTON.app.0.378734a5]", "ischecked", "") ;nok Local $iCount = ControlCommand($b,"","", "ischecked", "") ;nok _GUICtrlButton_GetCheck ( $b ) => always 0 _GUICtrlButton_GetCheck ( $a ) => always 0 i can't check the value same problem with 64 points radio button Edited September 21 by michelb2
ahmet Posted September 21 Posted September 21 Check if you get any error after ControlCommand and ischecked.
michelb2 Posted September 21 Author Posted September 21 (edited) both of the ischeck controlcommand return @error=0 ( <=> no error) Edited September 21 by michelb2
michelb2 Posted September 21 Author Posted September 21 (edited) already try : return 0 (with @error 0 ) Edited September 21 by michelb2
ahmet Posted September 21 Posted September 21 I am out of ideas. Post small snnipet that you used to test. Somebody might spot if something is wrong with the code.
michelb2 Posted September 21 Author Posted September 21 (edited) $a=WinGetHandle("Gamma Setting") $b=ControlGetHandle ($a,"","WindowsForms10.BUTTON.app.0.378734a5") _GUICtrlButton_Click ( $b ) ;ok Local $iCount = ControlCommand($a,"","[ClassNN:WindowsForms10.BUTTON.app.0.378734a5]", "ischecked", "") ;nok ConsoleWrite(@error&"<1 "&$iCount&">"&@cr) Local $iCount = ControlCommand($b,"","", "ischecked", "") ;nok ConsoleWrite(@error&"<2 "&$iCount&">"&@cr) $iCount=_GUICtrlButton_GetState ( $a ) ConsoleWrite(@error&"<3 "&$iCount&">"&@cr) $iCount=_GUICtrlButton_GetState ( $b ) ConsoleWrite(@error&"<4 "&$iCount&">"&@cr) Exit answer 0<1 0> 0<2 0> 0<3 0> 0<4 0> Edited September 21 by michelb2
michelb2 Posted September 23 Author Posted September 23 still waiting for the answer to my last problem (isckeck not give me the answer) I have a new question read code below to see how i can have the file name if user modify the proposal ( $key_import="" is a global variable define at the begginning of the script) in this "Open window", user can use keyboard ' {enter} or {esc} or mouse ( click Ouvrir or Annuler) to action how can i know what he has done ? send(@TempDir&@cr) Sleep(150) send($oldfile);&@cr) local $tt=TimerInit() AdlibRegister("keycr",250) while true WinGetHandle("[CLASS:#32770]") if @error then AdlibUnRegister("keycr") ExitLoop EndIf if TimerDiff($tt)>20*1000 then ExitLoop Sleep(200) wend $oldfile=$key_import Sleep(200) exit msgbox(0,@ScriptLineNumber,"import à valider si modif de oldfile "& $oldfile) $b=ControlGetHandle ($a,"","WindowsForms10.BUTTON.app.0.378734a11") ;button finish _GUICtrlButton_Click ( $b ) ;ok mais non controlable par check Return $oldfile EndFunc ;==========Wait @cr====================================================================== func keycr() local $b,$aa $aa=WinGetHandle("[CLASS:#32770]") if @error then return $b=wingettext($aa) $key_import=StringRegExp($b,"(?s):\n(.*?)\n",3)[0] EndFunc
michelb2 Posted September 23 Author Posted September 23 i found a way to handle esc and enter keys i need now to handle the "ouvrir" and "annuler" button AdlibRegister("keycr",250) HotKeySet("{ESC}", "HotKeyPressed") HotKeySet("{ENTER}", "HotKeyPressed") while true if @HotKeyPressed="{ESC}" then ExitLoop if @HotKeyPressed="{ENTER}" then ExitLoop WinGetHandle("[CLASS:#32770]") ;==========Wait @cr====================================================================== func HotKeyPressed() Switch @HotKeyPressed Case "{ESC}" $key_import="" HotKeySet("{ESC}") AdlibUnRegister("keycr") WinClose("[CLASS:#32770]") Case "{ENTER}" HotKeySet("{ENTER}") AdlibUnRegister("keycr") WinClose("[CLASS:#32770]") EndSwitch EndFunc
michelb2 Posted September 23 Author Posted September 23 not really beautiful but it seems to work Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client $p=MouseGetPos() ;if ($p[0]>430 and $p[0]>512) and ($p[1]>532 and $p[1]>553) then ;click= ouvrir if ($p[0]>530 and $p[0]<612) and ($p[1]>532 and $p[1]<553) then $oldfile="" ;click= annuler
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