Jump to content

Search the Community

Showing results for tags 'getpos'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. Hello everybody (and sorry for my bad english) I try to get the position of a contextmenu (GUICtrlCreateContextMenu) on a TreeView, with ControlGetPos, but i can't. Someone can help me ? Thank you :) PS: I need the position to select item wtih rightclick before read the text of the item, because rightclick don't select item (only leftclick).
  2. Hello, I am currently trying to automatically click the "Yes" button in the ActiveX prompt/popup message after opening the IE (html). At 1st, I encounter the "Allow Blocked Content". I already resolve it just by changing settings in the IE Options. But after resolving the "Allow Blocked Content", there's a popup message appear. I have attached the ActiveX Prompt. Here is the 1st code that I try to use. #include <IE.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> _IECreate("C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\sampleAWD10.html",0,1,0) Local $oIE = _IEAttach("", "instance", 1) _IELoadWait($oIE) AdlibRegister("_ActiveXRun",250) Local $oLastName = _IEGetObjByName($oIE, "Text4") Local $oGetItem = _IEGetObjByName($oIE, "getitem") _IEAction($oGetItem, "click") MsgBox($MB_SYSTEMMODAL, "Form Element Value", _IEFormElementGetValue($oGetItem)) Func _ActiveXRun() $retWin = WinGetHandle("[Class:Button]","") $winTitle = "[HANDLE:" & $retWin &"]" $ctrlHandle = ControlGetHandle($winTitle,"", "[CLASS:Button; INSTANCE:2]") $ctrlTitle = "HANDLE:" & $ctrlHandle &"]" WinWaitActive($ctrlTitle,"[CLASS:Button; INSTANCE:2]",10) $k = ControlGetPos($winTitle, "","[CLASS:Button; INSTANCE:2]") $x = $k[0] $y = $k[1] WinActivate ($winTitle,"An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?") ControlFocus($winTitle,"An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?","[CLASS:Button; INSTANCE:2]") ControlClick($winTitle, "","[CLASS:Button; INSTANCE:2]","primary",1,$x,$y) ControlSend($winTitle, "", "[CLASS:Button; INSTANCE:2]", "{ENTER}", 0) EndFunc Here is the console output. >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" /UserParams +>12:44:11 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\april\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\april\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3 +>12:44:11 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop "C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\AWD10.1.au3" (31) : ==> Subscript used on non-accessible variable.: $x = $k[0] $x = $k^ ERROR ->12:44:24 AutoIt3.exe ended.rc:1 +>12:44:24 AutoIt3Wrapper Finished. >Exit code: 1 Time: 13.76 I also tried a simpler code. include <IE.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> _IECreate("C:\Users\april\Documents\Logo\JRB\AutoIt\AutoBOT\AWD10\sampleAWD10.html",0,1,0) Local $oIE = _IEAttach("", "instance", 1) _IELoadWait($oIE) $k = ControlGetPos("[CLASS:#32770]", "","[CLASS:Button; INSTANCE:2]") $x = $k[0] $y = $k[1] ControlClick("[CLASS:#32770]", "","[CLASS:Button; INSTANCE:2]","primary",1,$x,$y) Local $oLastName = _IEGetObjByName($oIE, "Text4") Local $oGetItem = _IEGetObjByName($oIE, "getitem") _IEAction($oGetItem, "click") MsgBox($MB_SYSTEMMODAL, "Form Element Value", _IEFormElementGetValue($oGetItem)) There's no error in the console output for the 2nd code I have tried. And here is the Window Info for the ActiveX prompt. >>>> Window <<<< Title: Internet Explorer Class: #32770 Position: 580, 338 Size: 376, 146 Style: 0x94C808C4 ExStyle: 0x00010101 Handle: 0x00000000001516FA >>>> Control <<<< Class: Button Instance: 2 ClassnameNN: Button2 Name: Advanced (Class): [CLASS:Button; INSTANCE:2] ID: 1 Text: &Yes Position: 184, 77 Size: 80, 22 ControlClick Coords: 37, 12 Style: 0x50010000 ExStyle: 0x00000004 Handle: 0x00000000001215DE >>>> Mouse <<<< Position: 228, 120 Cursor ID: 0 Color: 0xFFFFFF >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< &No An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction? &Yes >>>> Hidden Text <<<<
  3. Hello, I need help, I have created couple small pictures(about 200) in one GUI, I need to move them fast about 1-5 pixels every picture somehow. There are only pictures in GUI, no other controls. I tried this, but it's too slow: Global Const $AC_SRC_ALPHA = 1 For $ii = 0 To $size For $iii = 0 To $size GUICtrlSetPos(_ArrayGet($data, $ii, $iii, 1), ControlGetPos($GUI, "", _ArrayGet($data, $ii, $iii, 1))[0] + 2, ControlGetPos($GUI, "", _ArrayGet($data, $ii, $iii, 1))[1] + 2) Next Next Func _ArrayGet(ByRef $aArray, $i1, $i2 = 0, $i3 = 0, $i4 = 0, $i5 = 0, $i6 = 0, $i7 = 0, $i8 = 0, $i9 = 0, $i10 = 0, $i11 = 0, $i12 = 0, $i13 = 0, $i14 = 0, $i15 = 0, $i16 = 0, $i17 = 0, $i18 = 0, $i19 = 0, $i20 = 0) ;Function made by ProgAndy Local $iDims = UBound($aArray, 0) #forceref $i1, $i2, $i3, $i4, $i5, $i6, $i7, $i8, $i9, $i10, $i11, $i12, $i13, $i14, $i15, $i16, $i17, $i18, $i19, $i20 Local $NULL If Not IsArray($aArray) Then Return SetError(1, 1, $NULL) Local $sAccess = "$aArray" For $i = 1 To $iDims Local $iIndex = Int(Eval("i" & $i)) If $iIndex >= UBound($aArray, $i) Then Return SetError(3, $i, $NULL) $sAccess &= '[' & $iIndex & ']' Next If @NumParams - 1 > $iDims Then For $i = $iDims - 1 To @NumParams $sAccess &= ", $i" & $i Next Local $vResult = Execute("_ArrayGet(" & $sAccess & ")") If @error Then SetError(@error, @extended + $iDims) Return $vResult Else Return Execute($sAccess) EndIf EndFunc ;==>_ArrayGetI didn't wrote all script, becouse it's huge. It took about 1200 - 1600 milisecounds, I need that pictures would move much faster. It's possible to make it much faster, that it would took about 2-10 milisecounds? Thanks.
×
×
  • Create New...