Jump to content

Search the Community

Showing results for tags 'coordinates'.

  • 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

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 11 results

  1. Cannot find example how to locate taskbar icon coordinates or position by window handle. I want to use PixelChecksum to check only rectangle area over specified taskbar item. Please help. What I already have found and succesfully run for whole taskbar area: $taskbar = WinGetHandle("[Class:Shell_TrayWnd]") $taskbarPos = WinGetPos($taskbar) $tasklistPos = ControlGetPos($taskbar, "", "[CLASS:MSTaskListWClass; INSTANCE:1]")  $iOldCheckSum = PixelChecksum($taskbarPos[0] + $tasklistPos[0], $taskbarPos[1] + $tasklistPos[1], $taskbarPos[0] + $tasklistPos[2], $taskbarPos[1] + $tasklistPos[3]); I know also that I can pass window handle as parameter to PixelChecksum, but don't know how to do this with taskbar icon. Also I was able to find something similar but seems outdated: WatchWindows __ thanks in advance
  2. #include<img/img.au3> #include <AutoItConstants.au3> Func Skype() $coords = imageSearch(0,0,-1,-1,"Skype.PNG") MouseMove($coords[0],$coords[1]) [when it find the skype icon i want it to move from these coordinates, but of insted of moving to an expecific coordinate i want it to move down from these coordinates, (there is multiple images so i cant move to an specific image)] -- Kinda having trouble telling what i want cuz english isnt my first language, sorry about that. ;X MouseClick($MOUSE_CLICK_LEFT)
  3. I have a script that has to work on multiple resolutions but each resolution has slightly different co-ordinates due to automatic UI scaling. I have had to make separate files for each but would like to implement them all in one script. I have a similar program written for Java which uses else if statements to use different co-ordinates for each resolution after it has been detected. I'm not good with Java so I would like to implement this on AutoIt before later making a Java version. This is a snippet of the autoit code I have. ToolTip("1 - Search") MouseClick("Left", @DesktopWidth *0.823, @DesktopHeight *0.925, 1, 25) ToolTip("2 - Buy Now") MouseClick("Left", @DesktopWidth *0.83, @DesktopHeight *0.798, 1, 27) ToolTip("3 - OK") MouseClick("Left", @DesktopWidth *0.555, @DesktopHeight *0.596, 1, 15) ToolTip("4 - OK Clear Error") MouseClick("Left", @DesktopWidth *0.49, @DesktopHeight *0.597, 1, 30) ToolTip("5 - Back to Search") MouseClick("Left", @DesktopWidth *0.161, @DesktopHeight *0.108, 1, 15) This is a snippet of a java code I used. Thanks. private static void goToSearch(double maxX, double maxY, Robot bot) throws InterruptedException {     int currentX = 0;     int currentY = 0;     if (maxX == 2650 && maxY == 1440) {         currentX = 734;         currentY = 1316;     } else if (maxX == 1920 && maxY == 1200) {         currentX = 551;         currentY = 1096;     } else if (maxX == 1920 && maxY == 1080) {         currentX = 551;         currentY = 1042;     } else if (maxX == 1680 && maxY == 1050) {         currentX = 482;         currentY = 959;     } else if (maxX == 1440 && maxY == 900) {         currentX = 413;         currentY = 822;     } else if (maxX == 1366 && maxY == 768) {         currentX = 392;         currentY = 741;     } else if (maxX == 1280 && maxY == 800) {         currentX = 367;         currentY = 731;
  4. This script created by Varian is getting an error saying Obfuscator support has been discontinued and replaced by Au3Stripper. He said: To help you with the coordinates, use this script and browse over the button or area that you wish to be clicked. Exit the script by pressing the Escape key. The information displayed on the exiting message box will be copied to the clipboard for you to paste into a text editor so that you can use it. Just make sure that you use the correct MouseCoord option (window/client). you should also make sure that the window size remains constant...this can be handled using the WinMove() function. Has anyone converted it to Au3Stripper or can you convert it? #region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=\\TEST-PC\D$\Icons\Intellipoint-010.ico #AutoIt3Wrapper_Compression=4 #AutoIt3Wrapper_Res_Fileversion=1.0.0.0 #AutoIt3Wrapper_Res_LegalCopyright=Created by Varian L.Styles #AutoIt3Wrapper_Run_AU3Check=n #AutoIt3Wrapper_Run_Obfuscator=y #Obfuscator_Parameters=/striponly #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt('PixelCoordMode', 2) Opt('MouseCoordMode', 2) Opt('TrayIconDebug', 1) Opt('TrayAutoPause', 0) #include <Misc.au3> _Singleton(@ScriptName, 0) ProcessSetPriority(@AutoItPID, 0) Global $wPos, $mPos, $mClientPos, $mWindowPos, $Text, $wTitle, $Color HotKeySet('{ESC}', '_Quit') While 1 Mouse_Coords() ;Sleep(10) WEnd Func _Quit() ToolTip('') $Text &= 'Mouse Position/Desktop: ' & $$mPos[0] & ',' & $$mPos[1] & @CRLF $Text &= 'Mouse Position/Window: ' & $mWindowPos[0] & ',' & $mWindowPos[1] & @CRLF $Text &= 'Mouse Position/Client: ' & $mClientPos[0] & ',' & $mClientPos[1] & @CRLF $wPos = WinGetPos('[ACTIVE]', '') $wTitle = StringLeft(WinGetTitle('[ACTIVE]', ''), 15) $Text &= '"' & $wTitle & '" Top-Left Coords: ' & $wPos[0] & ',' & $wPos[1] & @CRLF $Text &= '"' & $wTitle & '" Window Size: ' & $wPos[2] & ',' & $wPos[3] & @CRLF $Text &= 'Color: ' & Hex(PixelGetColor($mClientPos[0], $mClientPos[1]), 6) ClipPut($Text) MsgBox(0, 'Mouse Position Results', $Text) Exit EndFunc ;==>_Quit Func Mouse_Coords() Local $String Opt('MouseCoordMode', 1) $mPos = MouseGetPos() Opt('MouseCoordMode', 0) $mWindowPos = MouseGetPos() Opt('MouseCoordMode', 2) $mClientPos = MouseGetPos() $Color = 'Hex Color: ' & Hex(PixelGetColor($mClientPos[0], $mClientPos[1]), 6) $String &= 'Window Title: ' & StringLeft(WinGetTiTle('[ACTIVE]'), 25) & @LF $String &= 'Desktop X: ' & $mPos[0] & ' Y: ' & $mPos[1] & @LF $String &= 'Window X: ' & $mWindowPos[0] & ' Y: ' & $mWindowPos[1] & @LF $String &= 'Client X: ' & $mClientPos[0] & ' Y: ' & $mClientPos[1] & @LF ToolTip($String & $Color) EndFunc ;==>Mouse_Coords Thanks, Docfxit
  5. I am trying to drag and drop an item from listview on one side to the parent element in workspace. From list view I selected the text which I want to drag, but I need to get the coordinates of the selected text. I thought of using MouseClickDrag command. is there any other way to do this?
  6. Hi, i wanna creat an _Imagesearch / Mousemove script for an 3D/FPS Game and have Problems with the mousemove. In the game like Curveball(2D) its still works but in games like Battlefield (3D) are the absolute coordinates not really helpfull. Someone have an idea or an Example for me ?
  7. Can I make it so that when I put MouseClick("left", 300, 200), it will click those coordinates on a window so if I run it on a different computer or move the window, it will still click on the same spot.
  8. I've got a simple little script that is trying to step through data in a datagrid. I have written and rewritten this thing to try and keep it running, but it just keeps coming up with values I just don't think it can get. I've played with the timing and it seems to run a little better when slowed down, but setting my $delay higher and higher gets me less and less improvement, but starts to really drag the process to a crawl. Removing the sleeps entirely isn't even that bad. Every time I send a ^C to copy a value, I verify it, and then when I'm done with it, I reset the Clipboard with a known value that will never show in my data and reverify the clipboard. So either my reset/verification is not doing it's job or my mouse double click is not getting the coordinates updated. Neither of these options are great because I'm running out of ideas how to make sure I get what I want. About all I can do at this point is attempt my copy, then validate that the clipboard isn't my reset string, isn't zero length, and THEN match it to a date REGEX to see if it's the data from the correct column. That would be triple checking something that shouldn't need to be checked once. Scrip and output below: $desiredDate = "2/9/2015" $yCoord = 290 $yStep = 15 $recDisplay = 9 ;number of rows to read before starting to scroll $totalRec = 0 $PONList = "" $delay = 250 $dcDelay = 12 $count = 0 $clipReset = "chicken" $oCoastal = WinActivate("Find FOC") WinWaitActive($oCoastal) if @error Then msgBox(1, "winactivate error", @error) Exit endif AutoItSetOption("MouseCoordMode", 0) AutoItSetOption("SendKeyDownDelay", 100) ClipPut("") While 1 ;get date ;MouseMove(284, $yCoord, 1) MouseClick("left", 284, $yCoord, 2, $dcDelay) Sleep($delay) while 1 MouseClick("left", 284, $yCoord, 2, $dcDelay) ;Sleep($delay) Send("^c") ;Sleep($delay) $thisDate = clipGet() if StringCompare($thisDate, $clipReset) <> 0 and StringLen($thisDate) > 0 Then resetClip($clipReset) ExitLoop EndIf WEnd ConsoleWrite($count & ": Date: " & $thisDate) ;check date matches what we want ;if not StringCompare($desiredDate, $thisDate) = 0 Then ;with some date functions, this could be improved to a date range if StringRegExp($thisDate, $desiredDate) = 0 Then ;just check to see if the desired date exists inside what was copied ;we have reached the end of our records MsgBox(1, "Found " & $totalRec & " total records", $PONList) Exit ;or exitloop endif ;get pon ;MouseMove(81, $yCoord, 1) MouseClick("left", 81, $yCoord, 2, $dcDelay) Sleep($delay) While 1 MouseClick("left", 81, $yCoord, 2, $dcDelay) ;Sleep($delay) Send("^c") ;Sleep($delay) $thisPON = clipGet() if StringCompare($thisPON, $clipReset) <> 0 and StringLen($thisPON) > 0 Then resetClip($clipReset) ExitLoop EndIf WEnd ConsoleWrite(" PON:" & $thisPON & @CRLF) ;Check if we want this record if StringCompare(StringMid($thisPON, 10, 1), "D") = 0 Then ;We want this record! $totalRec += 1 $PONList = $PONList & ", " & $thisPon EndIf if $recDisplay >= 1 Then ;still in the first 10 records and need to move the mouseclick position down by a record $yCoord += $yStep $recDisplay -= 1 Else ;reached the bottom of the data grid and need to click the down arrow in the bottom right of the grid to advance one record MouseClick("left", 650, 438,1) ;Sleep($delay) endIf ;consolewrite($recDisplay & @CRLF) $count += 1 Wend func resetClip($val = "") Do ClipPut($val) Until StringCompare(ClipGet(), $val) = 0 EndFunc And here's a sample output. Everything looks great until the last row. This was not the last row in the data and should not have stopped here, but you can see the PON is either still on the clipboard, or the mouse click did not update the coordinates and copied the MouseClick commands didn't move to the coordinates: 0: Date: 2/9/2015 PON:173714357INN0001 1: Date: 2/9/2015 PON:173708683DID0001 2: Date: 2/9/2015 PON:173708683DID0003 3: Date: 2/9/2015 PON:173546121INN0001 4: Date: 2/9/2015 PON:173701848INN0001 5: Date: 2/9/2015 PON:173454114INN0001 6: Date: 2/9/2015 PON:173708683DID0002 7: Date: 2/9/2015 PON:173714373DID0001 8: Date: 2/9/2015 PON:173709684INN0001 9: Date: 2/9/2015 PON:173621964INN0001 10: Date: 2/9/2015 PON:173710242CHC0001 11: Date: 2/9/2015 PON:855440C 12: Date: 2/9/2015 PON:173531625INN0001 13: Date: 2/9/2015 PON:173717963DID0001 14: Date: 2/9/2015 PON:173717560DID0001 15: Date: 2/9/2015 PON:173713978DID0001 16: Date: 2/9/2015 PON:173710221INN0001 17: Date: 2/9/2015 PON:173713002INN0001 18: Date: 2/9/2015 PON:173456352RGN0001 19: Date: 2/9/2015 PON:173712598DID0001 20: Date: 2/9/2015 PON:173709807DID0001 21: Date: 2/9/2015 PON:173616984INN0001 22: Date: 2/9/2015 PON:173646606INN0001 23: Date: 2/9/2015 PON:173649988INN0002 24: Date: 2/9/2015 PON:173712524INR0001 25: Date: 2/9/2015 PON:173710904DID0001 26: Date: 2/9/2015 PON:173717004INN0001 27: Date: 2/9/2015 PON:173712871INN0001 28: Date: 2/9/2015 PON:173426776RGN0001 29: Date: 2/9/2015 PON:173418924RGN0001 30: Date: 2/9/2015 PON:173712465INR0001 31: Date: 2/9/2015 PON:173712465INR0002 32: Date: 2/9/2015 PON:173712524INR0002 33: Date: 2/9/2015 PON:173710788INR0001 34: Date: 2/9/2015 PON:173710788INR0002 35: Date: 2/9/2015 PON:173712737DID0001 36: Date: 2/9/2015 PON:173717129INN0001 37: Date: 2/9/2015 PON:173718061DID0001 38: Date: 2/9/2015 PON:173717663INN0001 39: Date: 2/9/2015 PON:173718181DID0001 40: Date: 2/9/2015 PON:173714071DID0001 41: Date: 2/9/2015 PON:173692375INN0002 42: Date: 173692375INN0002
  9. Two small spherical trig UDFs using Airy's ellipsoid to convert between the British Ordnance Survey grid (easting and northing, in metres) and latitude-longitude coordinates (in decimal degrees), with alternative ellipsoids for Ireland and Channel Islands (see annotations at the end). All four parameters need to be pre-declared (as the new values are parsed ByRef). Source was partly gleaned from here. I doubt whether anyone outside of Britain will find this of use, but you never know, so here goes: ; Example OS grid to lat/lon $easting=651409 ; in meters $northing=313177 ; in meters $lat=0 ; in decimal degrees $lon=0 ; in decimal degrees ; returns results in pre-declared vars $lat, $lon _OSgrid_ToLatLon($easting, $northing, $lat, $lon) MsgBox(0,"OSgrid_TOLatLon", "OS coordinates Easting: " & $easting & ", Northing: " & $northing & @CR & _ "Latitude: " & $lat & ", Longitude: " & $lon & @CR & "NGR: " & _OSNE2BNG($easting, $northing)) ; Example lat/lon to OS grid $lat = 52.65757 $lon = 1.71791 $easting=0 $northing=0 _OSgrid_FromLatLon($lat, $lon, $easting, $northing) MsgBox(0,"OSgrid_FROMLatLon", "OS coordinates Easting: " & $easting & ", Northing: " & $northing & @CR & _ "Latitude: " & $lat & ", Longitude: " & $lon & @CR & "NGR: " & _OSNE2BNG($easting, $northing)) Func _OSgrid_ToLatLon($E, $N, ByRef $lat, ByRef $lon) ; converts Ordnance Survey grid easting and norting, in meters ; into latitude-longitude coordinates, in decimal degrees ; source not recorded; adapted from a code I wrote many years ago. Local $deg2rad=3.141592653589793238462643/180 Local $rad2deg=180/3.141592653589793238462643 ; Airy 1830, national grid parameters Local $a = 6377563.396 ; semi-major ellipsoidal axis Local $b = 6356256.910 ; semi-minor ellipsoidal axis Local $N0= -100000 ; northing of true origin Local $E0= 400000 ; easting of true origin Local $F0= 0.9996012717 ; scale factor on central meridian Local $phi0= 49 * $deg2rad ; latitude of true origin Local $lam0= -2 * $deg2rad ; longitude of true origin and central meridian Local $e2=($a^2-$b^2)/$a^2 ; squared ellipticity Local $phi_prime=(($N-$N0)/($a*$F0))+$phi0 Local $M=_GetM($phi_prime) Local $iter=0 While abs($N-$N0-$M)>=0.01 and $iter<=100 ; max iterations to converge $iter+=1 $phi_prime=(($N-$N0-$M)/($a*$F0))+$phi_prime $M=_GetM($phi_prime) WEnd Local $nu = $a*$F0*(1-$e2*sin($phi_prime)^2)^-0.5 Local $rho = $a*$F0*(1-$e2)*(1-$e2*sin($phi_prime)^2)^-1.5 Local $eta2 = ($nu/$rho)-1 Local $VII = tan($phi_prime)/(2*$rho*$nu) Local $VIII = (tan($phi_prime)/(24*$rho*$nu^3))*(5+3*tan($phi_prime)^2+$eta2-$eta2*9*(tan($phi_prime)^2)) Local $IX = (tan($phi_prime)/(720*$rho*$nu^5))*(61+(90*tan($phi_prime)^2)+45*tan($phi_prime)^4) Local $X = _sec($phi_prime)/$nu Local $XI = (_sec($phi_prime)/(6*$nu^3))*(($nu/$rho)+2*tan($phi_prime)^2) Local $XII = (_sec($phi_prime)/(120*$nu^5))*(5+(28*tan($phi_prime)^2)+24*tan($phi_prime)^4) Local $XIIA = (_sec($phi_prime)/(5040*$nu^7))*(61+(662*tan($phi_prime)^2)+(1320*tan($phi_prime)^4)+(720*tan($phi_prime)^6)) Local $phi = $phi_prime-($VII*($E-$E0)^2)+($VIII*($E-$E0)^4)-($IX*($E-$E0)^6) Local $lamb = $lam0+(($X*($E-$E0))-($XI*($E-$E0)^3)+($XII*($E-$E0)^5)-($XIIA*($E-$E0)^7)) $lat=$phi*$rad2deg $lon=$lamb*$rad2deg EndFunc Func _OSgrid_FromLatLon($lat, $lon, ByRef $easting, ByRef $northing) ; converts latitude-longitude coordinates, in decimal degrees ; into Ordnance Survey grid easting and norting, in meters ; http://www.dorcus.co.uk/carabus/ll_ngr.html Local $deg2rad=3.141592653589793238462643/180 Local $rad2deg=180/3.141592653589793238462643 Local $phi = $lat * $deg2rad; convert latitude to radians Local $lam = $lon * $deg2rad; convert longitude to radians Local $a = 6377563.396 ; semi-major ellipsoidal axis Local $b = 6356256.910 ; semi-minor ellipsoidal axis Local $N0= -100000 ; northing of true origin Local $E0= 400000 ; easting of true origin Local $F0= 0.9996012717 ; scale factor on central meridian Local $e2=($a^2-$b^2)/$a^2 ; squared ellipticity Local $phi0= 49 * $deg2rad ; latitude of true origin Local $lam0= -2 * $deg2rad ; longitude of true origin and central meridian Local $af0 = $a * $F0 Local $bf0 = $b * $F0 ; easting Local $slat2 = sin($phi) * sin($phi) Local $nu = $af0 / (sqrt(1 - ($e2 * ($slat2)))) Local $rho = ($nu * (1 - $e2)) / (1 - ($e2 * $slat2)) Local $eta2 = ($nu / $rho) - 1 Local $p = $lam - $lam0 Local $IV = $nu * cos($phi) Local $clat3 = (cos($phi))^3 Local $tlat2 = tan($phi) * tan($phi) Local $V = ($nu / 6) * $clat3 * (($nu / $rho) - $tlat2) Local $clat5 = (cos($phi))^5 Local $tlat4 = (tan($phi))^4 Local $VI = ($nu / 120) * $clat5 * ((5 - (18 * $tlat2)) + $tlat4 + (14 * $eta2) - (58 * $tlat2 * $eta2)) $easting = Round($e0 + ($p * $IV) + (($p^3) * $V) + (($p^5) * $VI),0) ; northing Local $n = ($af0 - $bf0) / ($af0 + $bf0) Local $M = _GetM($phi) Local $I = $M + ($n0) Local $II = ($nu / 2) * sin($phi) * cos($phi) Local $III = (($nu / 24) * sin($phi) * (cos($phi)^3)) * (5 - (tan($phi)^2) + (9 * $eta2)) Local $IIIA = (($nu / 720) * sin($phi) * $clat5) * (61 - (58 * $tlat2) + $tlat4) $northing = Round($I + (($p * $p) * $II) + (($p^4) * $III) + (($p^6) * $IIIA),0) EndFunc Func _GetM($phi_prime) Local $deg2rad=3.141592653589793238462643/180 Local $rad2deg=180/3.141592653589793238462643 Local $a = 6377563.396 ; semi-major ellipsoidal axis Local $b = 6356256.910 ; semi-minor ellipsoidal axis Local $F0= 0.9996012717 ; scale factor on central meridian Local $phi0= 49 * $deg2rad ; latitude of true origin Local $phi_diff=$phi_prime-$phi0 Local $phi_sum =$phi_prime+$phi0 Local $n_small =($a-$b)/($a+$b) Local $part1 =(1+$n_small+(5/4)*$n_small^2+(5/4)*$n_small^3)*$phi_diff Local $part2 =(3*$n_small+3*$n_small^2+(21/8)*$n_small^3)*sin($phi_diff)*cos($phi_sum) Local $part3 =((15/8)*$n_small^2+(15/8)*$n_small^3)*sin(2*$phi_diff)*cos(2*$phi_sum) Local $part4 =((35/24)*$n_small^3)*sin(3*$phi_diff)*cos(3*$phi_sum) Return $b*$F0*($part1-$part2+$part3-$part4) EndFunc Func _sec($theta) Return 1/cos($theta) EndFunc Func _OSNE2BNG($easting, $northing) ; produces OS grid reference letter codes ; http://www.dorcus.co.uk/carabus/ll_ngr.html Local $eX = $easting / 500000 Local $nX = $northing / 500000 Local $tmp = floor($eX)-5.0 * floor($nX)+17.0 $nX = 5 * ($nX - floor($nX)) $eX = 20 - 5.0 * floor($nX) + floor(5.0 * ($eX - floor($eX))) if $eX > 7.5 Then $eX+=1 if $tmp > 7.5 Then $tmp+=1 Return Chr($tmp + 65) & Chr($eX + 65) & " " & $easting & " " & $northing EndFunc #cs NB for Ireland, use a Modified Airy ellipsoid: Local $a = 6377340.189 Local $b = 6356034.447 Local $e0 = 200000 Local $n0 = 250000 Local $f0 = 1.000035 Local $e2 = 0.00667054015 Local $lam0 = -0.13962634015954636615389526147909 Local $phi0 = 0.93375114981696632365417456114141 And the last line of _OSNE2BNG becomes: Return Chr($tmp + 65) & Chr($eX + 65) & " " & $easting & " " & $northing For the Channel Islands, use the International 1924 ellipsoid: Local $a = 6378388.000 ; INT24 ED50 semi-major Local $b = 6356911.946 ; INT24 ED50 semi-minor Local $e0 = 500000 ; CI easting of false origin Local $n0 = 0 ; CI northing of false origin Local $f0 = 0.9996 ; INT24 ED50 scale factor on central meridian Local $e2 = 0.0067226700223333 ; INT24 ED50 eccentricity squared Local $lam0 = -0.0523598775598 ; CI false east Local $phi0 = 0 * $deg2rad ; CI false north Func _OSNE2BNG_ChannelIslands($easting, $northing) ; http://www.dorcus.co.uk/carabus/ll_ngr.html Local $eX = $easting / 500000 Local $nX = $northing / 500000 Local $tmp = floor($eX)-5.0 * floor($nX)+17.0 $nX = 5 * ($nX - floor($nX)) $eX = 20 - 5.0 * floor($nX) + floor(5.0 * ($eX - floor($eX))) if $eX > 7.5 Then $eX+=1 if $tmp > 7.5 Then $tmp+=1 If $northing>5500000 Then Return "WA " & StringLeft(String($easting),6) & " " & StringTrimLeft(String($northing),1) Else Return "WV " & StringLeft(String($easting),6) & " " & StringTrimLeft(String($northing),1) EndIf EndFunc #ce Enjoy.
  10. Hi, so I'm currently doing test automation within a program known as Creo Elements. I'm new to AutoIt, and so far I really enjoy working with it. However while I've found automating IE to be really accessible with auto it, I'm having a bit more difficulty automating a program like creo. I want a solution to automating that doesn't involve mouseclick, as that doesn't scale very well... I've already looked to this thread for help on the matter: It seems like specifying the coordinents per each resolutions is a huge hastle, and I would rather get control click working. But my problem with control click, is there are multiple buttons within creo that all have the same information. The control information for the button looks as follows: >>>> Control <<<< Class: MenuBar Instance: 1 ClassnameNN: MenuBar1 Name: Advanced (Class): [CLASS:MenuBar; INSTANCE:1] ID: Text: Position: 0, 0 Size: 1139, 27 ControlClick Coords: 348, 14 Style: 0x54000000 ExStyle: 0x00000000 Handle: 0x000B0116 However when I use controlclick like this: ControlClick($sAppTitle,"","[CLASS:MenuBar; INSTANCE:1]") it doesn't click on the Tools button like I want, it instead clicks on the Resources button. So my question is can I use the the Control click coords, so that I may specify the location of this button that I want? If so, how I would I input, that, I've tried putting them after the in a manner like: ControlClick($sAppTitle,"","","[CLASS:MenuBar; INSTANCE:1]","left",1,348, 14) This is the way it specifies in the help doc, but when I do that I dont get any button clicked at all. Thank you, Athos
  11. How can I search for a certain color in a background or masked window by other windows( no minimized ), and get the color's relative window's coordinates ?? Is it possible ? I appreciate any help....
×
×
  • Create New...