Dryden Posted September 6, 2008 Share Posted September 6, 2008 (edited) Well I'm going in circles with this...I have an external program that uses dropboxes, and what I want is to make a script that controls them.I already know the instance and class of each one of the dropboxes, but that doesn't seem enough.For example. In this case I have a dropbox and one of the options in it is Saida, so I Use this:$direccao="Saída" ControlSetText("Criar\Editar comunicação", "", "[CLASS:Edit; INSTANCE:1]", $direccao)At first it seems to work, but when I press OK, to confirm, the dopbox is confirmed empty. Basicaly "Saida" was not selected, it only showed that, but even if I replace "Saida" by any other option even if it is an option that doesn't exist, the program accepts it, but when I press ok it's all empty...Any Ideas? Edited September 10, 2008 by Dryden "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett. Link to comment Share on other sites More sharing options...
tbodine88 Posted September 6, 2008 Share Posted September 6, 2008 Well I'm going in circles with this... I have an external program that uses dropboxes, and what I want is to make a script that controls them. I already know the instance and class of each one of the dropboxes, but that doesn't seem enough. For example. In this case I have a dropbox and one of the options in it is Saida, so I Use this: $direccao="Saída" ControlSetText("Criar\Editar comunicação", "", "[CLASS:Edit; INSTANCE:1]", $direccao) At first it seems to work, but when I press OK, to confirm, the dopbox is confirmed empty. Basicaly "Saida" was not selected, it only showed that, but even if I replace "Saida" by any other option even if it is an option that doesn't exist, the program accepts it, but when I press ok it's all empty... Any Ideas? Try using Send("{ENTER}") to select the item. tbodine Link to comment Share on other sites More sharing options...
Dryden Posted September 6, 2008 Author Share Posted September 6, 2008 (edited) Try using Send("{ENTER}") to select the item.That's about how I'm using it right now, the problem with Send is that the window has to be in focus...The way I use it now is: I select the 1st control and then my script works with TAB and other key sends to fill the entire thing.But I'm looking for a way to fill all the textboxes and dropboxes even if the window is hidden or minimized. Edited September 6, 2008 by Dryden "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett. Link to comment Share on other sites More sharing options...
AoRaToS Posted September 6, 2008 Share Posted September 6, 2008 Try using ControlSend() s!mpL3 LAN Messenger Current version 2.9.9.1 [04/07/2019] s!mpL3 LAN Messenger.zip s!mpL3 Link to comment Share on other sites More sharing options...
Dryden Posted September 6, 2008 Author Share Posted September 6, 2008 Try using ControlSend()Doesn't work... It sends some random chars to the controls, but it doesn't even send the text I want. "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett. Link to comment Share on other sites More sharing options...
Dryden Posted September 10, 2008 Author Share Posted September 10, 2008 plz help... "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 10, 2008 Share Posted September 10, 2008 Well I'm going in circles with this... I have an external program that uses dropboxes, and what I want is to make a script that controls them. I already know the instance and class of each one of the dropboxes, but that doesn't seem enough. For example. In this case I have a dropbox and one of the options in it is Saida, so I Use this: $direccao="Saída" ControlSetText("Criar\Editar comunicação", "", "[CLASS:Edit; INSTANCE:1]", $direccao) At first it seems to work, but when I press OK, to confirm, the dopbox is confirmed empty. Basicaly "Saida" was not selected, it only showed that, but even if I replace "Saida" by any other option even if it is an option that doesn't exist, the program accepts it, but when I press ok it's all empty... Any Ideas? A control with a ClassNameNN of Edit1 ("[CLASS:Edit; INSTANCE:1]") is NOT a "dropbox". That would be a ComboBox, most likely. I think you are addressing the wrong control. 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...
Dryden Posted September 10, 2008 Author Share Posted September 10, 2008 A control with a ClassNameNN of Edit1 ("[CLASS:Edit; INSTANCE:1]") is NOT a "dropbox". That would be a ComboBox, most likely. I think you are addressing the wrong control. Yes, that what I meant, it's a ComboBox... I want to select a value from a combobox. That is the right class and instance. Anyone? "Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life." - Terry Pratchett. Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 10, 2008 Share Posted September 10, 2008 Yes, that what I meant, it's a ComboBox... I want to select a value from a combobox. That is the right class and instance. Anyone? Well, it still seems unlikely that you have the right control ID, but ControlSetText() is not the right way to select and item in a ComboBox anyway. It would look more like: ControlCommand("Criar\Editar comunicação", "", "[CLASS:Edit; INSTANCE:1]", "SelectString", $direccao) 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...
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