Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/15/2013 in all areas

  1. Jos

    Switch Case Help

    Not sure why you first ask what I want and then still supply the answer to the question... Get rid of the _IsPressed() on the case statement and set the OK button as default so when you press Enter you also fire the Ok button. Jos
    1 point
  2. UEZ

    how to do a LED Panel ?

    You can try the GDI+ version made by Eukalyptus: http://www.autoit.de/index.php?page=Thread&postID=140164#post140164 Br, UEZ
    1 point
  3. It would be better to change your function so that it didn't call itself because when that happens all the GUI controls are duplicated. Instead of calling idfile return -1 for example then call the function like this While idfile() <> -1 Wend Then, as you have been told three times already, make the variables global or return an array or pass them as parameters using ByRef.
    1 point
  4. Ah well then instead of using TC for winrar just send files to winrar. It would be best using commands without mouse clicks to accomplish task anyways. Look at >Melba's recursion example as well as searching for winrar/7zip/zip UDF's to accomplish your task. I know that sounds like a lot instead of mouse clicking but it's more stable plus more universal! Also these "zip" programs should contain command line triggers to accomplish the tasks. After posting noticed a small progress bar if you click and hold right button in TC.
    1 point
  5. Using _IsPressed func the right click keyboard key is 0x5D but I couldn't get it to "Send" from autoit. Using Total Commander it shouldn't be hard to figur out a "keyboard shortcut" to accomplish what a right click plus "t" does. If you can find another shortcut instead of right clicking then just apply that. I don't use total Commander but I'm sure there has to be an alternative to using the context menu of a right click menu option. I.E. Right click-->Copy (Ctrl+c) or right click --> Paste (Ctrl+v) Edit: I downloaded TC and attempted to right click on an item and it wouldn't even give a drop down menu?!?
    1 point
  6. Melba23

    Finding a colour

    markyrocks, Despite a Moderator previously suggesting that this thread is game-related you still feel obliged to offer some help, albeit limited? Should I therefore feel obliged to sanction you as well as the OP if my suspicions are confirmed? In future, please engage your brain before trying to increase your post count. M23
    1 point
  7. If you simply want to find out if a point lies within a circle you could measure the distance from the circle center to the point. If the distance to the point is less than the radius of the circle then the point is within the circle. Func GetDistance($fX1, $fY1, $fX2, $fY2) Return Sqrt(($fX1 - $fX2) ^ 2 + ($fY1 - $fY2) ^ 2) EndFunc If the point is within the circle you could then get the angle from the circle center to the point. Knowing the distance and the angle would tell you exactly which part of the circle the pixel is in. Func GetAngle($fX1, $fY1, $fX2, $fY2) Return ((($fY2 <= $fY1) * 180) - (ATan(($fX1 - $fX2) / ($fY1 - $fY2)) * 57.295779) + 90) EndFunc As far as getting all the pixel coordinates of a circle, I can’t think of an efficient way to do it. This would work but is very slow... Func GetCircleCoordinates($fCircCentX, $fCircCentY, $fCircRadius) Local $aCoordinates[Abs(($fCircRadius * 2) ^ 2) + 1][2] For $iY = Abs($fCircCentY - $fCircRadius) To Abs($fCircCentY + $fCircRadius) For $iX = Abs($fCircCentX - $fCircRadius) To Abs($fCircCentX + $fCircRadius) If (GetDistance($fCircCentX, $fCircCentY, $iX, $iY) < $fCircRadius) Then $aCoordinates[0][0] += 1 $aCoordinates[$aCoordinates[0][0]][0] = $iX $aCoordinates[$aCoordinates[0][0]][1] = $iY EndIf Next Next ReDim $aCoordinates[$aCoordinates[0][0] + 1][2] Return $aCoordinates EndFunc
    1 point
×
×
  • Create New...