Jump to content

gigabyte

Active Members
  • Posts

    20
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

gigabyte's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Nope, Couldn't get the idea. UAC is blocking the autoit script to execute .Just dont get how can writting another script works. Please guide.
  2. I am running my scripts on a remote machine. Only Disabling UAC will launch the application otherwise nothing happens. If I disable UAC, during running my tests while executing autoit script it prompts for Allow autoit script to make changes in your system. How can I get rid of this message. Tried making the program exe to run as administrator but still its not working. Edited: Even in the .net script from where I am calling the autoitscript I am running it as run as administrator. but nothing seems to work. Public Sub ShellandWait(ByVal ProcessPath As String, ByVal Argument As String) Dim objProcess As System.Diagnostics.Process Try objProcess = New System.Diagnostics.Process() objProcess.StartInfo.Verb = "runas" objProcess.StartInfo.Arguments = Argument objProcess.StartInfo.FileName = ProcessPath objProcess.Start() 'Wait until it's finished objProcess.WaitForExit() 'Exitcode as String Console.WriteLine(objProcess.ExitCode.ToString()) objProcess.Close() Catch ex As Exception Assert.Fail("Could not start process " & ProcessPath & " " & ex.Message.ToString) End Try End Sub PLease help
  3. But My problem is it is successfully selecting the item from list as I can see but on back end it is not setting the object ref in application under test. I am unable to figure out how? As if I manually select I can see another combo box values being populated but in this case it selects the item but next combo is not updated so when It clicks the submit button ..Application says object ref not set. I also didn't get MSAA concept as I am a newbie. Please suggest. Need your help in this regard. If possible provide me some reference. I would be highly grateful.
  4. At last the following code selects the desired item from list but after clicking the button it wont actually set the object ref _GUICtrlComboBox_SelectString($shcombo, "TYY Processor (QWERYY980) - Q00S00") sleep(3000) $hButton = ControlGetHandle($title, "Submit", $hButtonCtrlId) _GUICtrlButton_Click($hButton) This code makes the desired selection and then clicks the button but actually the object ref was not set to that desired item. I searched for the dot net forums but couldn't find any thing that gives me a clue. PLz guide
  5. #Include <GuiComboBox.au3> #Include <GuiComboBoxEX.au3> #include <GUIListBox.au3> #include <GUIConstantsEx.au3> ;~#AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator global $hcombo = "[NAME:ctlMsgQueueCombo]" global $hcomboclass = "[CLASS:WindowsForms10.COMBOBOX.app.0.2bf8098_r15_ad12]" global $title = "Test Form" global $index = 0 WinActivate ($title) ;Start test executable Run("Z:\test\Info.Test\bin\Debug\Info.Test.exe") sleep(6000) controlFocus("", "", "[NAME:ctlSelector]") controlsend("", "", "[NAME:ctlSelector]", 'QWER67') sleep(1000) local $shcombo = ControlGetHandle($title, "", $hcombo) local $sText = 'TYY Processor (QWERYY980) - Q00S00' $Index = _GUICtrlComboBox_FindStringExact($shcombo, $sText) _GUICtrlComboBox_SelectString($shcombo, $Index)
  6. Yes doing it like this but it doesn't make any difference. local $shcombo = ControlGetHandle($title, "", $hcombo) local $sText = 'TQW - Q00C00' WinWaitActive($title) $Index = _GUICtrlComboBox_FindStringExact($shcombo, $sText) _GUICtrlComboBox_SelectString($shcombo, $Index) Please also find related links and
  7. Trying to use the following code to select a item from existing external application form dropdown but it just stays same. No change. Any idea what I am doing wrong #Include <GuiComboBoxEx.au3> WinWaitActive($title) $Index = _GUICtrlComboBoxEx_FindStringExact($hcombo, $sText) _GUICtrlComboBoxEx_SetCurSel($hcombo, $Index) or following WinWaitActive($title) $Index = _GUICtrlComboBox_FindStringExact($hcombo, $sText) _GUICtrlComboBox_SelectString($hcombo, $Index) Urgent help
  8. I am having the same problem..ANy luck
  9. Yes I tested your piece of code and yes it works fine when you create your own form and populate it with values. Problem is coming when you have an existing windows application form with already populated values in it. and then you try to find a string, it wont work. Not possible for me to send that form, Can you please test this with any of your existing application, If possible. Would be highly grateful. the following code works but always selects 5th item in list from a list of 10 items $index = ControlCommand($title,"",$hcombo,"FindString",'TPA Processor (TPA QWERTYAD Compound) - Qwert01') ControlSend($title, "", $hcombo, "select", $index)
  10. Just found out in the following codeControlCommand($title,"Find String",$hcombo,"SetCurrentSelection",$index) "SetCurrentSelection" would not come up while typing instead just Select is available. Am I missing some library or any missing tool.
  11. So sorry for jumping too quickly, but really feels like banging my head on wall.. .
  12. Can you please tell, you are trying this code on which ver of windows. I am using Windows 7. PLz also guide in your code ControlCommand("Run", "Type", "ComboBox1", "SetCurrentSelection", $index) what is this "Type" refering to.
  13. Looks like a bug in autoit, as it is unable to handle a specific string instead just matches first characters and if they match just selects it, if its a external gui form.
  14. Yes, But couldn't make it work
  15. I am confused, Please clear my understanding. Why do we have to create a GUIcombobox and populate it with values. What I want is to select value from an existing open form. Is it possible with this. because in the example you are creating a new combo and then populating it with values. and then using the guicombo to find a string. please guide.
×
×
  • Create New...