Nancy12 Posted September 20, 2016 Share Posted September 20, 2016 Hello All, I am new to AutoIT. I am trying to modify the Skype video settings and save the change. The settings works fine but i am unable to save it. How do I on click on the "Save"Button. I tried this using Control Click and specified the Classname, text, instance etc. but this did not work for me. The instance Id keeps changing to either 3 or 7 every time I tried this: ;Check if the script finds the Save button If WinExists("Skype™ - Options", "[ClassnameNN:TNavigableButton7; TEXT:Save]") Then MsgBox(0, "", "Message before save") EndIf ; Save the changes Opt("WinTitleMatchMode", 4) ControlClick("Skype™- Options", "", "[ClassnameNN:TNavigableButton7; TEXT:Save]") Using the Window info i got this information: Title: Skype™ - Options Class: TOptionsForm Position: 2109, 173 Size: 786, 608 Style: 0x16CA0000 ExStyle: 0x00010100 Handle: 0x0015060E >>>> Control <<<< Class: TNavigableButton Instance: 7 ClassnameNN: TNavigableButton7 Name: Advanced (Class): [CLASS:TNavigableButton; INSTANCE:7] ID: 199210 Text: Save Position: 614, 545 Size: 75, 25 ControlClick Coords: 42, 9 Style: 0x54010000 ExStyle: 0x00000000 Handle: 0x00030A2A >>>> Mouse <<<< Position: 2768, 752 Cursor ID: 0 Color: 0xEDEDED >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< tsVideo CyberLink Webcam Splitter Change your profile picture Webcam settings Automatically receive video and share screens with anyone people in my Contact list only no one Save Cancel Link to comment Share on other sites More sharing options...
alienclone Posted September 21, 2016 Share Posted September 21, 2016 i always go with as little descriptive info as possible, so long as i am sure there are not going to be any other windows with similar info. change the wintitlematchmode opt to match any substring in the title then go with basics (assuming the controlID does not change also... Opt("WinTitleMatchMode", 2) ;Matches any substring in the title ControlClick("Options", "", "199210") If @error Then MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!") EndIf "Yeah yeah yeah patience, how long will that take?" -Ed Gruberman REAL search results | SciTE4AutoIt3 Editor Full Version 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