Jump to content

super1337

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by super1337

  1. Nice stuff... much simplier than I would have guessed. I made some modifications that might be useful to others for getting a specific MSI Property. $sMSI = FileOpenDialog("MSI Properties", @ScriptDir, "Windows Installer Files (*.msi)") MsgBox(0,0,'ProductName: ' & Execute_MSI_Query($sMSI,'ProductName')) MsgBox(0,0,'Manufacturer: ' & Execute_MSI_Query($sMSI,'Manufacturer')) MsgBox(0,0,'ProductVersion: ' & Execute_MSI_Query($sMSI,'ProductVersion')) Func Execute_MSI_Query($MSIPath, $PropertyName) If FileExists($MSIPath) And $PropertyName <> '' Then Local $Query = "SELECT Value FROM Property WHERE Property = '" & $PropertyName & "'" $oInstaller = ObjCreate("WindowsInstaller.Installer") $oDB = $oInstaller.OpenDataBase($MSIPath, 0) $oView = $oDB.OpenView($Query) $oView.Execute() $oRecords = $oView.Fetch $oPropValue = $oRecords.StringData(1) If $oPropValue <> "" Then Return $oPropValue EndIf EndIf Return "" EndFunc
  2. There are certain values I would like to get out of an MSI such as Product Name, Publisher, and Version number. Manually these values can be gathered using ORCA... but is there a way to do it programatically using AutoIT?
  3. Lars you're the man... that is exactly what I was looking for!
  4. Had a question that wasn't apparant to me... If you have a listview with $TVS_HASBUTTONS and $TVS_CHECKBOXES turned on, is there a way to make it so that any child items do not have checkboxes? I was hoping to have something where checkboxes could be turned on for a parent, but the child properties would have no checkbox and would just include descriptive text about the parents. Also, is there a way to force all of the child objects to be checked when the parent is checked? After reading some threads I saw a lot of people having problems with this configuration being turned on, but mine seems to be off by default. Thanks in advance!
  5. Unfortunately the website requires a login which most people won't have. I think the follow code below displays my dilemma(or misunderstanding). All I want to do is find the submit button but the coordinates I am getting back have no relationship to where it actually is on the screen #include <IE.au3> Local $oIE = _IE_Example("form") Local $oTextArea = _IEGetObjByName($oIE, "submitExample") _IEACTION($oTextArea, "scrollintoview") ; Get coordinates and dimensions of the textarea Local $iScreenX = _IEPropertyGet($oTextArea, "screenx") Local $iScreenY = _IEPropertyGet($oTextArea, "screeny") Local $iBrowserX = _IEPropertyGet($oTextArea, "browserx") Local $iBrowserY = _IEPropertyGet($oTextArea, "browserY") ; Outline the textarea with the mouse, come to rest in the center Msgbox(0,0,$iScreenX & ' ' & $iScreenY) Msgbox(0,0,$iBrowserX & ' ' & $iBrowserY) I guess those coordinates are in relationship to the internet explorer window... not the desktop. How do you use them at that point to click on objects?
  6. No luck unfortunately,, that just tries to scroll the brower to the next page.
  7. I am running into a few compounding problems: All I am trying to do is click a continue button using Internet Explorer. $oIE = _IEAttach("Sprint") _IEImgClick($oIE, "Continue", "alt",0,0) The problem is that the website uses javascript once the continue button is pressed. It then causes AutoIT to be nonresponsive until the javascript prompt is clicked. (Javascript confirm function) The conventional wisdom seems to be to use example 2 on _IEAction as such: Local $oIE = _IE_Example("form") Local $oSubmit = _IEGetObjByName($oIE, "submitExample") Local $hWnd = _IEPropertyGet($oIE, "hwnd") _IEAction($oSubmit, "focus") ControlSend($hWnd, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "{Enter}") This doesn't work for me either because the javascript is coded in such a way that it only proceeds when clicked by the left mouse button... the enter key seems to refresh the page. The next thing I tried was to get the coordinates of the Continue button. I get coordinate values back but they don't seem to relate to the button properly. $oImgs = _IEImgGetCollection($oIE) For $oImg In $oImgs If StringInStr($oImg.src,"ContinueYellow",0) Then $ContinueButtonImage = $oImg Endif Next $ContinueButtonImageXcoordinate = _IEPropertyGet($ContinueButtonImage,"browserx") $ContinueButtonImageYcoordinate = _IEPropertyGet($ContinueButtonImage,"browsery") MouseClick("left",$ContinueButtonImageXcoordinate, $ContinueButtonImageYcoordinate) Can any advise how to resolve this? Example 3 gets the proper image... if I look at $oImg.src it has the proper URL. Also, I was having trouble getting the scrollintoview option to work... whenever I try _IEAction($ContinueButtonImage, "scrollintoview") it does not work. I would greatly appreciate any help as I've spent about 5 hours trying to make this work.
  8. I just found the answer... whoops. There is a command line option for Shell execute. The following fix works: If Not IsAdmin() Then Global $CmdArgList For $i = 1 To $cmdLine[0] $CmdArgList = $CmdArgList & ' ' & $cmdLine[$i] Next ShellExecute(@AutoItExe, $CmdArgList, "", "runas") ProcessClose(@AutoItPID) Exit EndIf
  9. I am trying to run an application that requires UAC to elevate permissions with command line parameters... I tried the following: If Not IsAdmin() Then Global $CmdArgList For $i = 1 To $cmdLine[0] $CmdArgList = $CmdArgList & ' ' & $cmdLine[$i] Next ShellExecute(@AutoItExe & $CmdArgList, "", "", "runas") ProcessClose(@AutoItPID) Exit EndIf It passes all the command line parameters to shell execute so that when it runs as admin, it still has the initial parameters. Unfortunately this does not work as it complains that Windows cannot find the exe file. Apparently it doesn't like command line parameters being passed to it. Is there a correct way to do something like this?
×
×
  • Create New...